Expand description
Materialized order state management.
Keeps order_infos.status and order_infos.filled_size in sync with
the latest order_updates row. Terminal statuses (CANCELED, FILLED,
REJECTED) are never overwritten by earlier updates.
Constantsยง
Functionsยง
- is_
terminal_ ๐order_ status - update_
existing_ materialized_ order_ state_ if_ newer - upsert_
materialized_ order_ state - Upsert the materialized order_infos row with the latest status and
filled_size. Skips the update if the existing row is already terminal
or has a newer
last_materialized_order_update_id.