Orders
Orders
Get Order Detail
Get order information by order id.
URL
https://big.one/api/contract/v2/orders/{id}
HTTP Request Method
GET
Request Parameters
Parameters | required | Type | Note |
---|---|---|---|
id | :white_check_mark: | string | Order id |
URL Request Example
https://big.one/api/contract/v2/orders/5aec8f9f-1609-4e54-0005-86e30e0cb1c6
Response Example
{
"liquidateUserId": null,
"side": "BUY", //
"meta": { //
"bestPrice": null, //
"markPrice": 10051.43, //
"bestPrices": { //
"ask": null, //
"bid": null //
} //
}, //
"userId": "5aec525e-335d-4724-0005-20153b361f89", //
"filledNotional": 0, //
"ts": 1562063567960, //
"notional": 0.102512, //
"status": "NEW", // Order status
"isLiquidate": false, //
"reduceOnly": false, //
"type": "LIMIT", // Order type
"symbol": "BTCUSD", // Contract type
"seqNo": null, //
"filled": 0, //
"conditional": null, //
"id": "5aec8f9f-1609-4e54-0005-86e30e0cb1c6", //
"size": 1000, // Contract amount
"avgPrice": 0, //
"price": 9755 //
}
Place Order
Place single order.
URL
https://big.one/api/contract/v2/orders
HTTP Request Method
POST
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
size | :white_check_mark: | number | Contract amount |
symbol | :white_check_mark: | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT |
type | :white_check_mark: | string | Order type, includes LIMIT , MARKET , IOC , FOK , POST_ONLY |
side | :white_check_mark: | string | BUY or SELL |
price | number | Order price | |
reduceOnly | boolean | A Reduce Only Order will only reduce your position, not increase it. If this order would increase your position, it is amended down or canceled such that it does not. | |
conditional | object | currently conditional type only have one option REACH , price types includes MARK_PRICE ,INDEX_PRICE ,MARKET_PRICE |
URL Request Example
https://big.one/api/contract/v2/orders
Request Body Example
{
"size": 1,
"symbol": "BTCUSD",
"type": "LIMIT",
"side": "BUY",
"price":8000,
"reduceOnly": false,
"conditional": {
"type": "REACH",
"price": 8000,
"priceType": "MARKET_PRICE"
}
}
Response Example
{
"meta": null,
"reduceOnly": false,
"symbol": "BTCUSD",
"type": "LIMIT",
"userId": "5aec525e-335d-4724-0005-20153b361f89",
"liquidateUserId": null,
"size": 1,
"notional": 0,
"status": "UNTRIGGERED",
"id": "5aed7b45-5d19-40f2-0005-ca49d01f33e3",
"side": "BUY",
"filledNotional": 0,
"seqNo": null,
"filled": 0,
"price": 8000,
"conditional": {
"type": "REACH",
"priceType": "MARKET_PRICE",
"price": 8000
}
}
Cancel Order
Cancel one order by order id.
URL
https://big.one/api/contract/v2/orders/{id}
HTTP Request Method
DELETE
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
id | :white_check_mark: | string | order id |
Request URL Example
https://big.one/api/contract/v2/orders/5aec8f9f-1609-4e54-0005-86e30e0cb1c6
No response content
Place Order in Batches
URL
https://big.one/api/contract/v2/orders/batch
HTTP Request Method
POST
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | :white_check_mark: | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT |
orders | :white_check_mark: | list | Explanations below |
Request Example URL
https://big.one/api/contract/v2/orders/batch
Request Body Example
{
"symbol": "BTCUSD",
"orders": [ // a list
{
"price": 11234, // price of the contract, is a number
"size": 200, // contract size, is a number
"side": "BUY" // BUY or SELL, is a string
}
]
}
Response Example
[
{
"liquidateUserId": null,
"price": 11234,
"size": 200,
"id": "5aedb78e-6641-4d00-0005-2b2439f84663",
"userId": "5aec525e-335d-4724-0005-20153b361f89",
"filledNotional": 0,
"ts": 1562141145497, // timestamp
"status": "NEW",
"isLiquidate": false,
"reduceOnly": false,
"type": "LIMIT",
"symbol": "BTCUSD",
"seqNo": null,
"filled": 0,
"conditional": null,
"side": "BUY",
"avgPrice": 0,
"meta": {
"markPrice": 11303.14,
"bestPrices": {
"ask": 11311,
"bid": 11305.5
},
"bestPrice": 11305.5
},
"notional": 0.017804
}
]
Cancel Order in Batches
URL
https://big.one/api/contract/v2/orders/batch
HTTP Request Method
DELETE
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT | |
ids | list | List of order ids |
Request Example URL
https://big.one/api/contract/v2/orders/batch
Request Body Example
{
"symbol": "BTCUSD",
"ids": [
"5aedb78e-6641-4d00-0005-2b2439f84663",
"5aed7b45-5d19-40f2-0005-ca49d01f33e3"
]
}
No response content
Get Order List
URL
https://big.one/api/contract/v2/orders
HTTP Request Method
GET
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT | |
id | string | Order id of previous response for pagination. | |
start-time | integer | Query starting time | |
end-time | integer | Query ending time. Will be overwritten by id | |
type | string | Order types, includes LIMIT , MARKET , IOC , FOK , POST_ONLY , ADL | |
side | string | BUY or SELL | |
status | string | Order status, includes NEW , PARTIALLY_FILLED , PARTIALLY_CANCELED , CANCELED , REJECTED , FILLED , UNTRIGGERED , PENDING_CANCEL , TRIGGERED , separated by comma | |
opt | string | TRIGGERED or LIQUIDATE | |
limit | number | Response size limit. |
If no parameter specified, then get all orders.
Request URL Example
Response Example
[
{
"liquidateUserId": null,
"id": "5aed94fc-703e-42a2-0005-578d4c468767",
"ts": 1562132083136, // timestamp
"side": "BUY",
"userId": "5aec525e-335d-4724-0005-20153b361f89",
"filledNotional": 0,
"notional": 0.102512,
"status": "NEW",
"isLiquidate": false,
"reduceOnly": false,
"type": "LIMIT",
"symbol": "BTCUSD",
"seqNo": null,
"filled": 0,
"conditional": null,
"size": 1000,
"avgPrice": 0,
"price": 9755,
"meta": {
"bestPrice": 11311,
"markPrice": 11536.1075491,
"bestPrices": {
"ask": 11311,
"bid": 11305.5
}
}
}
]
Get Active Order List
URL
https://big.one/api/contract/v2/orders/opening
HTTP Request Method
GET
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT | |
id | string | Order id of previous response for pagination. | |
start-time | integer | Query starting time | |
end-time | integer | Query ending time. Will be overwritten by id | |
limit | number | Response limit per request |
URL Request Example
Response Example
[
{
"liquidateUserId": null,
"ts": 1562125342068, // timestamp
"size": 1,
"notional": 0,
"side": "BUY",
"userId": "5aec525e-335d-4724-0005-20153b361f89",
"filledNotional": 0,
"isLiquidate": false,
"reduceOnly": false,
"type": "LIMIT",
"symbol": "BTCUSD",
"seqNo": null,
"filled": 0,
"meta": null,
"status": "UNTRIGGERED",
"avgPrice": 0,
"price": 8000,
"conditional": {
"type": "REACH",
"price": 8000,
"priceType": "MARKET_PRICE"
},
"id": "5aed7b45-5d19-40f2-0005-ca49d01f33e3"
}
]
Count Orders
URL
https://big.one/api/contract/v2/orders/count
HTTP Request Method
GET
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT | |
id | string | Order id of previous response for pagination. | |
start-time | integer | Query starting time | |
end-time | integer | Query ending time. Will be overwritten by id | |
type | string | one of LIMIT MARKET IOC FOK POST_ONLY , ADL | |
side | string | BUY or SELL | |
status | string | Order status, includes NEW , PARTIALLY_FILLED , PARTIALLY_CANCELED , CANCELED , REJECTED , FILLED , UNTRIGGERED , PENDING_CANCEL , TRIGGERED , deparetd by comma | |
opt | string | TRIGGERED LIQUIDATE |
Request Example URL
Response Example
{
"count": 1
}
Count Active Orders
URL
https://big.one/api/contract/v2/orders/opening/count
HTTP Request Method
GET
Request Parameters
Parameters | Required | Type | Note |
---|---|---|---|
symbol | string | Contract types, includes BTCUSD , BTCUSDT , ETHUSDT , EOSUSDT | |
start-time | integer | Query starting time | |
end-time | integer | Query ending time |
Request Example URL
https://big.one/api/contract/v2/orders/opening/count?symbol=BTCUSD&start-time=2020-03-06T15:59:59Z
Response Example
{
"count": 2
}