Open Orders Verbose

This subscription feed publishes information about user open orders. This feed adds extra information about post-only orders that failed to cross the book.

Authentication is required.

Feed

Event Type

API Keys Original & Signed Challenge
open_orders_verbose
subscribe / unsubscribe
Any Yes
Sample Sent Message
{  
    "event":"subscribe",
    "feed":"open_orders_verbose",
    "api_key":"CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
    "original_challenge":"226aee50-88fc-4618-a42a-34f7709570b2",
    "signed_challenge":"RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+
Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="

}

 

Sample Return if Successful. 

{  
    "event":"subscribed",
    "feed":"open_orders_verbose",
    "api_key":"CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
    "original_challenge":"226aee50-88fc-4618-a42a-34f7709570b2",
    "signed_challenge":"RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+
Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="

} 

Field

Type Description
event
string The result, subscribed or subscribed_failed or
unsubscribed or unsubscribed_failed
feed string The requested subscription feed
api_key string The user api key
original_challege string The message that is received from a challenge request
signed_challege string The signed challenge message with user api secret

 

Sample Subscription Snapshot Data
{  
    "feed":"open_orders_verbose_snapshot",
    "account":"DemoUser",
    "orders":[  
        {  
            "instrument":"PI_XBTUSD",
            "time":11540375614896,
            "qty":480.0,
            "filled":0.0,
            "limit_price":6800,
            "stop_price":0.0,
            "type":"limit",
            "order_id":"97325f00-b901-46cb-9029-6b52209e3473",
            "direction":1
        },
        {  
            "instrument":"PI_XBTUSD",
            "time":1540375599232,
            "qty":310.0,
            "filled":0.0,
            "limit_price":6950,
            "stop_price":0.0,
            "type":"limit",
            "order_id":"403ee328-4a9c-469b-adcf-7c2461370700",
            "cli_ord_id":"5b9b4d66-217a-4b02-964f-8606d3dca57d",

            "direction":1
        },
    ]
}

Field

Type Description
feed string The subscribed feed
account string The user account

orders

list of structures A list containing the user open orders
instrument string The instrument (referred also as symbol or product_id) of the order
time positive integer The UTC time in milliseconds
qty positive float The remaining quantity of the order
filled positive float The amount of the order that has been filled
limit_price positive float The limit price of the order
stop_price positive float The stop price of the order
type string The order type, limit or stop
order_id UUID The order id
cli_ord_id UUID The unique client order identifier. This field is returned only if the order has a client order id
direction integer The direction of the order, either 0 for a buy order or 1 for a sell order

 

Sample Subscription Delta Data

{  
    "feed":"open_orders_verbose",
    "order":{  
        "instrument":"FI_XBTUSD_180316",
        "time":1516968136081,
        "qty":1000.0,
        "filled":0.0,
        "limit_price":90000.0,
        "stop_price":0.0,
        "type":"limit",
        "order_id":"87dfbc3b-ed52-4406-b2d8-f425d1620575",
        "cli_ord_id":"ee7e4e13-fe81-40fa-a0a0-5ca79a381418",

        "direction":1
    },
    "is_cancel":False,
    "reason":"new_placed_order_by_user"

}

{  
   "feed":"open_orders_verbose",
   "is_cancel":True,
   "reason':"cancelled_by_user",
   "order_id':"63b3eb8e-315e-4b52-81b6-b9351d9506f6",
   "cli_ord_id":"hello id1"
}

{  
   "feed":"open_orders_verbose",
   "is_cancel":True,
   "reason':"post_order_failed_because_it_would_be_filled",
   "order_id':"7193b8df-1dc5-4db9-930e-9816d5b45d62",
   "cli_ord_id":"hello id11"
}

Field

Type Description
feed string The subscribed feed

order

structure The user new order
instrument string The instrument (referred also as symbol or product_id) of the order
time positive integer The UTC time in milliseconds
qty positive float The quantity or the order
filled positive float The amount of the order that is filled
limit_price positive float The limit price of the order
stop_price positive float The stop price of the order
type string The order type, limit or stop
order_id UUID The order id
cli_ord_id UUID The unique client order identifier. This field is returned only if the order has a client order id
direction integer The direction of the order, either 0 for a buy order or 1 for a sell order
is_cancel boolean

If false the open order has been either placed or partially filled and needs to be updated. If true the open order was either fully filled, cancelled or rejected (for post-only). If it was filled or cancelled it must be removed from open orders snapshot.

reason string

Reason behind the received delta.

  • new_placed_order_by_user: User placed a new order
  • liquidation: User position liquidated. The order cancelled
  • stop_order_triggered: A stop order triggered. The system  removed the stop order
  • limit_order_from_stop: The system created a limit order because an existing stop order triggered
  • partial_fill: The order filled partially 
  • full_fill: The order filled fully and removed
  • cancelled_by_user: The order cancelled by the user and removed
  • contract_expired: The order contract expired. All open orders of that contract removed
  • not_enough_margin: The order removed due to insufficient margin
  • market_inactive: The order removed because market became inactive
  • cancelled_by_admin: The order removed by administrator's action

 

Sample Return if Unsuccessful 
{  
    "event":"error",
    "message":"Invalid product id"
}

Field

Type Description
event string Always error
message string

An error message out of:

  • Invalid feed
  • Json Error