AURORA LAB / PUBLIC EXPERIMENT 001
Order changes state.
Three synthetic messages demonstrate why receive time cannot automatically replace source sequence.
Source sequence is the order assigned by the data source; receive time is when a consumer observes the message. This example uses one sequence scope; SET overwrites the remaining quantity for order-A. Real feeds must be interpreted according to their own specifications.
| Sequence | Source time (ms) | Receive time (ms) | Operation | Quantity |
|---|---|---|---|---|
| 1 | 1000 | 1100 | SET order-A | 10 |
| 2 | 1001 | 1103 | SET order-A | 4 |
| 3 | 1002 | 1101 | SET order-A | 7 |
Choose an order, then run the example or step through it.
Replay trace
Why do the results differ?
Message 2 arrives after message 3. Receive-order replay applies the older update last, overwriting the newer state and ending at 4. Replay in the source sequence specified by this example ends at 7. This conclusion depends on the stated event semantics; it is not a universal rule for all market-data protocols.
Download the Python examplePython 3 · Standard library only · MIT licence
Synthetic data only. No live prices, trading signals or account connections.