Place an Order
API Description
This interface allows users to place spot trading orders by specifying the order type, quantity, price, and an external transaction number.
Note: Historical Orders is only available via RESTful API.
Precautions
- For market orders, user can specify either "funds" or "amount".
- For limit order, user need to specify "amount"
Authentication
This is a private interface and requires authentication. For details on using the RESTful API, refer to Common > Authentication & Code Snippet > Spot > RESTful Private Interface.
Request Method
POST
Endpoint
/api/v1/private?command=doTrade
Frequency Limit
The frequency limit for this interface is 30 requests/2s per user ID. In addition to this per-interface limit, a global rate limit is also enforced.
For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| symbol | True | String | Trading instrument such as: BTC_USDT |
| type | True | String | Trade direction: 0: Buy order, 1: Sell order. |
| amount | False | String | Order size in base currency. Note: Mandatory for limit order. |
| rate | False | String | Order price specified by user (for Limit order only) |
| funds | False | String | Order size in quote currency. Note: Valid only for market orders. |
| isMarket | True | String | Order type: true: market order, false: limit order. |
| out_trade_no | True | String | A custom order ID for API Broker spot orders must follow the format APIBROKER_{brokerId}-{random_number}.Example: APIBROKER_26-20261106155941. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| orderNumber | String | Order id |