Skip to main content

Orders

ContractOrders

Get Order Detail

Get order information by order id.

URL
https://big.one/api/contract/v2/orders/{id}
HTTP Request Method

GET

Request Parameters
ParametersrequiredTypeNote
id:white_check_mark:stringOrder 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
ParametersRequiredTypeNote
size:white_check_mark:numberContract amount
symbol:white_check_mark:stringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
type:white_check_mark:stringOrder type, includes LIMIT, MARKET, IOC, FOK, POST_ONLY
side:white_check_mark:stringBUY or SELL
pricenumberOrder price
reduceOnlybooleanA 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.
conditionalobjectcurrently 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
ParametersRequiredTypeNote
id:white_check_mark:stringorder 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
ParametersRequiredTypeNote
symbol:white_check_mark:stringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
orders:white_check_mark:listExplanations 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
ParametersRequiredTypeNote
symbolstringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
idslistList 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
ParametersRequiredTypeNote
symbolstringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
idstringOrder id of previous response for pagination.
start-timeintegerQuery starting time
end-timeintegerQuery ending time. Will be overwritten by id
typestringOrder types, includes LIMIT, MARKET, IOC, FOK, POST_ONLY, ADL
sidestringBUY or SELL
statusstringOrder status, includes NEW, PARTIALLY_FILLED, PARTIALLY_CANCELED, CANCELED, REJECTED, FILLED, UNTRIGGERED, PENDING_CANCEL, TRIGGERED, separated by comma
optstringTRIGGERED or LIQUIDATE
limitnumberResponse size limit.

If no parameter specified, then get all orders.

Request URL Example
https://big.one/api/contract/v2/orders?symbol=BTCUSD&type=LIMIT&side=BUY&status=NEW,PARTIALLY_CANCELED&limit=30&start-time=2020-03-06T15:59:59Z
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
ParametersRequiredTypeNote
symbolstringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
idstringOrder id of previous response for pagination.
start-timeintegerQuery starting time
end-timeintegerQuery ending time. Will be overwritten by id
limitnumberResponse limit per request
URL Request Example
https://big.one/api/contract/v2/orders/opening?symbol=BTCUSD&limit=30&start-time=2020-03-06T15:59:59Z
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
ParametersRequiredTypeNote
symbolstringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
idstringOrder id of previous response for pagination.
start-timeintegerQuery starting time
end-timeintegerQuery ending time. Will be overwritten by id
typestringone of LIMIT MARKET IOC FOK POST_ONLY, ADL
sidestringBUY or SELL
statusstringOrder status, includes NEW, PARTIALLY_FILLED, PARTIALLY_CANCELED, CANCELED, REJECTED, FILLED, UNTRIGGERED, PENDING_CANCEL, TRIGGERED, deparetd by comma
optstringTRIGGERED LIQUIDATE
Request Example URL
https://big.one/api/contract/v2/orders/count?symbol=BTCUSD&type=LIMIT&side=BUY&status=NEW,PARTIALLY_CANCELED&start-time=2020-03-06T15:59:59Z
Response Example
{
"count": 1
}

Count Active Orders

URL
https://big.one/api/contract/v2/orders/opening/count
HTTP Request Method

GET

Request Parameters
ParametersRequiredTypeNote
symbolstringContract types, includes BTCUSD, BTCUSDT, ETHUSDT, EOSUSDT
start-timeintegerQuery starting time
end-timeintegerQuery 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
}