coinbase / coinbase-pro-node

DEPRECATED — The official Node.js library for Coinbase Pro
Apache License 2.0
844 stars 316 forks source link

getOrder() periodically shows incorrect status / settled field values #339

Closed nzhammer closed 4 years ago

nzhammer commented 6 years ago

When polling an outstanding sell limit order every 2 seconds to check the status using .getOrder(), the status and settled fields are sometimes incorrect. An example is here ( some field names slightly modified):

First getOrder('123') JSON response: { id: '123', price: 6644.8, size: 0.00216318, executed_value: 14.373898464, side: 'sell', type: 'limit', fees: '0.0000000000000000', status: 'done', settled: true }

Second getOrder('123') JSON response (2s later): { id: '123', price: 6644.8, size: 0.01845838, executed_value: 122.652243424, side: 'sell', type: 'limit', fees: '0.0000000000000000', status: 'done', settled: true }

The second was that I pasted is correct. The order has been executed in full and thus it's status is 'done' and settled is true.

The first one I pasted was incorrect, specifically the bold part. The order had only been partially filled and there was more to come, yet the status was 'done' and settled true.

If the order is not done and settled, status should not be 'done' and settled should be false.

drewrothstein commented 4 years ago

Hi, we are closing out PRs + Issues as this project is being archived.