Skip to main content
Quotes come from OceanX’s own router on our execution VM in Frankfurt — the same engine the OceanX app trades against. Route computation is typically 1–2ms, so your end-to-end latency is dominated by the network rather than by us. These endpoints are read-only. They quote; they never build, sign or submit a transaction.

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.
All three need the 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%.
Jupiter’s priceImpactPct is fractional0.4485 for the same 44.85%. Code ported from Jupiter is off by 100x, in the direction that makes a trapped bag look tradeable.

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 negative realizedImpactPct 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.
Never present a clamped quote as proceeds. It is the router running out of liquidity, not a price anyone can fill at.

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.
Every endpoint also accepts 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.

Errors

Standard error envelope. Codes specific to these endpoints: