Operation Type (for Signing)
| Header Field | Type | Content |
|---|---|---|
"type" | string | "create_market_order" |
Request Body
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | User’s wallet address | 42trU9A5… |
“signature” | string | required | Cryptographic signature | 5j1Vy9Uq… |
“timestamp” | integer | required | Current timestamp in milliseconds | 1716200000000 |
”symbol” | string | required | Trading pair symbol | BTC |
”amount” | string | required | Order amount | 0.1 |
”side” | string | required | Order side (bid/ask) | bid |
”slippage_percent” | string | required | Maximum slippage tolerance in percentage, e.g. “0.5” means 0.5% max slippage | 0.5 |
”reduce_only” | boolean | required | Whether the order is reduce-only | false |
”client_order_id” | Full UUID string | optional | Client-defined order ID | f47ac10b-58cc-4372-a567-0e02b2c3d479 |
”take_profit” | object | optional | Take profit stop order configuration | See next five rows |
”stop_price” | string | required | Stop trigger price | 55000 |
”limit_price” | string | optional | Limit price for the triggered order | 54950 |
”client_order_id” | Full UUID string | optional | Client-defined order ID for the stop order | e36ac10b-58cc-4372-a567-0e02b2c3d479 |
”trigger_price_type” | string | optional | Price type used to trigger the stop order. Defaults to last_trade_price. Options: mark_price, last_trade_price, mid_price | mark_price |
”amount” | string | optional | Order amount for the triggered order. If omitted, the full position size is used | 0.1 |
”stop_loss” | object | optional | Stop loss order configuration | See next five rows |
”stop_price” | string | required | Stop trigger price | 48000 |
”limit_price” | string | optional | Limit price for the triggered order | 47950 |
”client_order_id” | Full UUID string | optional | Client-defined order ID for the stop order | d25ac10b-58cc-4372-a567-0e02b2c3d479 |
”trigger_price_type” | string | optional | Price type used to trigger the stop order. Defaults to last_trade_price. Options: mark_price, last_trade_price, mid_price | mark_price |
”amount” | string | optional | Order amount for the triggered order. If omitted, the full position size is used | 0.1 |
”agent_wallet” | string | optional | Agent wallet address | 69trU9A5… |
“expiry_window” | integer | optional | Signature expiry in milliseconds | 30000 |
”builder_code” | string | optional | Builder program code (3-16 alphanumeric characters) | MYCODE |
Response
- Status 200: Order created successfully
- Status 400: Bad request
- Status 500: Internal server error