开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

openOrder:orderState vs orderStatus:status


 

Hi,

Just wondering if anyone could explain why the API provides both openOrder and orderStatus as callbacks from reqOpenOrder?? It seems they have overlapping information (both report status), and I can't see an apparent reason why the respective information needs to be reported in two separate callbacks.

Specifically, I just want the status of my orders, and I'd like to know if there's any difference in using the status from openOrder vs orderStatus? (Will OpenOrder:status always equal orderStatus:status?)

I'm fairly new to the API so apologies if this is a na?ve question....


 

I use orderState for margin change estimation?and commission estimation.?
and orderStatus for execution wise information, for example it is now X% patricianly filled at price Y.?


 

I use OrderState mostly for its CompletedStatus field which can indicate such things as "Rejected" or "Cancelled by Trader". My automation routine is stateless so it is useful for it to differentiate between reasons for orders getting canceled.