(msg)
| 35 | symbol = "BTCUSDT" |
| 36 | |
| 37 | def handle_socket_message(msg): |
| 38 | global received_ohlcv, received_depth |
| 39 | if "e" in msg: |
| 40 | if msg["e"] == "depthUpdate": |
| 41 | logger.debug("Received depth update message") |
| 42 | received_depth = True |
| 43 | if msg["e"] == "kline": |
| 44 | logger.debug("Received kline message") |
| 45 | received_ohlcv = True |
| 46 | if received_depth and received_ohlcv: |
| 47 | logger.debug("Received both depth and OHLCV messages, stopping") |
| 48 | twm.stop() |
| 49 | |
| 50 | try: |
| 51 | logger.debug("Starting ThreadedWebsocketManager") |
nothing calls this directly
no test coverage detected
searching dependent graphs…