Order.state is returning me a number
Announcement
Collapse
No announcement yet.
Bug: Order.state returning number
Collapse
X
-
this is expected behaviour
you can use the following function to convert number to description
function getOrderState(Orderstate)
{
switch(Orderstate)
{
case Order.STATE_PARTIALFILL :
return "STATE_PARTIALFILL";
case Order.STATE_PLACING :
return "STATE_PLACING";
case Order.STATE_CANCELING :
return "STATE_CANCELING";
case Order.STATE_UPDATING :
return "STATE_UPDATING";
case Order.STATE_FILLED :
return "STATE_FILLED";
case Order.STATE_CANCELED :
return "STATE_CANCELED";
case Order.STATE_REJECTED:
return "STATE_REJECTED";
case Order.STATE_WORKING :
return "STATE_WORKING";
default:
return "Unknown ORDERSATE";
}
}
Comment