Ccxt
The Ccxt module handles the (python) ccxt library. Wraps the ccxt api.
Ccxt.MARKETS_PATH
— ConstantThe path to the markets data directory.
Ccxt.ccxt
— ConstantThe ccxt python module reference
Ccxt.ccxt_errors
— ConstantCcxt exception names
Ccxt.ccxt_ws
— ConstantThe ccxt.pro (websockets) python module reference
Ccxt._ccxt_errors!
— MethodPopulates 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.
Ccxt._init
— MethodInitializes the Python environment and creates the markets data directory.
_init() -> Union{Nothing, Bool}
Ccxt._issupported
— MethodCheck if the key k
is in the dictionary has
and return its boolean value.
Ccxt._multifunc
— FunctionChoose correct ccxt function according to what the exchange supports.
Ccxt._out_as_input
— MethodA dictionary for storing function wrappers with their unique identifiers.
Ccxt.ccxt_exchange
— FunctionInstantiate 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.
Ccxt.choosefunc
— MethodChooses a function based on the provided parameters and executes it.
choosefunc(
exc,
suffix,
inputs::AbstractVector;
elkey,
kwargs...
) -> Union{Ccxt.var"#default_func#18"{Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}}, Ccxt.var"#multi_func#15"{Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}, <:AbstractVector{T}} where T, Ccxt.var"#single_func#16"{Nothing, Base.Pairs{Symbol, Union{}, Tuple{}, @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.
Ccxt.isccxterror
— MethodDetermines if a Python exception is a ccxt error.
isccxterror(err::PyException) -> Bool
Ccxt.isinitialized
— MethodChecks 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.
Ccxt.issupported
— MethodCheck if the key k
is supported in the exc.py.has
dictionary.
Ccxt.upgrade
— MethodUpgrades 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.