0

I am playing around with the GDAX node API and I am not understanding how to know when my order is done filling, whether it was a partial or entire fill. I know that a limit order on the books can either:

  1. Be filled completely by a single taker order
  2. Be filled completely by multiple taker orders
  3. Be filled partially by one or multiple taker orders

I am using the GDAX Node API method .getOrder(orderId) and checking the result.status is 'done' and result.settled is true to see if the order is completely done filling according to this documentation from the GDAX API:

ORDER STATUS AND SETTLEMENT

Orders which are no longer resting on the order book, will be marked with the done status. There is a small window between an order being done and settled. An order is settled when all of the fills have settled and the remaining holds (if any) have been removed.

Unfortunately I have seen multiple cases where .getOrder(orderId) with a status 'done' and settled true has only showed me a partial fill, even though the entire order was ultimately filled milliseconds after. This leaves me in a situation where I do not know if there is more filling to be done when I call .getOrder(orderId) or if it's completed filling what it can.

My question is: Is there any way using the Node GDAX API to know with 100% certainty that my order is done filling, whether it's a complete or partial fill?

Thanks!!

Community
  • 1
  • 1
NZHammer
  • 177
  • 1
  • 12
  • Can you simply check if the total filled quantity you've received is equal to the order quantity? – John Zwinck Mar 24 '18 at 02:27
  • @JohnZwinck That was actually my initial solution! But then I realized that number 3 above would be an issue because technically the order can be finished with a partial fill. Meaning I could make a limit buy order for 1 BTC have a partial fill for .5 BTC. The order is completely done with a partial fill, but I wouldn't think it was done because .5 BTC != 1 BTC – NZHammer Mar 24 '18 at 04:23

0 Answers0