Welcome to the new WEEX API documentation. Looking for the previous version?Switch to the legacy docs
WEEX

Place Order (TRADE)

  • POST /capi/v3/order

Request Weight

1 on 10s order rate limit(X-ORDER-COUNT-10S); 1 on 1min order rate limit(X-ORDER-COUNT-1M); 0 on IP rate limit(X-USED-WEIGHT-1M);

Request parameters

ParameterTypeRequired?Description
symbolStringYesTrading pair, for example BTCUSDT.
sideStringYesOrder side. Supported values: BUY, SELL.
positionSideStringYesPosition side. Supported values: LONG, SHORT.
typeStringYesOrder type. Supported values: LIMIT, MARKET.
timeInForceStringConditionalTime-in-force policy. Required when type = LIMIT. Supported values: GTC, IOC, FOK, POST_ONLY.
quantityStringYesOrder quantity. Must be greater than 0.
priceStringConditionalLimit price. Required when type = LIMIT.
newClientOrderIdStringYesClient order identifier (1-36 characters, pattern ^[\\.A-Z\:/a-z0-9_-]{1,36}$).
tpTriggerPriceStringNoOptional take-profit trigger price.
slTriggerPriceStringNoOptional stop-loss trigger price.
TpWorkingTypeStringNoTake-profit trigger price source. Supported values: CONTRACT_PRICE, MARK_PRICE. Default CONTRACT_PRICE.
SlWorkingTypeStringNoStop-loss trigger price source. Supported values: CONTRACT_PRICE, MARK_PRICE. Default CONTRACT_PRICE.
reduceOnlyBooleanNoWhether the order is reduce-only.
Request example
PowerShellCode
curl -X POST "https://api-contract.weex.com/capi/v3/order" \ -H "ACCESS-KEY:*******" \ -H "ACCESS-SIGN:*******" \ -H "ACCESS-PASSPHRASE:*****" \ -H "ACCESS-TIMESTAMP:1659076670000" \ -H "Content-Type: application/json" \ -d '{ "symbol": "BTCUSDT", "side": "BUY", "positionSide": "LONG", "type": "LIMIT", "timeInForce": "GTC", "quantity": "0.01", "price": "69000", "newClientOrderId": "my-order-0001", "tpTriggerPrice": "70000", "slTriggerPrice": "68000", "TpWorkingType": "CONTRACT_PRICE", "SlWorkingType": "MARK_PRICE", "reduceOnly": false }'
Response parameters
FieldTypeDescription
orderIdStringOrder ID assigned by the system.
clientOrderIdStringEcho of newClientOrderId.
successBooleanWhether the order request was accepted.
errorCodeStringError code when success = false; otherwise empty.
errorMessageStringError message when success = false; otherwise empty.
Response example
JSONCode
{ "orderId": "702345678901234567", "clientOrderId": "my-order-0001", "success": true, "errorCode": "", "errorMessage": "" }