BaseDepthCacheManager
Attributes
attributeTIMEOUT= 60Functions
func__init__(self, client, symbol, loop=None, refresh_interval=DEFAULT_REFRESH, bm=None, limit=10, conv_type=float)Create a DepthCacheManager instance
:param client: Binance API client :type client: binance.Client :param loop: :type loop: :param symbol: Symbol to create depth cache for :type symbol: string :param refresh_interval: Optional number of seconds between cache refresh, use 0 or None to disable :type refresh_interval: int :param bm: Optional BinanceSocketManager :type bm: BinanceSocketManager :param limit: Optional number of orders to get from orderbook :type limit: int :param conv_type: Optional type to represent price, and amount, default is float. :type conv_type: function.
paramselfparamclientparamsymbolparamloop= Noneparamrefresh_intervalOptional[int]= DEFAULT_REFRESHparambm= Noneparamlimit= 10paramconv_type= floatReturns
Nonefunc__aenter__(self)paramselfReturns
Nonefunc__aexit__(self, *args, **kwargs)paramselfparamargs= ()paramkwargs= {}Returns
Nonefuncrecv(self)paramselfReturns
Nonefunc_init_cache(self)Initialise the depth cache calling REST endpoint
:return:
paramselfReturns
Nonefunc_start_socket(self)Start the depth cache socket
:return:
paramselfReturns
Nonefunc_get_socket(self)paramselfReturns
Nonefunc_depth_event(self, msg)Handle a depth event
:param msg: :return:
paramselfparammsgReturns
Nonefunc_process_depth_message(self, msg)Process a depth event message.
:param msg: Depth event message. :return:
paramselfparammsgReturns
Nonefunc_apply_orders(self, msg)paramselfparammsgReturns
Nonefuncget_depth_cache(self)Get the current depth cache
:return: DepthCache object
paramselfReturns
Nonefuncclose(self)Close the open socket for this manager
:return:
paramselfReturns
Nonefuncget_symbol(self)Get the symbol
:return: symbol
paramselfReturns
None