Place Order
Description
Place order
HTTP Request
- POST /open/api/create_order
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes | the key is in the user api management |
| time | Long | Yes | it is the current timestamp |
| sign | String | Yes | the string is generated according to signature rule |
| symbol | String | Yes | coin pair, example: btcusdt |
| volume | String | Yes | this parameter means purchasing volume which is multi-meaning and reused field. When the type is 1, it means purchasing volume. When the type is 2, it means total amount that you want to purchase. |
| price | Integer | No | limit price, if the type is 2, this parameter isn't required |
| side | String | Yes | order side: BUY, SELL |
| type | Integer | Yes | order type: 1 limit,2 market |
| volumeType | Integer | No | order volume type 1 amount value volume, e.g. buy or sell with a total value of 1000 USDT. 2 base coin amount volume, e.g. buy or sell 1 BTC. If the order is limit order (type = 1), then volumeType must be 2. If it is market order (type = 2), whether it's a buy or sell order, volumeType can be either 1 or 2 |
| clientOrderId | String | No | Client order ID |
Request Example
http
curl --location 'https://openapi.100ex.com/open/api/create_order' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'api_key=*********&time=1743915906323&sign=*********&clientOrderId=client000001&price=72230&side=BUY&symbol=btcusdt&type=1&volume=0.1&volumeType=2'Response Parameters
| Parameter | Type | Description |
|---|---|---|
| order_id | Long | Order ID |
| clientOrderId | String | Client order ID |
Response Example
json
{
"code": "0",
"msg": "suc",
"data": {
"order_id": 443037583316877312,
"clientOrderId": "client000001"
},
"message": null,
"traceId": null
}Status Code
| Code | Description |
|---|---|
| 0 | success |
| 1 | system error |
| 5 | fail to place order |
| 9 | the trading was froze |
| 32 | the price is outside the allowable daily limit range, and the order cannot be placed |
| 33 | the order volume is over the maximum limit |
| 34 | the frequency of order placement is too high |
| 35 | placing orders is not allowed |
| 100004 | illegal parameter |
| 100005 | illegal sign |
| 100007 | illegal ip address |
| 100008 | the request time is expired |
| 10069 | market orders are not permitted for trading pairs with daily price limit restrictions. |
| 101115 | the current trading volume has surpassed the user's permitted daily trading limit. |
| 101117 | the coin does not allow market trading. |
| 101124 | This order will cause the holding of this coin to exceed the maximum limit. Please place a new order. |
| 101999 | this coin does not open |
| 210006 | this user isn't in the whitelist of open-api |
