excalidraw flow and basic rust ws
This commit is contained in:
@@ -144,6 +144,7 @@ async def ws_stream():
|
||||
Local_Recent_Orders = [t for t in Local_Recent_Orders if t.get('timestamp_arrival', 0) >= lookback_min_ts_ms]
|
||||
|
||||
VAL_KEY_OBJ: str = json.dumps(obj=Local_Recent_Orders)
|
||||
VAL_KEY.publish(channel=VK_ORDERS_TRADES, message=VAL_KEY_OBJ)
|
||||
VAL_KEY.set(name=VK_ORDERS_TRADES, value=VAL_KEY_OBJ)
|
||||
|
||||
await db.insert_df_to_mysql(table_name='fr_aster_user_order_trade', params=new_order_update, CON=CON)
|
||||
@@ -220,6 +221,7 @@ async def ws_stream():
|
||||
list_for_df_pos.append(position_update)
|
||||
Local_Recent_Positions = utils.upsert_list_of_dicts_by_id(Local_Recent_Positions, position_update, id='symbol', seq_check_field='timestamp_msg')
|
||||
Local_Recent_Positions = [t for t in Local_Recent_Positions if t.get('timestamp_arrival', 0) >= lookback_min_ts_ms]
|
||||
VAL_KEY.publish(channel=VK_POSITIONS, message=json.dumps(obj=Local_Recent_Positions))
|
||||
VAL_KEY.set(name=VK_POSITIONS, value=json.dumps(obj=Local_Recent_Positions))
|
||||
if list_for_df_bal:
|
||||
await db.insert_df_to_mysql(table_name='fr_aster_user_account_bal', params=list_for_df_bal, CON=CON)
|
||||
|
||||
Reference in New Issue
Block a user