Executes a trade by automatically routing it to the exchange with the best price, or to a preferred exchange if specified.
POST/api/trade/executeContent-Type: application/jsonAuthorization: Bearer <token>| Field | Type | Required | Description |
|---|---|---|---|
symbol | string | ✅ | Trading pair symbol (e.g., “BTC”, “ETH”) |
side | string | ✅ | Order side: BUY or SELL |
type | string | ✅ | Order type: MARKET or LIMIT |
quantity | string | ✅ | Amount of base asset to trade |
price | string | ❌ | Limit price. Required if type is LIMIT |
reduceOnly | boolean | ❌ | If true, the order will only reduce an existing position (default: false) |
preferredExchange | string | ❌ | Force execution on a specific exchange: hyperliquid, aster, or lighter |
| Field | Type | Description |
|---|---|---|
data.executedOn | string | Exchange where the order was executed |
data.order.orderId | string | Unique order identifier |
data.order.symbol | string | Trading pair symbol |
data.order.status | string | Order status (e.g., “FILLED”) |
data.order.price | number | Execution price |
data.order.quantity | number | Order quantity |
data.order.side | string | Order side (“BUY” or “SELL”) |
data.routing.recommended | string | Recommended exchange |
data.routing.price | number | Best execution price |
data.routing.reason | string | Reason for exchange selection |
data.routing.savings | number | Estimated savings vs next-best venue |
data.routing.savingsPercent | number | Savings as percentage |
data.routing.alternatives | object | Pricing from all available exchanges |
data.execution.latencyMs | number | Execution latency in milliseconds |
JWT token for authentication. Required for smart order execution.
Trading pair symbol (e.g., 'BTC', 'ETH')
"BTC"
Order side
BUY, SELL Order type
MARKET, LIMIT Amount of base asset to trade
"0.1"
Limit price. Required if type is LIMIT
If true, the order will only reduce an existing position
Force execution on a specific exchange
hyperliquid, aster, lighter