Skip to main content
GET
Spot quote

Authorizations

Authorization
string
header
required

An OceanX API key, created in the app under Settings → Developer API. Send it as Authorization: Bearer ox_live_…. These endpoints require the md.read scope, which is on every key by default.

Query Parameters

inputMint
string
required

Base58 Solana mint address.

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
outputMint
string
required

Base58 Solana mint address.

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
amount
string

Required unless you pass uiAmount + inputDecimals. Atomic (base-unit) amount as a decimal integer string. A string, not a number, because a large 9-decimal balance exceeds Number.MAX_SAFE_INTEGER and would be corrupted by JSON float parsing.

Pattern: ^\d+$
Example:

"1000000000"

uiAmount
number

Human units. Requires inputDecimals.

inputDecimals
integer
Required range: 0 <= x <= 18
outputDecimals
integer

Adds outUiAmount and minOutUiAmount to the response.

Required range: 0 <= x <= 18
slippageBps
integer
default:50
Required range: 1 <= x <= 1000
dexes
string

Comma-separated venue labels to restrict routing to.

pools
string

Comma-separated pool addresses to restrict routing to.

maxHops
integer
Required range: 1 <= x <= 4
onlyDirectRoutes
boolean
default:false

Response

A quote.

inputMint
string
required
outputMint
string
required
inAmount
string
required

Atomic (base-unit) amount as a decimal integer string. A string, not a number, because a large 9-decimal balance exceeds Number.MAX_SAFE_INTEGER and would be corrupted by JSON float parsing.

Pattern: ^\d+$
Example:

"1000000000"

outAmount
string
required

Atomic (base-unit) amount as a decimal integer string. A string, not a number, because a large 9-decimal balance exceeds Number.MAX_SAFE_INTEGER and would be corrupted by JSON float parsing.

Pattern: ^\d+$
Example:

"1000000000"

minOutAmount
string
required

Worst-case output after slippageBps, as enforced on-chain.

Pattern: ^\d+$
Example:

"1000000000"

slippageBps
integer
required
Required range: 1 <= x <= 1000
impactMeasurable
boolean
required

False when impact sits inside the engine's noise floor (~0.1%), where the figure is a cached mid rather than a measurement. Render '—' rather than the number.

clamped
boolean
required

True when this is the router's out-of-liquidity floor price rather than an executable fill. Returned with HTTP 200. NEVER present a clamped quote as proceeds.

route
object[]
required
venues
string[]
required
engine
string
required
Example:

"raptor"

priceImpactPct
number | null

Price impact in PERCENT (1.5 = 1.5%). NOTE: Jupiter's equivalent field is fractional (0.015), so code ported from Jupiter is off by 100x — in the direction that makes an untradeable position look fine.

Example:

1.5

contextSlot
integer | null
engineTimeMs
number | null

Router compute time in milliseconds, typically 1–2.

swapUsdValue
number | null

Upstream USD notional when available; null on many pairs. Don't depend on it.

requestId
string | null

Quote id. Include it if you report a bad route to us.