Skip to content

Commit

Permalink
feat: Convert live price listener to websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMcL committed Oct 4, 2023
1 parent 5a5ccd9 commit f88fe14
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions vega_sim/scenario/common/utils/price_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,9 @@ def get_historic_price_series(
def _price_listener(iter_obj, symbol):
ws = websocket.WebSocketApp(
f"wss://stream.binance.com:9443/ws/{symbol}@kline_1s",
# on_open=lambda ws: print("ok"),
on_message=lambda _, msg: _on_message(iter_obj, msg),
# on_error=on_error,
# on_close=on_close,
)
ws.run_forever(reconnect=5)
# self._forwarding_thread.start()


def _on_message(iter_obj, message):
Expand Down

0 comments on commit f88fe14

Please sign in to comment.