Skip to content

Commit

Permalink
Improve Polymarket account update on trade update
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Sep 27, 2024
1 parent de332c3 commit ac06b8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nautilus_trader/adapters/polymarket/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ def _handle_ws_trade_msg(self, msg: PolymarketUserTrade, wait_for_ack: bool):
self._send_fill_report(report)
return

self._loop.create_task(self._update_account_state())

order = self._cache.order(client_order_id)
if order.is_closed:
return # Already closed (only status update)
Expand All @@ -940,5 +942,3 @@ def _handle_ws_trade_msg(self, msg: PolymarketUserTrade, wait_for_ack: bool):
ts_event=millis_to_nanos(int(msg.match_time)),
info=msgspec.structs.asdict(msg),
)

self._loop.create_task(self._update_account_state())

0 comments on commit ac06b8a

Please sign in to comment.