One-Click Close All Positions (May Fail)
Endpoint: /v1/futures/close_all
Request Parameters
Required
Method: POST
Example
Bash
curl -X POST "https://oapi.websea.com/v1/futures/close_all" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Token: YOUR_TOKEN" \
-H "Nonce: 1700000000_abcd1" \
-H "Signature: GENERATED_SIGNATURE" \
-d "symbol=EOS-USDT" \
-d "is_full=1"
Request Parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| symbol | No | string | EOS-USDT | Futures trading pair. If omitted, all trading pairs will be processed |
| is_full | No | int | 1 | Margin mode: 1 isolated margin, 2 cross margin. If omitted, both modes will be processed |
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 |
|---|---|---|---|---|
| failed | Yes | int | 0 | Number of failed operations |
| success | Yes | int | 1 | Number of successful operations |