Place Order
Place Order
Create a new order. Supports limit orders, market orders, and orders with take profit/stop loss.
HTTP Request
POST
/api/perp-trade-api/trade/placeorder
Request Frequency Restriction:
- Recommended: no more than 10 times per second
Authentication Required:
- JWT Token required
- X-Wallet-Address header required
Request Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | JWT Token, format: Bearer {token} |
| X-Wallet-Address | string | Yes | Wallet address (signature address) |
Note
X-Wallet-Addressis the signature address in the request header- The signature address (may be a sub-account) and the order owner address (
creator) may be different when placing an order
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair, e.g., ETH-PERP |
| price | string | Yes | Price (BigInteger string) |
| quantity | string | Yes | Quantity (BigInteger string) |
| side | string | Yes | Trading direction: BUY (buy/open long) or SELL (sell/open short) |
| orderType | string | Yes | Order type: LIMIT (limit) or MARKET (market) |
| leverage | string | Yes | Leverage (BigInteger string) |
| salt | string | Yes | Signature salt (timestamp, milliseconds) |
| creator | string | Yes | Order owner main account address |
| orderSignature | string | Yes | Order signature |
| clientId | string | No | Client ID for order tracking |
| reduceOnly | boolean | No | Whether to reduce position only, default is false |
| triggerWay | string | No | Mark price trigger method, default is "oracle" |
| tpOrderType | string | No | Take profit order type: LIMIT or MARKET |
| tpTriggerPrice | string | No | Take profit trigger price |
| tpOrderPrice | string | No | Take profit order price (0 for market orders) |
| tpSalt | string | No | Take profit order signature salt |
| tpOrderSignature | string | No | Take profit order signature |
| slOrderType | string | No | Stop loss order type: LIMIT or MARKET |
| slTriggerPrice | string | No | Stop loss trigger price |
| slOrderPrice | string | No | Stop loss order price (0 for market orders) |
| slSalt | string | No | Stop loss order signature salt |
| slOrderSignature | string | No | Stop loss order signature |
Important Notes
saltmust be current timestamp (milliseconds), allowed error range: current time ± 5 minutes- If take profit/stop loss is set, the main order cannot be set to
reduceOnly=true - Market order price must be 0
- Price and quantity cannot be negative
- When take profit/stop loss exists, the main order cannot be a reduce-only order
Request Example
{
"symbol": "ETH-PERP",
"price": "2500000000000000000000",
"quantity": "1000000000000000000",
"side": "BUY",
"orderType": "LIMIT",
"leverage": "5000000000000000000",
"salt": "1700000000000",
"creator": "0xab7f6e97232d633689cf762989455cceb769587c69a9f09a23f537f5605f9e78",
"orderSignature": "0x123...",
"clientId": "my-order-001",
"reduceOnly": false,
"triggerWay": "oracle",
"tpOrderType": "LIMIT",
"tpTriggerPrice": "2600000000000000000000",
"tpOrderPrice": "2600000000000000000000",
"tpSalt": "1700000000001",
"tpOrderSignature": "0x456...",
"slOrderType": "MARKET",
"slTriggerPrice": "2400000000000000000000",
"slOrderPrice": "0",
"slSalt": "1700000000002",
"slOrderSignature": "0x789..."
}
Response Fields Description
| Name | Type | Description |
|---|---|---|
| data | string | Order hash (orderHash) |