EX5 API · REST & WEBSOCKET
Errors & rate limits
Every error carries a machine-readable key. This page lists the error formats, the HTTP status codes in use and the rate limits of the REST and WebSocket APIs.
Error format
| Source | Body |
|---|---|
| Authentication (all services) | {"errors":["authz.invalid_session"]} — sent with Content-Type: text/plain; parse the body as JSON anyway. |
Market data, account, wallet (/api/v2/peatio) | {"errors":["public.market.doesnt_exist"]} — an array of keys. |
Order entry (/api/v2/finex) | {"error":"error.invalid_request"} — a single key. Rate limiting answers the JSON string "Too Many Requests". |
HTTP status codes
| Status | Meaning |
|---|---|
200 / 201 / 204 | Success; 201 for created resources (including accepted orders), 204 for deletions. |
400 | Malformed JSON or an invalid field. |
401 | Authentication failed, or the account may not perform the action. |
403 | Account level too low for the endpoint. |
404 | Unknown route or record. |
422 | Validation error, for example an unknown market or an out-of-range limit. |
429 | Order-entry rate limit exceeded. |
503 | Too many requests or connections from your IP address. |
500 | Server error; retry later and contact support with the x-request-id header. |
Common error keys
| Key | What to do |
|---|---|
public.market.doesnt_exist | Check the market id against GET /api/v2/peatio/public/markets. |
pagination.invalid_limit | Use a page size between 1 and the endpoint's maximum. |
account.withdraw.not_permitted | Your account level is below the requirement (level 3 for withdrawals). |
order.action_level.not_permitted | Placing orders needs account level 2 (verified phone number). |
error.invalid_request | The order breaks a market rule: precision, minimum amount or price range. |
error.bad_request | Invalid JSON or field format — for example a decimal in exponent notation. |
authz.nonce_expired | Synchronise your clock; the nonce must be within 5 seconds of server time. |
authz.invalid_signature | Sign the string nonce + kid with your secret, hex-encoded. |
For authentication errors see the full list.
Rate limits
| Scope | Limit | When exceeded |
|---|---|---|
| All requests, per IP address | About 260 requests per minute with short bursts; 100 concurrent connections (WebSockets included) | 503 |
| Order entry (create, cancel, cancel all), per account | 50 requests per 10 seconds | 429 "Too Many Requests" |
| WebSocket messages you send | At most 512 bytes each | Connection closed with code 1009 |
These are the current values and can change. Back off exponentially after a 429 or 503, cache market and currency lists, and use WebSocket streams instead of polling tickers or order books.