Subscribe
Request Body
| Parameter | Type | Description |
|---|---|---|
method* | string | Must be "subscribe" |
subscription* | object | See below |
subscription.type* | string | Must be "userOrderRejections" |
subscription.user* | string | Your wallet address (lowercase), e.g., "0x742d35cc6634c0532925a3b844bc9e7595f0beb" |
Response
Subscription Confirmation:Rejection Fields
| Field | Type | Description |
|---|---|---|
orderId | string | Order ID that was rejected |
coin | string | Asset symbol (BTC, ETH, etc.) |
reason | string | Human-readable rejection reason |
code | string | Machine-readable error code |
timestamp | number | Rejection time in milliseconds |
Rejection Codes
| Code | Description |
|---|---|
INSUFFICIENT_MARGIN | Not enough margin to open position |
INVALID_PRICE | Price outside valid range for market |
INVALID_SIZE | Size doesn’t meet minimum/maximum requirements |
REDUCE_ONLY_VIOLATION | Reduce-only order would increase position |
MAX_LEVERAGE_EXCEEDED | Order would exceed maximum leverage limit |
DUPLICATE_ORDER | Order with same ID already exists |
MARKET_CLOSED | Market is not currently accepting orders |
RATE_LIMITED | Too many orders submitted in short time |
INVALID_SIGNATURE | Order signature verification failed |
Unsubscribe
Notes
- Rejections sent in real-time as they occur
- User address must be lowercase
- Rejection codes are standardized for programmatic handling