POST
/api/v1/terminal/order
Permission: SMART_TRADES_WRITESecurity: SIGNED
Creates a new trade. This endpoint supports creating market and limit trades, including optional conditional triggers, trailing stops, timeouts, and leverage settings (for OKX Futures).
Request Parameters
9account_idinteger required
ID of the exchange account. Use GET /api/v1/accounts to retrieve available accounts.
pairstring required
Trading pair in format like USDT_BTC or BTC_ETH.
orderobject required
Details of the trade order.
unitsobject required
Amount to buy or sell in base currency units.
priceobject
Price settings, required for limit orders.
conditionalobject required
Optional conditional order configuration.
trailingobject required
Optional trailing stop configuration.
timeoutobject required
Optional timeout for conditional trades.
leverageobject
Optional leverage configuration (OKX Futures only).
Example Trade Types
create_trade_market_buy.json
POST /quentrade/trades Example Responses
If successful, the response includes trade ID, current status, and execution metadata.
create_trade_201.json
201 Created