Crypto Trading Systems
Bug Report
Order state machine crashes with unknown order: the fill arrived before the REST response
Our order manager occasionally raised KeyError: unknown order when a fill event arrived on the websocket before the REST place-order call returned. It keyed orders by exchange order id, which it only learned from the REST response. Keying by client order id and buffering unknown events fixed it.