Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Body

application/json
wallet_addresses
string[]
required
Minimum array length: 1
market_id
string
required
position_pubkey
string
required

Position PDA being closed.

side
enum<string>
required

Side of the open position. Required so the builder picks the correct collateral custody account; without it a short close is rejected on-chain.

Available options:
long,
short
slippage_bps
integer
required
client_order_id
string
required
entire_position
boolean
default:false

True = full close. When true, size_usd_delta_e6 is ignored.

size_usd_delta_e6
integer<int64>

USD notional to close in USDC micros. Required when entire_position=false on a Jupiter market.

close_pct_bps
integer | null

Phoenix only. Percent of the position to close, in basis points (10000 = full) — Phoenix closes are base-unit/percent oriented, not USD-notional like Jupiter. Omitted, entire_position maps to 10000; a PARTIAL Phoenix close without this field is rejected. Ignored on Jupiter markets, which use size_usd_delta_e6.

Response

Transactions built

success
boolean
data
object[]
error
string