Skip to main content
POST
Exit check

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.

Body

application/json
mint
string
required

The token you are exiting.

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

What you are exiting into. Must differ from mint.

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

Bag size. Required unless you pass uiAmount + decimals.

Pattern: ^\d+$
Example:

"1000000000"

uiAmount
number
decimals
integer
Required range: 0 <= x <= 18
quoteDecimals
integer
Required range: 0 <= x <= 18
slippageBps
integer
default:50
Required range: 1 <= x <= 1000
ladder
number[]

Fractions of the position to quote. Impact is measured against the SMALLEST rung, so pass a small first rung — [0.01, 0.1, 0.25, 0.5, 1] gives a much tighter baseline than the default, and the response warns you via coarse_baseline when yours is too coarse.

Required array length: 1 - 8 elements
Required range: x <= 1

Response

The ladder, including any rungs that had no route.

mint
string
required
quoteMint
string
required
amount
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"

slippageBps
integer
required
ladder
number[]
required
summary
object
required
rungs
object[]
required
uiAmount
number | null
decimals
integer | null
quoteDecimals
integer | null
units
object

Self-describing unit notes, safe to ignore once you've read them once.