bug: closedorders and openorders are not mutually exclusive
Closed this issue · 1 comments
lispc commented
OrderMessage.event can be PUT/UPDATE/FINISH. In the above code, all these three types of OrderMessages are inserted into the 'OrderHistory' table.
But we query 'OrderHistory' table for 'closedorders' api. So some non closed orders appears in the response.
I think we should only persist 'FINISH' order into the OrderHistory table.
UPDATE/PUT message will be used for websockets APIs later.
0xmountaintop commented
closed via #83