Skip to main content
POST
/
perp
/
sol
/
close
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.

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.

Response

Transactions built

success
boolean
data
object[]
error
string