open_order
websocket API shows the user's open orders.
1. Request
'type' should be either 'subscribe' or 'unsubscribe'
'channel' should be 'open_order'
param | type | description |
---|---|---|
type | string | 'subscribe' | 'unsubscribe' |
channel | string | 'open_order' |
// request
{
"type": "subscribe",
"channel": 'open_order'
}
or
// request
{
"type": "unsubscribe",
"channel": 'open_order'
}
2. Responses
param | type | description |
---|---|---|
channel | string | It will return 'open_order' |
data | OPEN_ORDER[] | Array of OPEN_ORDER. OPEN_ORDER type is described below. |
OPEN_ORDER type
column | type | meaning |
---|---|---|
id | string | specific id for the new order |
user_id | string | user id of the user who makes the order |
market_id | string | requested market_id |
side | string | "buy" or "sell" |
type | string | "limit" or "market" |
quantity | string | quantity |
limit_price | string | If type is limit, then order's price. |
time_in_force | string | selected time_in_force. |
filled_cost | string | The amount of filled cost. It is for market. |
filled_quantity | string | The amount of filled quantity. |
open_quantity | string | The amount of open quantity. |
cancelled_quantity | string | The amount of cancelled quantity. |
status | string | should be 'open'. |
time | Date | Order time. |
client_order_id | string | client_order_id. |
cost | string | cost of the transaction |
Error
'type' field in the request is neither 'subscribe' nor 'unsubscribe'.