curl --request POST \
--url https://ca.raze.sh/perp/sol/close \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"wallet_addresses": [
"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
],
"market_id": "jup:SOL-PERP",
"position_pubkey": "PoSLk3hQrTtUKn1ePNKczqJsZbftrxCzpEuhKdzS5sM",
"side": "long",
"entire_position": true,
"slippage_bps": 50,
"client_order_id": "ui-close-20260506-x1"
}
'{
"success": true,
"data": [
{
"wallet": "<string>",
"tx_b64": "<string>",
"status": "<string>"
}
],
"error": "<string>"
}Build unsigned transaction(s) to close a position. Set entire_position=true
for a full close, otherwise pass size_usd_delta_e6 for a partial close.
Idempotent on client_order_id (60s window).
curl --request POST \
--url https://ca.raze.sh/perp/sol/close \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"wallet_addresses": [
"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
],
"market_id": "jup:SOL-PERP",
"position_pubkey": "PoSLk3hQrTtUKn1ePNKczqJsZbftrxCzpEuhKdzS5sM",
"side": "long",
"entire_position": true,
"slippage_bps": 50,
"client_order_id": "ui-close-20260506-x1"
}
'{
"success": true,
"data": [
{
"wallet": "<string>",
"tx_b64": "<string>",
"status": "<string>"
}
],
"error": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
Use this file to discover all available pages before exploring further.
1Position PDA being closed.
Side of the open position. Required so the builder picks the correct collateral custody account; without it a short close is rejected on-chain.
long, short True = full close. When true, size_usd_delta_e6 is ignored.
USD notional to close in USDC micros. Required when entire_position=false.