Find something... ⌘K

Maxy architecture / Performance

Speed and latency

Partners can build on Maxy's API with confidence. The HTTP API is stable: it only gains fields and routes, and any breaking change is announced at least 90 days ahead. Quotes answer with a median under a second, 95th percentile 2.5 seconds, and stay valid for 60 seconds, long enough for a user to review and sign. Every response carries a timing header and a request id, so partners can measure Maxy's latency for themselves. A sandbox can force every failure scenario, so partners can test each outcome before launch, and a nightly end-to-end run checks every failure branch. Uptime and response times: Stability.

How to measure Maxy's response times and keep your screens fast: timing headers, a price stream, many quotes in one call, and when to poll. It is for teams building a quote screen, a price list or a router.

Measure every answer

Every answer carries Server-Timing: total;dur=…, the milliseconds Maxy spent on it, and an x-request-id. A browser can read both. Log them, and quote the request id to Maxy when something is slow. The samples use the setup from Get a quote.

curlTypeScript
Copy
curl -s -o /dev/null -D - -H "x-maxy-key: $MAXY_API_KEY" "$BASE/price?from=ETH%20on%20base&to=BTC&amount=0.01" \ | grep -i -E '^(server-timing|x-request-id):'

Measured response times, uptime and the target, in one table: Stability.

The SDK adds the time your side saw: each answer's meta has latencyMs for the attempt that answered, requestId, and how many retries came before it, and onResponse hears about every attempt (Configure the SDK). Status shows the current time for prices and quotes.

Prices: ask freely

GET /price reserves nothing, so call it while the user types. The same question within 3 seconds is one read of the solver, and price reads have a rate limit of their own, ten times your key's, counted apart from every other call.

For a price that stays current on screen, open GET /prices/stream instead of polling. It sends the same answer as GET /price every 5 seconds or more (intervalSeconds). A connection counts as one request and lasts at most 2 minutes; its last event says to reconnect.

curlTypeScript
Copy
curl -sN -H "x-maxy-key: $MAXY_API_KEY" "$BASE/prices/stream?from=ETH%20on%20base&to=BTC&amount=0.01"

A browser's EventSource cannot send a key, so a page first asks POST /prices/stream-ticket with its publishable key and opens the stream with the ticket. The SDK does this for you.

Many quotes in one call

POST /quotes/batch takes up to 20 requests and answers each with its own status, requestId, and quote or error. One failing does not fail the rest. A request naming both addresses is a quote; the others are prices.

curl Copy
curl -s -X POST "$BASE/quotes/batch" -H "x-maxy-key: $MAXY_API_KEY" -H "content-type: application/json" \ -d '{"requests":[{"from":"ETH on base","to":"BTC","amount":"0.01"},{"from":"SOL","to":"BTC","amount":"1"},{"from":"AVAX","to":"BTC","amount":"5"}]}' \ | jq -c '.results[] | {index, status, receive: .quote.formatted.receive}'

Quotes: ask at the click

A quote is valid for 60 seconds: that is how long it can be used, not how long it takes to arrive. Ask for it when the user moves to confirm, count down from expiresAt by the clock in Maxy's Date header, and renew about 5 seconds before it closes. quotes.msUntilExpiry and quotes.refresh in the SDK do both: Request quotes.

With the full SDK, swap.prepareOrder does every read an ETH, BNB or AVAX order needs while the user reviews the quote, without signing anything. Confirming then only signs, sends and tells the solver.

Tracking: stream, then webhooks

NeedUse
The user is watchingGET /orders/{id}/events/stream, or poll GET /status every 2 seconds. orders.watch in the SDK streams, and falls back to polling from 1 second, backing off to 5
Your recordsWebhooks: one signed event per change, also when nobody is watching
The list of pairsGET /pairs, built fresh on every request in about 40 ms. The response may be cached for up to 60 seconds (private, max-age=60); the SDK re-reads it every 60 seconds. Read it again whenever you need the latest list

The user does not wait for Bitcoin confirmations on a buy: the order reads completed as soon as the BTC payment exists. What each step waits for: How a swap works.

Stay inside the limits

The SDK reads RateLimit-Remaining from each answer, and a burst waits for the minute to turn over instead of collecting 429s. Identical reads in flight share one request. Over HTTP, honour Retry-After. The limits: Keys and limits.