Skip to main content
POST
/
perp
/
sol
/
tpsl
Place a take-profit / stop-loss trigger
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.

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
side
enum<string>
required
Available options:
long,
short
trigger_price_e6
integer<int64>
required

Trigger price in USDC micros.

trigger_above_threshold
boolean
required

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.

client_order_id
string
required
entire_position
boolean
default:false

True = close the entire position on trigger.

size_usd_delta_e6
integer<int64>

Required when entire_position=false.

Response

Transactions built

success
boolean
data
object[]
error
string