Skip to main content

Use REST when the job is request-response lookup

REST is the right entry point when you need:
  • public request-response market data or stats lookups
  • initial snapshots before you hand off to realtime updates
  • private request submission through the signed and encrypted operator write path
  • a deterministic source-artifact trail for the currently published public REST contract
Use Realtime Quickstart instead when the main job is streaming market data, live account updates, or reconnect-aware event handling.

Base URL rule

ContractMeaning
Generated endpoint pathsTreat them as deployment-relative paths, not as a single fixed host guarantee
Current public examplesPublic docs may show the active hosted domain in surrounding examples, but that is not the same thing as a canonical OpenAPI servers[] declaration
Adjacent private write pathGET /v2/encryption-key and POST /v2/request live under the target deployment base URL where used, but they are documented manually rather than through the generated public Swagger bundle

Quickstart map

Strong API docs do not treat authentication, limits, and errors as footnotes. A complete DerivaDEX REST integration usually needs all of the routes below:
ConcernStart hereWhy it matters
Authentication and private-write postureAuthenticationPrivate request submission depends on signing, replay-window handling, and encryption
Throughput and retry planningRate LimitsBuilders need to budget request patterns before they hit production traffic
Failure handlingErrorsRecovery behavior differs materially across 4xx, 421, 422, 429, and 503 classes
Endpoint and schema discoveryGenerated Reference StatusShows which public REST surfaces are generated and how to find them
Source-of-truth ownershipSource ArtifactsKeeps the generated/public contract tied to the right repo-owned artifacts
SDK and example postureExamples and SDKsStates what public code-starting points exist today and what does not

The two main REST entry paths

PathWhat it coversPrimary routes
Public read pathMarket data, stats, and initial state lookupGenerated REST reference plus family-level auth/rate-limit/error pages
Adjacent private write pathTrading and account-affecting requests submitted to the operatorAuthentication, How to Sign DerivaDEX Requests with EIP-712, How to Encrypt Requests for the Operator
The difference matters because public reads do not carry the same signer, replay-window, and encryption burden as private writes.

A typical REST integration shape

StageWhat builders usually do next
Choose transportConfirm the job is request-response rather than streaming
Read public contract ownershipCheck generated-reference status and source artifacts
Implement auth correctlyAdd signing, replay-window fields, and encryption for private writes
Add resilienceBudget rate limits and classify errors before shipping
Pair with realtimeUse REST for bootstrap and realtime for ongoing updates when the client needs live state

Scope rule

REST is not the whole platform interface. DerivaDEX integrations often use REST and realtime together:
  • REST for bootstrap and deterministic request-response lookup
  • realtime for live deltas and account/order updates
Treat the two families as complementary rather than interchangeable.

Next routes

Last modified on April 13, 2026