One quote
Normalized price, route and impact for a single size.
Exit check
Can this whole position leave, and at what price?
Re-quote stream
A server-side SSE loop that holds one pair’s price live.
Rate limits
Quotes have their own 300 / minute budget.
md.read scope, which is on every key by default — existing
keys work with no changes.
The pages linked above explain the behaviour and its traps. For the precise
field-level reference, generated from our OpenAPI spec and with a try-it panel, see
API Reference → Spot. The spec itself is public at
/api/v1/openapi.json if you’d
rather generate a client.Four things to get right
Each of these silently corrupts a number if you assume rather than check, and each one fails in the direction that makes an untradeable position look fine.1. priceImpactPct is a PERCENT, not a fraction
1.5 means 1.5%.
2. Impact under 0.1% is noise — check impactMeasurable
The router caches its mid per route, so a very small size can report more impact
than a larger one on the same pair. When impactMeasurable is false, render ”—”
rather than the number.
3. A bigger size can quote a BETTER rate
The router re-solves for every size, and a different pool can win at a larger amount. A negativerealizedImpactPct is a real outcome, not an error — don’t
clamp it to zero and don’t treat it as a failure.
4. Absurd sizes return 200, not an error — check clamped
Past the router’s available liquidity you get a fabricated floor price with a 200
status, not a rejection. When clamped is true the number is an artifact.
Amounts are base units, as strings
Like the router itself,amount is atomic / base units, passed as a string
— a memecoin balance overflows a JSON number at 5+ decimals.
uiAmount in human units, but only alongside the
matching decimals field, because scaling without decimals would invent a number.
Anything that rounds to zero base units is rejected rather than treated as dust.
