Initialization

class binanceSpotEasyT.initialization.Initialize[source]

This class ensure that the platform are working properly. If it is connected on the internet, and if the symbol that you are trying to use exists or was not mistyped.

__init__()[source]

Initialize the constructor and set the _log.

_initialize_account() bool[source]

This function check if it is possible to login into Binance using the API KEY and SECRET. You must have this information.

Raises

raise_for_status() – This error happens when it returns an error.

Returns

It returns True if it works fine.

initialize_platform() bool[source]

This function is responsible to initialize the platform that will be used to trade.

Raises

PlatformNotInitialized – Raise this error when there are some problem with internet connection.

Returns

It returns true if initialized else return false.

Examples

>>> # All the code you need to execute the function:
>>> from binanceSpotEasyT.initialization import Initialize
>>> initialize = Initialize()
>>> # The function and the function return:
>>> initialize.initialize_platform()
True
initialize_symbol(*symbols: str) bool[source]

This function is responsible to initialize as many symbols as you want.

Parameters

symbols – It receives strings as parameters containing the symbol names to be initialized.

Raises

SymbolNotFound – If not possible to initialize the symbol raises this error.

Returns

When the symbol is successfully initialized it returns True and, it updates the list self.symbol_initialized if you want to work with the symbols correctly initialized.

Examples

>>> # All the code you need to execute the function:
>>> from binanceSpotEasyT.initialization import Initialize
>>> initialize = Initialize()
>>> initialize.initialize_platform()
True
>>> # The function and the function return:
>>> initialize.initialize_symbol('BTCUSDT')
True
>>> # Check initialize.symbol_initialized to see the list of initialized symbols
>>> initialize.symbol_initialized
['BTCUSDT']
exception binanceSpotEasyT.initialization.PlatformNotInitialized[source]

Raise this error when ping was not able to be retrieved.

exception binanceSpotEasyT.initialization.SymbolNotFound[source]

Raise this error when the symbol is not found.