Limits at a glance
Rate limits
Olympex limits how many requests each API account sends to each endpoint. Over a limit, the API answers429 with the code RATE_LIMIT_EXCEEDED, and the request doesn’t run.
- Per account. Every API key of an account counts toward the same limits, so signing with more keys doesn’t raise them.
- Per endpoint. Each row of the tables below has its own count. A
429from one endpoint doesn’t block the others. - Over 60 seconds. A limit counts the account’s requests over a 60-second window, except key rotation and revocation, which count over an hour. Requests that end in an error, such as a
404, count too. - No counter in responses. Responses don’t say how many requests you have left, when the count resets, or which plan the account is on.
Limits per plan
New accounts are on the default plan. The partner and enterprise plans raise the limits: contact partners@olympex.io to move to one.
Values are requests per minute, per account.
Key management limits
These limits are the same on every plan:
Over these limits, the message is
"Too many key administration requests". If Olympex can’t check them, rotation and revocation return 503 SERVICE_UNAVAILABLE and change nothing, while listing keys keeps working. Retry after a few seconds, and repeat a rotation with its same Idempotency-Key and body.
When you get a 429
429
- Wait before you send it again. Wait about a minute, or up to an hour after a
429from key rotation or revocation. Don’t retry at once or in a loop: retries count toward the limit too. - Nothing ran. The request was refused before it ran, so a create that gets a
429created nothing. Send it again after the wait. - Keep the rest running. Other endpoints have their own limits and keep answering.
- It isn’t a credential problem. Don’t ask your users to sign in again, and don’t rotate the key: a
429means slow down.
429 with {"message":"Too Many Requests"} when it receives too many requests in a short time. Handle it the same way.
Stay under the limits
- Cache the catalog. Keep the results of
GET /chainsandGET /tokensinstead of calling them before every quote. The token list is large and changes rarely: cache it for 24 hours, for example. - Quote on intent. Wait until a user stops typing an amount before you request a quote, instead of quoting every keystroke.
- Poll slowly. Poll
POST /tx-statusevery 15 to 30 seconds per transfer. Across all the transfers and transactions you follow, keep each status endpoint under one request per second for the account. - Pace bursts. Queue requests on your side, so a burst, such as a batch of order updates, stays under the limit of each endpoint.
- Block repeat creates. After a
429fromPOST /dca-order/strategiesorPOST /limit-order, stop offering the create for a minute instead of letting users click again. - Plan for volume. Before you launch, email partners@olympex.io with your expected volume and peak request rate per endpoint, and ask about the partner or enterprise plan if the default limits are too low.
Timestamp window
The server rejects a request whose timestamp is more than 300 seconds before or after server time. A timestamp exactly 300 seconds old is accepted, and one 301 seconds old is rejected.- Use Unix time in seconds. A millisecond timestamp is always outside the window.
- Keep your server clock synchronized with NTP.
- Sign immediately before you send. Don’t sign requests ahead of time, queue signed requests or cache headers.
Nonce reuse
The server rejects a nonce it has already seen in the last 5 minutes. Generate a new nonce, 24 hexadecimal characters from 12 cryptographically secure random bytes, for every attempt, retries included. A retry that resends the headers of an earlier attempt fails with403.
Gateway timeout
The API gateway ends a request that runs longer than about 30 seconds and answers500 with {"message":"Internal Server Error"} or 503 with {"message":"Service Unavailable"}. Neither response has meta.requestId. Both carry an ID in the apigw-requestid response header: log it on your server, because browsers can’t read it on cross-origin calls.
- Set your HTTP client timeout a little above 30 seconds, so the gateway’s answer arrives before your client gives up. The TypeScript and Python reference implementations use 35 seconds. With curl, add
--max-time 35. - Retry timeouts with exponential backoff and jitter, signing every attempt again. See Errors and retries.
Calldata expiry
The calldata thatPOST /swap returns carries an on-chain expiry: 5 minutes on most routes. Some routes include a market maker’s firm quote that expires sooner, within seconds of the build. The calldata is also bound to the account you passed, and another Olympex swap from the same account can invalidate earlier calldata.
Quotes aren’t reserved either: prices move between the quote and the swap. Request the swap right after the quote, call POST /swap right before the user signs, and broadcast the transaction at once. Run eth_estimateGas first: a 200 from POST /swap doesn’t guarantee that the calldata executes. If the estimate reverts, don’t send. Build the swap again with the next dexHash in the quote’s aggregatorOrder, or, for a cross-chain transfer, request a new quote. If you miss the window, request a new quote and a new swap.
Integrator fee
The optionalfees object on POST /quotes and POST /swap sets your own fee on a route. Send the same fees on both, so the quote you show matches the calldata you send:
feeBpsis an integer from 0 to 100, in basis points:100is 1%.feeRecipientis the EVM address that receives the fee. It is required whenfeeBpsis greater than 0, and the zero address is rejected.- Fees apply only to signed requests from API accounts.
- A child account of a partner can’t call
POST /quotesorPOST /swap: it gets403FORBIDDEN. The partner account signs quotes and swaps.
integratorFeeBreakdown.
Key rotation
POST /accounts/me/keys/rotate checks these values and returns 400 VALIDATION_ERROR outside them:
gracePeriodSecondsis an integer from 60 to 604800 (7 days). The default is 86400 (24 hours).- The
Idempotency-Keyheader is required, not empty, and at most 200 characters. reason, on a rotation or a revocation, is at most 200 characters.
Idempotency-Key, body and signing key returns the new secret key until secretRecoverableUntil, 15 minutes after the rotation. After that, no endpoint returns that secret key again. A graceful retry also needs the old key to be in its grace period, so the deadline is the earlier of the two times.
An account can send 5 rotation requests and 10 revocation requests per hour, retries included. See Key management limits.
Request bodies and numbers
- The body of every
POSTandPATCHrequest is a JSON object, sent withcontent-type: application/json.GETandDELETErequests have no body: sign the empty string, send no body, and send the content type anyway. See Requests without a body. - Types are strict. A number where the API expects a string, or the reverse, returns
400 VALIDATION_ERROR. For example,chainIdis a JSON integer in every request body:"137"returns400. - Quote, swap and limit-order amounts, prices and slippage are decimal strings. DCA’s
totalAmount,slippage,minPriceandmaxPricemust be JSON numbers. - The reference signers canonicalize numbers the way JavaScript does, so fractional numbers sign correctly. If you write your own signer in another language, format numbers exactly as JavaScript’s
JSON.stringifydoes:1.0becomes1,1e21becomes1e+21, and0.0000001becomes1e-7. - Keep integers between
-9007199254740991and9007199254740991, that is ±(253 − 1). The server parses JSON numbers as JavaScript doubles, so a larger integer loses precision and no longer matches the hash you signed. - Keep object keys in ASCII and never numeric. See the portability rules.
Order allowances
Limit orders and DCA strategies execute against the maker wallet’s ERC-20 allowance to the Olympex order contract on that chain. The allowance is the on-chain limit on what Olympex can move, so size it to your open orders:- A limit order needs
amountofinTokenAddressplus the execution gas cost, which Olympex takes ininTokenAddress. The API doesn’t return that cost: estimate it from a single-chainPOST /quotesfor the order’s pair and amount, as itsestimatedGastimes the chain’s gas price, converted toinTokenAddress, and add a buffer, because gas prices move. See Gas and fees. - A DCA strategy needs
totalAmountoftokenAddressFrom, with no extra fee on top. - Every open limit order and active DCA strategy that sells the same token on the same chain shares one allowance: approve the sum.
Lists
GET /limit-order, GET /dca-order/strategies, GET /dca-order/strategies/{id}/orders and GET /tokens return every matching item in one response. There is no pagination.
Narrow the limit-order list with status, chainId or accountTo, and the strategy list with status or accountTo. These lists ignore any other query parameter, so a misspelt or unsupported filter returns the full list. Send each parameter once: a repeated parameter matches nothing. Cache the token list on your side.
What this means for your integration
- Stay under your plan’s rate limits: cache the chain and token lists, poll slowly, and wait about a minute after a
429instead of retrying in a loop. - Sign immediately before each send, with a synchronized clock and a new nonce.
- Set your client timeout a little above 30 seconds, and retry timeouts and
500-class errors with backoff and jitter. - Broadcast calldata right after
POST /swap, onceeth_estimateGaspasses, and request a new quote and swap if you miss the window. - Send amounts and decimals as strings (JSON numbers in DCA strategies), approve only what your open orders need, and talk to Olympex about your expected volume before launch.
Related
Errors and retries
Which failures to retry, and how.
Sign requests
The timestamp, nonce and body rules in the signing algorithm.
Execute a swap
Quote, build and broadcast inside the calldata window.
Going to production
The checklist before you send real traffic.
