Hey guys,
I am trying to get the ThreadedDepthCacheManager from python-binance lib running.
This is the code:
from binance import ThreadedDepthCacheManager
symbol='BNBBTC'
dcm = ThreadedDepthCacheManager()
dcm.start()
def handle_depth_cache(depth_cache):
print(f"symbol {depth_cache.symbol}")
print("top 5 bids")
print(depth_cache.get_bids()[:5])
print("last update time {}".format(depth_cache.update_time))
dcm_name = dcm.start_depth_cache(handle_depth_cache, symbol=symbol)
dcm.stop()
I just want to get the last top bid prices for BNB/BTC currency pair.
This is the error message:
'NoneType' object has no attribute 'tld' ----> dcm_name = dcm.start_depth_cache(handle_depth_cache, symbol=symbol)
Thank you in advance for your help!
BR Vegas913