Open haerdib opened 3 years ago
The second success message is the OrderUpdate event, we need to parse that and take decision accordingly for orders in cache or in orderbook mirror
On second thought: We could acutally leave it like this, couldn't we? Upon receiving [2,0,"admin_create_order",["e348f796-d359-11eb-8866-0242ac120004"]]
we know that openfinex has recevied our request. It should not matter wether the openfinex server aknowledges it or not, because the enclave is the one to decide which orders are accepted and which not, not the openfinex server.
So it's actually better to depend on the first message instead of the second - if we depend on the acceptance of the openfinex server we give it the right to decide which orders are to be accepted.
@Gauthamastro What are your thoughts on this?
I agree. on top of that, we are listening for order updates, or do we?
We are. But we're currently not parsing them if they're not a trade or cancel order event. Unimplemented openfinex ws updates are resulting in an log error message.
We decided to use second answer as success. This needs to be implemented accordingly
Currently we interpret the message
[2,0,"admin_create_order",["e348f796-d359-11eb-8866-0242ac120004"]]
as a success. But it is not, it's used as acknowledge receipt (the orderUUID should be correct though) The actual success message is:[5,"on",["U180977303","Tiffany","btcusd",10,"e348f796-d359-11eb-8866-0242ac120004","buy","w","l","50","0","50","50","0",0,1624366858]]