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):
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.
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.