REST is the HTTP-first interface for Polyester and is production-supported for real exchange integrations.
It is often the fastest way to ship because payloads are readable, tooling is familiar, and integration teams can debug quickly.
Polyester's custom contract-generation tooling derives the REST models, conversions, validation, and OpenAPI schemas from the same public Protobuf contracts used by ConnectRPC. This keeps shared API semantics aligned while allowing REST-specific representations such as decimal strings and text identifiers. Learn more in Protobuf contracts.
For trading orders, review Order Sizing, Fee Assets, and Preview Order. These pages show the REST field names alongside the canonical contract semantics.
When to use REST
Choose REST when you want:
- simple HTTP integration with broad ecosystem support
- human-readable request/response payloads
- easier debugging with existing API tools
- fast onboarding for teams that already know exchange REST patterns
Compare REST with typed and streaming interfaces in the Connectivity matrix.
Signing private requests
- no API-key signature required
- ideal for market data and discovery flows
Private endpoints use Ed25519 API key signing.
Common required headers:
X-API-KEY-IDX-API-TIMESTAMPX-API-SIGNATURE
X-API-NONCE is optional and is not part of the canonical signing string or an operation
idempotency key.
Use the full signing guide here: Ed25519 API keys. Replay policy and latency tradeoffs are documented here: API Key Replay Policy.
Pagination patterns
REST endpoints use multiple pagination styles depending on data shape and endpoint semantics.
| Pattern | Request fields | Response fields | Notes |
|---|---|---|---|
| Opaque cursor token | limit, page_token | next_page_token | Do not parse the token client-side; treat as opaque. |
| Time cursor | limit, before_ts_ns or since | next_before_ts_ns or next_cursor | Common for history/event timelines. |
| Offset pagination | limit, offset | total (or equivalent) | Practical for list views; can drift on rapidly changing datasets. |
General guidance:
- keep page sizes bounded and predictable
- always use the server-provided next cursor/token instead of constructing your own
- stop paginating when the next cursor/token is empty or zero (endpoint dependent)
Common REST integration patterns
- Readable payloads: decimal strings and text identifiers are common on REST surfaces for developer ergonomics.
- Idempotent writes: for endpoints that support request IDs, use stable request IDs to make retries safe.
- Retry discipline: retry transient failures with bounded backoff and jitter; do not blindly retry validation or auth errors.
- Transport hygiene: reuse HTTP connections and keep request/response handling lightweight.
Yes. REST is production-supported. Use the Connectivity matrix to compare it with ConnectRPC and streaming interfaces.
No. Cursor/token fields are opaque by contract. Store and replay them exactly as returned.
Continue with WebSocket JSON when your REST integration also needs live market or account updates.