Place Order
Create a new order, supporting both limit and market orders.
Interface Information
- Method:
POST - Path:
/api/v1/stock/open-api/order
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Stock symbol, e.g., AAPL |
| side | string | Yes | Trade direction: buy-buy, sell-sell |
| type | string | Yes | Order type: limit-limit, market-market |
| price | string | Conditional | Order price (required for limit orders) |
| quantity | string | Yes | Order quantity: limit orders and market sell orders in shares (base coin), market buy orders in amount (quote coin) |
| clientOid | string | No | Client-defined order ID (for idempotency) |
Request Example
{
"symbol": "AAPL",
"side": "buy",
"type": "limit",
"price": "185.50",
"quantity": "1000",
"clientOid": "my-order-001"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| code | int | Status code, 0 indicates success |
| msg | string | Status message |
| data | object | Response data |
| data.orderId | string | Order ID |
| data.clientOid | string | Client-defined order ID |
Response Example
{
"code": 0,
"msg": "success",
"data": {
"orderId": "123456789",
"clientOid": "my-order-001"
}
}