Query Open Orders
Endpoint: /v1/spot/orders/open
Request Method
GET
Example
Bash
curl -X GET "https://oapi.websea.com/v1/spot/orders/open?symbol=BTC-USDT&limit=20" \
-H "Token: YOUR_TOKEN" \
-H "Nonce: 1700000000_abcd1" \
-H "Signature: GENERATED_SIGNATURE"
Query Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| symbol | No | string | BTC-USDT | Trading pair. Required when querying a specific trading pair; omit to query all trading pairs |
| from | No | int | 122 | Starting order_sn for pagination |
| direct | No | string | prev | Query direction. Default: prev (backward by time/ID); next (forward by time/ID). Example sequence: 1,2,3,4,5. With from=4, prev returns 3,2,1; next returns 5 |
| limit | No | int | 20 | Number of records per page. Default: 20, Maximum: 100 |
Response Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| errno | Yes | int | 0 | Status code |
| errmsg | Yes | string | success | Status message |
| result | Yes | array | See example | Result list |
Result Fields
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| order_id | Yes | integer | 121 | Order ID |
| order_sn | Yes | string | BL123456789987523 | Order serial number |
| symbol | Yes | string | MCO-BTC | Trading pair |
| ctime | Yes | string | 2018-10-02 10:33:33 | Order creation time |
| type | Yes | int | 1 | Order type: 1 = Market, 2 = Limit |
| side | Yes | string | buy | Order side: buy / sell |
| price | Yes | string | 0.123456 | Order price. For market orders (type=1), this value is 0 |
| number | Yes | string | 1.0000 | Order quantity. For market buy orders (type=1, side=buy), this value is 0 |
| total_price | Yes | string | 0.123456 | Order notional value. For market sell orders (type=1, side=sell), this value is 0 |
| deal_number | Yes | string | 0.00000 | Executed quantity |
| deal_price | Yes | string | 0.00000 | Average execution price |
| status | Yes | int | 1 | Order status: 1 = Open, 2 = Partially Filled, 4 = Canceling |
Response Example
JSON
{
"errno": 0,
"errmsg": "success",
"result": [
{
"order_id": 121,
"order_sn": "BL123456789987523",
"symbol": "MCO-BTC",
"ctime": "2018-10-02 10:33:33",
"type": "2",
"side": "buy",
"price": "0.123456",
"number": "1.0000",
"total_price": "0.123456",
"deal_number": "0.00000",
"deal_price": "0.00000",
"status": 1
},
{
"order_id": 122,
"order_sn": "SL123456789987523",
"symbol": "MCO-BTC",
"ctime": "2018-10-02 10:33:33",
"type": "2",
"side": "sell",
"price": "0.123456",
"number": "1.0000",
"total_price": "0.123456",
"deal_number": "0.00000",
"deal_price": "0.00000",
"status": 1
},
{
"order_id": 123,
"order_sn": "BM123456789987523",
"symbol": "MCO-BTC",
"ctime": "2018-10-02 10:33:33",
"type": "1",
"side": "buy",
"price": "0",
"number": "0",
"total_price": "1",
"deal_number": "0.00000",
"deal_price": "0.00000",
"status": 1
},
{
"order_id": 124,
"order_sn": "SM123456789987523",
"symbol": "MCO-BTC",
"ctime": "2018-10-02 10:33:33",
"type": "1",
"side": "sell",
"price": "0",
"number": "1.0000",
"total_price": "0",
"deal_number": "0.00000",
"deal_price": "0.00000",
"status": 1
}
]
}