GET /chains returns the EVM chains Olympex has enabled.
Swaps are non-custodial: Olympex never holds your funds or broadcasts a swap, and you sign and send every swap transaction from your own wallet. Limit orders and DCA strategies work differently. Olympex executes them on-chain: it pulls the tokens from the maker wallet under the allowance that wallet granted to the Olympex order contract, and sends the output back to that wallet. Order signatures and allowances explains the signature and the allowance that control this.
Base URL
Every endpoint lives under one base URL:GET, POST, PATCH and DELETE: POST and PATCH send a JSON body, and GET and DELETE send none. Send Content-Type: application/json on every request, including the public ones and those without a body. Without it, or with another type such as curl’s default application/x-www-form-urlencoded, a request with a body fails with 403 (Invalid body hash) on a signed endpoint or 400 (Invalid JSON body) on a public one.
Endpoints
Every endpoint is signed exceptPOST /accounts, which is public and needs only Content-Type: application/json. Signed endpoints also need the four signed headers described in Authentication.
Accounts and authentication
Quotes and swaps
Chains and tokens
Limit orders
DCA
The service also serves its own OpenAPI document and Swagger UI at the public
GET /openapi.json and GET /docs. OpenAPI specification explains why to build against the curated spec instead.
How the endpoints fit together
Swaps
- Create credentials once.
POST /accountsreturns an API key ID and a secret key. The password you send becomes your passphrase. - Pick a chain and tokens.
GET /chainsreturns the enabled chains, andGET /tokensthe tokens on each one with their decimals. Cache both. - Quote.
POST /quotesreturns the best route and theaggregatorIdof the liquidity source that produced it. - Build the transaction.
POST /swaptakes the same pair and amount, your walletaccountand thataggregatorId, and returns calldata. - Check it, then send it right away. For an ERC-20 input, approve
contractToApprovefor the exact amount if the allowance is too low. Runeth_estimateGason the exact transaction: a200from/swapdoesn’t guarantee that the calldata executes. If the estimate reverts, build again with the nextaggregatorIdin the quote’saggregatorOrder, or request a new quote for a cross-chain swap. Then sign and broadcast fromaccountat once. The calldata expires on-chain, after 5 minutes on most routes, and sooner on routes that include a market maker’s firm quote. - Track it. Poll
GET /transactions/{hash}with the chain ID untilstatusissuccessorreverted, or read the receipt from your RPC. For a cross-chain transfer, then pollPOST /tx-statuswith the source transaction hash, the source chain ID and thedexHashfrom/swap.
POST /support-chain checks a single chain at runtime. The guides walk through each flow: Execute a swap and Cross-chain swap end-to-end.
Limit orders and DCA
- Authorize the pair. The maker wallet signs one message per token pair, and approves the Olympex order contract for what its open orders need. Order signatures and allowances shows both steps.
- Create.
POST /limit-ordercreates an order that executes when the market reachespriceTriggeror better.POST /dca-order/strategiescreates a strategy that spendstotalAmountiniterationsequal orders, one everyfrequencyseconds. Nothing moves on-chain when you create either one. - Follow it. Poll
GET /limit-order/{id}for the order’sstatus. For a strategy, list its orders withGET /dca-order/strategies/{id}/orders. - Change or cancel.
PATCH /limit-order/{id}andDELETE /limit-order/{id}act only on a pending order: on any other status they return409 CONFLICT.PATCH /dca-order/strategies/{id}with{"status":"cancelled"}stops a strategy.
Response envelope
Every endpoint returns the same envelope, whatever its method, and every success is HTTP200, including creates (POST) and cancels (DELETE). success tells you which of data or error is present.
The API gateway in front of Olympex can also answer on its own, for example when a signing header is missing or a request runs past the gateway timeout. Those responses carry only a
message field. Conventions covers both shapes, every error code and the gateway responses.
Authentication
Olympex authenticates each signed request with an HMAC-SHA256 signature over the method, the path, the query, a timestamp, a single-use nonce and a hash of the body.POST /accounts gives you the three credentials: an API key ID, a secret key (a random string, shown once) and the passphrase you chose.
timestamp is the current Unix time in seconds, nonce is 24 new random hexadecimal characters, and bodyHash is the unpadded base64url SHA-256 of the exact body you send: the empty string for a GET or DELETE, which has no body. The method is uppercase. The path is the URL path you call, starting with /api/v1, without the query string. The canonical query is the query string with its parameters decoded, sorted by key and then by value, and percent-encoded again per RFC 3986, or the empty string when there is none. Headers signed for one request don’t work on another, and each nonce works once. Sign requests has the full algorithm and reference code.
GET and DELETE requests have no body: sign the empty string. The signature also covers the method, the path and the query, so headers signed for one request are rejected on any other. Sign right before you send, and treat each set of signed headers as a single-use credential.
Credentials explains what each credential is and how to store it.
API console
The API console signs requests in your browser and sends them straight to the API, so you can call every signed endpoint without writing code. Every signed endpoint page also has a Try it console, and Create an account has the one-click key creator. If your browser blocks a request, use the console’s Copy as cURL or create a key from a terminal. Use a test API key: these pages are hosted by Mintlify and load analytics. Limit orders and DCA strategies you create from the console are real.OpenAPI specification
The API is described by an OpenAPI 3.0.3 document with examples:How to read an endpoint page
Versioning
- The API version is part of the path (
/api/v1), and every endpoint reports it inmeta.version. - Within
v1, responses can gain new fields anderror.codecan gain new values. Ignore fields you don’t recognize, and handle an unknown code by its HTTP status. - Treat
aggregatorIdas an opaque string and pass it back exactly as the quote returned it./tx-statusreports each provider’s own status values: match the documented success and failure values and treat anything else as in progress. - Treat a limit order, DCA strategy or DCA order
statusyou don’t recognize as not final.
Where to start
Quickstart
Create a key, sign a request and get your first quote.
Sign requests
The signing algorithm, reference code in three languages and two known-answer vectors.
API console
Sign and send any endpoint from your browser.
Conventions
Methods, amounts, chain IDs, IDs, errors and request IDs.
