The DepthCacheManager returns an Asynchronous Context Manager which can be used with async for or by interacting with the __aenter__ and __aexit__ functions . By default the depth cache will fetch the order book via REST request every 30 minutes. This duration can be changed by using the refresh_interval parameter.
Read moreIs Python good for Websockets?
websockets is a library for building WebSocket servers and clients in Python with a focus on correctness, simplicity, robustness, and performance . Built on top of asyncio , Python’s standard asynchronous I/O framework, it provides an elegant coroutine-based API.
Read more