Restructured hedger modules: moved CLP hedger and auto hedger into separate folders, updated data fetchers and main app, removed deprecated files
This commit is contained in:
@ -127,13 +127,15 @@ def start_live_feed(shared_prices_dict, coins_to_watch: list, log_level='off'):
|
||||
# --- MODIFIED: Subscribe to 'bbo' AND 'trades' for each coin ---
|
||||
for coin in coins_to_watch:
|
||||
# Subscribe to Best Bid/Offer
|
||||
# For xyz: prefixed coins, we need to bypass the SDK's name_to_coin remapping
|
||||
# by directly using the ws_manager.subscribe method
|
||||
bbo_sub = {"type": "bbo", "coin": coin}
|
||||
new_info.subscribe(bbo_sub, callback)
|
||||
new_info.ws_manager.subscribe(bbo_sub, callback)
|
||||
logging.info(f"Subscribed to 'bbo' for {coin}.")
|
||||
|
||||
# Subscribe to Live Trades
|
||||
trades_sub = {"type": "trades", "coin": coin}
|
||||
new_info.subscribe(trades_sub, callback)
|
||||
new_info.ws_manager.subscribe(trades_sub, callback)
|
||||
logging.info(f"Subscribed to 'trades' for {coin}.")
|
||||
|
||||
logging.info("WebSocket connected and all subscriptions sent.")
|
||||
|
||||
Reference in New Issue
Block a user