Trading requests
Place new order (TRADE)
{
"id": "56374a46-3061-486b-a311-99ee972eb648",
"method": "order.place",
"params": {
"symbol": "BTCUSDT",
"side": "SELL",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "23416.10000000",
"quantity": "0.00847000",
"apiKey": "vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A",
"signature": "15af09e41c36f3cc61378c2fbe2c33719a03dd5eba8d0f9206fbda44de717c88",
"timestamp": 1660801715431
}
}
Send in a new order.
This adds 1 order to the EXCHANGE_MAX_ORDERS
filter and the MAX_NUM_ORDERS
filter.
Weight: 1
Unfilled Order Count: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
side | ENUM | YES | BUY or SELL |
type | ENUM | YES | |
timeInForce | ENUM | NO * | |
price | DECIMAL | NO * | |
quantity | DECIMAL | NO * | |
quoteOrderQty | DECIMAL | NO * | |
newClientOrderId | STRING | NO | Arbitrary unique ID among open orders. Automatically generated if not sent |
newOrderRespType | ENUM | NO | Select response format:
|
stopPrice | DECIMAL | NO * | |
trailingDelta | INT | NO * | See Trailing Stop order FAQ |
icebergQty | DECIMAL | NO | |
strategyId | LONG | NO | Arbitrary numeric value identifying the order within an order strategy. |
strategyType | INT | NO | Arbitrary numeric value identifying the order strategy. Values smaller than |
selfTradePreventionMode | ENUM | NO | The allowed enums is dependent on what is configured on the symbol. Supported values: STP Modes |
apiKey | STRING | YES | |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
signature | STRING | YES | |
timestamp | LONG | YES |
Certain parameters (*) become mandatory based on the order type
:
Order type |
Mandatory parameters |
---|---|
LIMIT |
|
LIMIT_MAKER |
|
MARKET |
|
STOP_LOSS |
|
STOP_LOSS_LIMIT |
|
TAKE_PROFIT |
|
TAKE_PROFIT_LIMIT |
|
Supported order types:
Order type |
Description |
---|---|
LIMIT |
Buy or sell |
LIMIT_MAKER |
This order type is also known as a POST-ONLY order. |
MARKET |
Buy or sell at the best available market price.
|
STOP_LOSS |
Execute a
I.e., when |
STOP_LOSS_LIMIT |
Place a |
TAKE_PROFIT |
Like |
TAKE_PROFIT_LIMIT |
Like |
Available timeInForce
options,
setting how long the order should be active before expiration:
TIF | Description |
---|---|
GTC | Good 'til Canceled – the order will remain on the book until you cancel it, or the order is completely filled. |
IOC | Immediate or Cancel – the order will be filled for as much as possible, the unfilled quantity immediately expires. |
FOK | Fill or Kill – the order will expire unless it cannot be immediately filled for the entire quantity. |
Notes:
-
newClientOrderId
specifiesclientOrderId
value for the order.A new order with the same
clientOrderId
is accepted only when the previous one is filled or expired. -
Any
LIMIT
orLIMIT_MAKER
order can be made into an iceberg order by specifying theicebergQty
.An order with an
icebergQty
must havetimeInForce
set toGTC
. -
Trigger order price rules for
STOP_LOSS
/TAKE_PROFIT
orders:stopPrice
must be above market price:STOP_LOSS BUY
,TAKE_PROFIT SELL
stopPrice
must be below market price:STOP_LOSS SELL
,TAKE_PROFIT BUY
-
MARKET
orders usingquoteOrderQty
followLOT_SIZE
filter rules.The order will execute a quantity that has notional value as close as possible to requested
quoteOrderQty
.
Data Source: Matching Engine
Response:
Response format is selected by using the newOrderRespType
parameter.
ACK
response type:
{
"id": "56374a46-3061-486b-a311-99ee972eb648",
"status": 200,
"result": {
"symbol": "BTCUSDT",
"orderId": 12569099453,
"orderListId": -1, // always -1 for singular orders
"clientOrderId": "4d96324ff9d44481926157ec08158a40",
"transactTime": 1660801715639
},
"rateLimits": [
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 50,
"count": 1
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"intervalNum": 1,
"limit": 160000,
"count": 1
},
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000,
"count": 1
}
]
}
RESULT
response type:
{
"id": "56374a46-3061-486b-a311-99ee972eb648",
"status": 200,
"result": {
"symbol": "BTCUSDT",
"orderId": 12569099453,
"orderListId": -1, // always -1 for singular orders
"clientOrderId": "4d96324ff9d44481926157ec08158a40",
"transactTime": 1660801715639,
"price": "23416.10000000",
"origQty": "0.00847000",
"executedQty": "0.00000000",
"origQuoteOrderQty": "0.000000",
"cummulativeQuoteQty": "0.00000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL",
"workingTime": 1660801715639,
"selfTradePreventionMode": "NONE"
},
"rateLimits": [
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"intervalNum": 10,
"limit": 50,
"count": 1
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"intervalNum": 1,
"limit": 160000,
"count": 1
},
{
"rateLimitType": "REQUEST_WEIGHT",
"interval": "MINUTE",
"intervalNum": 1,
"limit": 6000
,
"count": 1
}
]
}