Place Order
Endpoint: /v1/spot/order/create
Request Method
POST (form)
Example
Bash
curl -X POST "https://oapi.websea.com/v1/spot/order/create" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Token: YOUR_TOKEN" \
-H "Nonce: 1700000000_abcd1" \
-H "Signature: GENERATED_SIGNATURE" \
-d "symbol=BTC-USDT" \
-d "type=buy-limit" \
-d "amount=1.343432" \
-d "price=32.3232145"
Request Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| symbol | Yes | string | BTC-USDT | Trading pair |
| type | Yes | string | buy-limit | Order type: buy-market (market buy), sell-market (market sell), buy-limit (limit buy), sell-limit (limit sell) |
| amount | Yes | float | 1.343432 | For limit orders, this is the order quantity. For market buy orders, this represents the amount to spend (quote currency, e.g. USDT). For market sell orders, this represents the quantity to sell (base currency, e.g. BTC) |
| price | No | float | 32.3232145 | Order price. Not required for market orders |
Response Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| errno | Yes | int | 0 | Status code |
| errmsg | Yes | string | success | Status message |
| result | Yes | object | See example | Result data |
Result Fields
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| order_sn | Yes | string | BL786401542840282676 | Order serial number |
| order_id | Yes | integer | 1231 | Order ID |