Skip to main content

Place Order

Info
  • This endpoint requires signature. For specific signature rules, please refer to Authentication
  • This endpoint will trigger rate limit. For specific rules, please refer to Rate Limit.

HTTP request

POST /spot/order

Request parameters

Parameter NameRequiredTypeNotes
markettruestringMarket name
market_typetruestringMarket type.
Note: In spot related functions, only SPOT or MARGIN can be used.
In futures related functions, only FUTURES can be used.
sidetruestringOrder side
typetruestringOrder type
ccyfalsestringCurrency name. When the order type is market, you can select and place orders by specifying the currency name.
The currency name can only be selected from the base currency or quote currency in the market.
For example, in the BTCUSDT market, you can choose either BTC or USDT.
amounttruestringOrder amount
pricefalsestringOrder price
client_idfalsestringUser-defined ID
client_id is the custom ID of the order. The server will return the user-defined client_id in the order response, and will also use client_id as an identifier to batch cancel orders. For details, see the related endpoint in Cancel Order via client_id.
Currently it only supports uppercase and lowercase letters, numbers, hyphens, and underscores in 32 bytes.
is_hidefalseboolWhether to hide the orders. Default as: false
Hide this order, it will be hidden in the public depth information, but displayed in your own depth subscription response
stp_modefalsestringSelf-trading protection mode.
ct: Cancel remaining Taker orders immediately
cm: Cancel remaining Maker orders immediately (remaining taker orders are not affected if set as limit price orders, remaining untaken taker orders continue to stand with limit price)
both: Cancel remaining Taker and Maker orders immediately
Note: During the auction period, stop order stp_mode is not effective

Return parameters

Parameter NameTypeNotes
order_idintOrder ID
marketstringMarket name
market_typestringMarket Type
sidestringOrder side
typestringOrder type
ccystringCurrency name
amountstringOrder amount
pricestringOrder price
unfilled_amountstringThe remaining unfilled amount
filled_amountstringFilled amount
filled_valuestringFilled value
client_idstringClient ID
base_feestringTrading fee charged in base currency
quote_feestringTrading fee charged in quote currency
discount_feestringTrading fee charged in deduction currency
maker_fee_ratestringMaker fee rate
taker_fee_ratestringTaker fee rate
last_filled_amountstringFilled amount of the last transaction
last_filled_pricestringFilled price of the last transaction
created_atintOrder creation time
updated_atintOrder update time

Request example

// Place a limit order
{
"market": "CETUSDT",
"market_type": "MARGIN",
"side": "buy",
"type": "limit",
"amount": "10000",
"price": "1",
"client_id": "user1",
"is_hide": true
}

// Place a market order
{
"market": "CETUSDT",
"market_type": "MARGIN",
"side": "buy",
"type": "market",
"amount": "100",
"ccy": "CET",
"client_id": "user1",
"is_hide": true
}

Response example

{
"code": 0,
"data": {
"order_id": "13400",
"market": " CETUSDT",
"market_type": "MARGIN",
"ccy": "CET",
"side": "buy",
"type": "limit",
"amount": "10000",
"price": "1",
"ccy": "CET",
"unfilled_amount": "50241.7185224371",
"filled_amount": "27564.87468358",
"filled_value": "27564.87468358",
"client_id": "client_id_1",
"base_fee": "11.6582326221",
"quote_fee": "0",
"discount_fee": "0",
"maker_fee_rate": "0",
"taker_fee_rate": "0.0003",
"last_fill_amount": "27564.87468358",
"last_fill_price": "1",
"created_at": 1691482451000,
"updated_at": 1691482451000
},
"message": "OK"
}