Ccxt

The Ccxt module handles the (python) ccxt library. Wraps the ccxt api.

Ccxt._ccxt_errors!Method

Populates the ccxt_errors array with error names from the ccxt library.

_ccxt_errors!()

This function checks if the ccxt_errors array is empty. If it is, it imports the ccxt.base.errors module from the ccxt library, retrieves the directory of the module, and iterates over each error. It then checks if the first character of the error name is uppercase. If it is, the error name is added to the ccxt_errors array.

source
Ccxt._initMethod

Initializes the Python environment and creates the markets data directory.

_init() -> Union{Nothing, Bool}
source
Ccxt.ccxt_exchangeFunction

Instantiate a CCXT exchange.

ccxt_exchange(name::Symbol; ...) -> Py
ccxt_exchange(name::Symbol, params; kwargs...) -> Py

This function creates an instance of a CCXT exchange. It checks if the exchange is available in the WebSocket (ws) module, otherwise it looks in the asynchronous (async) module. If optional parameters are provided, they are passed to the exchange constructor.

source
Ccxt.choosefuncMethod

Chooses a function based on the provided parameters and executes it.

choosefunc(
    exc,
    suffix,
    inputs::AbstractVector;
    elkey,
    kwargs...
) -> Union{Ccxt.var"#default_func#24"{Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}}, Ccxt.var"#multi_func#20"{Nothing, Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}, <:AbstractVector{T}} where T, Ccxt.var"#single_func#21"{Nothing, Base.Pairs{Symbol, Union{}, Nothing, @NamedTuple{}}, <:AbstractVector{T}} where T}

This function selects a function based on the provided exception, suffix, and inputs. It then executes the chosen function with the provided inputs and keyword arguments. The function can handle multiple types of inputs and can execute multiple functions concurrently if necessary.

source
Ccxt.isccxterrorMethod

Determines if a Python exception is a ccxt error.

isccxterror(err::PyException) -> Bool
source
Ccxt.isinitializedMethod

Checks if the ccxt object is initialized.

isinitialized() -> Bool

This function checks if the global variable ccxt is initialized by checking if it's not nothing and not null in the Python context.

source
Ccxt.upgradeMethod

Upgrades the ccxt library to the latest version.

upgrade() -> Py

This function upgrades the ccxt library to the latest version available. It checks the current version of the ccxt library, and if a newer version is available, it upgrades the library using pip.

source

See Also

  • Exchanges - Exchange integration and configuration
  • Config - Exchange integration and configuration