Announcement

Collapse
No announcement yet.

Bug: Order.state returning number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug: Order.state returning number

    Order.state is returning me a number

  • #2
    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


    • #3
      Thanks Adam! Appreciate the help!

      Comment

      Working...
      X