start of legs

This commit is contained in:
2026-04-02 02:38:01 +00:00
parent 259ea93479
commit f5d8037594
2 changed files with 237 additions and 127 deletions

View File

@@ -299,7 +299,7 @@ async def polymarket_stream():
event_type = data.get('event_type', None)
match event_type:
case 'trade':
logging.info(f'TRADE: {data}')
# logging.info(f'TRADE: {data}')
# trade_status = data.get('status')
# match trade_status: # Raise TELEGRAM ALERT ???
# case 'MATCHED':
@@ -326,9 +326,9 @@ async def polymarket_stream():
LOOKBACK_MIN_TS_MS = ts_arrival-LOCAL_RECENT_TRADES_LOOKBACK_SEC*1000
LOCAL_RECENT_TRADES = [t for t in LOCAL_RECENT_TRADES if t.get('timestamp_arrival', 0) >= LOOKBACK_MIN_TS_MS]
print("---------------------")
print(LOCAL_RECENT_TRADES)
print("---------------------")
# print("---------------------")
# print(LOCAL_RECENT_TRADES)
# print("---------------------")
VAL_KEY_OBJ = json.dumps(LOCAL_RECENT_TRADES)
# VAL_KEY.publish(VK_CHANNEL, VAL_KEY_OBJ)