Skip to main content
POST
Zap-Out - Estimate what a withdrawal pays out

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
bps
integer
required

Basis points of the position to withdraw (1-10000). 10000 closes it and claims its fees.

Required range: 1 <= x <= 10000
Example:

10000

position_id
string

The position address, as passed to decrease-tx. This is the id (same value as tokenId) that /lp-positions/opening returns. Either this or id is required.

Example:

"Ep22EwKegXis3bTC6P8JLgsHaT5J2beM2TncKe2Hmv24"

id
string

An encrypted position ID, still accepted in place of position_id. The id that /lp-positions/opening returns on this API is already the plain position address: send that one as position_id.

outputs
enum<string>[]

Price only these output options (default all four)

Available options:
allToken0,
allToken1,
both,
allBaseToken
Example:

Response

One estimate per requested output. An estimate with ok=false carries the reason (e.g. no swap route).

status
string
Example:

"success"

data
object