curl --request POST \
--url https://ca.raze.sh/perp/sol/tpsl \
--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",
"trigger_price_e6": 240000000,
"trigger_above_threshold": false,
"entire_position": true,
"client_order_id": "ui-tpsl-20260506-s1"
}
'{
"success": true,
"data": [
{
"wallet": "<string>",
"tx_b64": "<string>",
"status": "<string>"
}
],
"error": "<string>"
}Place a TP/SL trigger on an existing position. Routed through
createDecreasePositionRequest2 with requestType=Trigger.
trigger_above_threshold encodes the direction the price must cross
to fire (true = oracle ≥ trigger, false = oracle ≤ trigger). The
caller maps this to TP vs SL based on position side; the on-chain ix
does not distinguish between them.
curl --request POST \
--url https://ca.raze.sh/perp/sol/tpsl \
--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",
"trigger_price_e6": 240000000,
"trigger_above_threshold": false,
"entire_position": true,
"client_order_id": "ui-tpsl-20260506-s1"
}
'{
"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.
1long, short Trigger price in USDC micros.
Direction the price must cross to fire the trigger. true =
oracle ≥ trigger; false = oracle ≤ trigger. The caller maps
this to TP vs SL based on position side.
True = close the entire position on trigger.
Required when entire_position=false.