Skip to main content

Basic Info

REST Basic Info

  • Some endpoints may require the user's API Key. Please refer to here for how to create an API Key.
  • The REST API base URL listed in this document: https://api.prex.world
  • All endpoint responses are in JSON format.
  • If a response contains an array, the array elements are sorted by time in ascending order — the earliest data comes first.
  • All times and timestamps are UNIX time in milliseconds, unless a field is explicitly documented as seconds.
  • All data types follow JAVA data type definitions.

Testnet API Info

  • The endpoints in this document can also be used on the testnet platform.
  • Testnet REST base URL: https://api.prex.world
  • Testnet WebSocket base URL: wss://api.prex.world/ws

Endpoint Basic Info

  • For GET endpoints, parameters must be sent in the query string.
  • For POST, PUT, and DELETE endpoints, parameters must be sent in the request body as JSON (Content-Type: application/json). Form-encoded bodies (application/x-www-form-urlencoded) are not supported, and query-string and body parameters cannot be mixed or merged. The authentication parameters (timestamp, signature) are the exception: they always go in the query string.
  • There is no requirement for parameter ordering.

Timestamp and recvWindow

  • Signed requests must include a timestamp parameter (UNIX time in milliseconds).
  • The server enforces a fixed ±60,000 ms window in both directions relative to server time. The recvWindow parameter is accepted but ignored — it does not change the window.
  • A timestamp outside the window is rejected during authentication with HTTP 401 and error code SIGNATURE_INVALID (see Error Codes).

Rate Limits

  • The application layer does not enforce per-endpoint rate limits or request weights. Traffic shaping is handled by the fronting nginx layer.
  • There is no 429/418 ban contract and no X-MBX-USED-WEIGHT-* response headers.
  • The rateLimits array returned by GET /fapi/v1/exchangeInfo contains static display values for SDK compatibility; it does not reflect enforced limits.

HTTP Return Codes

  • HTTP 4XX error codes indicate an invalid request — wrong content, behavior, or format.
  • HTTP 401 indicates an authentication failure (invalid API key, invalid signature, or timestamp outside the window).
  • HTTP 403 indicates the client IP is not in the API key's IP whitelist.
  • HTTP 404 may be returned when the requested resource (e.g. an order) does not exist.
  • HTTP 5XX error codes indicate an internal server error; the request may be retried after a short delay.

Endpoint Error Codes

Each endpoint may throw an exception. The exception response format is as follows:

{
"code": -1121,
"msg": "Invalid symbol: XYZUSDT"
}

For specific error codes and their explanations, see Error Codes.