API Reference

Place Order

Rate Limit: 1200 requests per 60 seconds

Tip:
You can create order by websocket after login.

Request

{
  "id": "XXX",
  "action": "place_order",  
  "args":  
  {  
     "clientOrderId": "XXXX",  
     "sym": "BINANCE_SPOT_BTC_USDT",  
     "side": "BUY",
     "orderType": "LIMIT",
     "timeInForce": "GTC",
     "orderQty": "1000",
     "limitPrice": "60000",
     "reduceOnly": "false"
   }  
}

Field nameTypeNecessaryRemarks
idStringNclient request id
actionStringYplace_order
argsObjectYrequest params
> clientOrderIdStringNCustomer defined order ID ,only support letters(a-z) and numbers(0-9)
> symStringYSym(unique identifier:Exchange_Business_Base_Counter.
Example:
If you want to place a SPOT order for the BTC/USDT trading pair on the Binance exchange, you can use a unique identifier like this: "BINANCE_SPOT_BTC_USDT" ;
If you want to place a PERPETUAL order for the BTC/USDT trading pair on the Binance exchange, you can use a unique identifier like this: "BINANCE_PERP_BTC_USDT" ;
)

Note that we currently only support the SPOT and PERPETUAL trade of Binance and OKX.
> sideStringYSide(BUY, SELL)
> orderTypeStringYOrder type(default LIMIT, support type enums:LIMIT,MARKET)
> timeInForceStringNTimeInForce (default GTC, support type enums:GTC,IOC,FOK,GTX),
GTX = GTC + Post only
> orderQtyStringNOrder quantity(Mandatory, unless spot market buy ) note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
> limitPriceStringNLimit order price(Mandatory for limit order)
> quoteOrderQtyStringNOrder quote quantity, only use for spot market buy order
> reduceOnlyStringNReduce position orders only, must "true" or "false"

Response

Success example:

{
  "id": "XXXX",
  "event": "place_order",  
  "code": "0",  
  "msg": "",
  "data": {
    "orderId": "XXXXX",
    "clientOrderId": "XXXXX"
  }
}

Fail example:

{  
  "id":"***",
  "event": "error",  
  "code": "60009",  
  "msg": "CreateOrder failed."  
}
Field nameTypeRemarks
idStringclient request id
eventStringEvent
codeStringCode
msgStringMsg
dataObjectresponse data
> orderIdStringOrder ID
> clientOrderIdStringCustomer defined order ID