Skip to main content

Module execution

Module execution 

Expand description

Execution history mapping.

Structs§

Cumulative
What the broker had executed in one order after a message: the quantity and the value (price times quantity) of everything filled so far, summed over all fills of the order.

Functions§

cumulative_of
The running totals of an order message, or None when the message does not carry enough to know them (no executedQuantity, or neither executionValue nor averagePrice).
map_trade_record
A trade of the history (POST /trades/search). The docs describe a flat record (tradeNum, orderNum, tradeQuantity, tradeDateTime, …) without our clientOrderId and without a commission: cid is None, commission 0. The older data form is still read if it comes.
map_ws_execution
A fill from the orders/events/ws WebSocket. Only messages that carry a fill: lastQuantity > 0 and an executionId, and not a corrected report (executionType 13, which restates an earlier message). The order’s cid is read as crate::map::order::message_cid says.