Maintaining an Accurate Record of One's Own Orders

When messages are dropped from the full WebSocket channel, you can get the status of the order book with an HTTP request to
https://api.exchange.coinbase.com/products/{product_id}/book and playback the WebSocket feed subsequent to the sequence number in the HTTP response to maintain an accurate order book (as described here). However, when messages are dropped from the user channel, the equivalent HTTP request (https://api.exchange.coinbase.com/orders) has no sequence number. To fix this it would seem that you can just use the HTTP response to get a list of order ids for your orders and then get the corresponding orders from the order book.

My question is as to how you would maintain an accurate list of your orders that are done and, therefore, not open in the order book. If the order-book HTTP response does not contain one of your orders and the user-orders HTTP response shows the order as done, how do I know if the order book is up to date with the user orders list or if it predates the order open message and an open message for an order that was thought to be done will come through the queued WebSocket feed? How can one keep a record of one’s done orders and a record of the order book that are both in agreeance at all times?

Hello @ttno1! Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team. We will get back to you once we have more information. Keep in touch!

3 Likes

I guess it’s impossible.

The fact that messages can be dropped makes everything so much harder than it has to be.

Hi @ttno1! Thank you for the insights you have shared. Please know that the team has taken into consideration your questions on how one would maintain an accurate list of orders that are done and, therefore, not open in the order book. Also, how can one keep a record of one’s done orders and a record of the order book that are both in agreement at all times. As of the moment, we have taken this as feedback and have our internal teams evaluate this.

If you have any more questions/concerns, please feel free to reach out. Have a nice day!