Skip to main content
POST
/
v1
/
positions
/
set-tp-sl
Set TP/SL
curl --request POST \
  --url https://api.roxom.com/v1/positions/set-tp-sl \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --header 'X-API-Signature: <api-key>' \
  --data '
{
  "instType": "perpetual",
  "symbol": "<string>",
  "tpSlMode": "partial",
  "quantity": "<string>",
  "stopLossLimitPrice": "<string>",
  "stopLossTriggerPrice": "<string>",
  "takeProfitLimitPrice": "<string>",
  "takeProfitTriggerPrice": "<string>",
  "unit": "sats"
}
'
{
  "data": {
    "slOrder": {
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amountFilled": "<string>",
      "createdAt": 123,
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "instType": "perpetual",
      "px": "<string>",
      "qty": "<string>",
      "side": "buy",
      "size": "<string>",
      "status": "pendingsubmit",
      "symbol": "<string>",
      "timeInForce": "gtc",
      "type": "limit",
      "unit": "sats",
      "cancelAt": 123,
      "clientOrderId": "<string>",
      "triggerPx": "<string>",
      "triggeredAt": 123
    },
    "tpOrder": {
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amountFilled": "<string>",
      "createdAt": 123,
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "instType": "perpetual",
      "px": "<string>",
      "qty": "<string>",
      "side": "buy",
      "size": "<string>",
      "status": "pendingsubmit",
      "symbol": "<string>",
      "timeInForce": "gtc",
      "type": "limit",
      "unit": "sats",
      "cancelAt": 123,
      "clientOrderId": "<string>",
      "triggerPx": "<string>",
      "triggeredAt": 123
    }
  },
  "error": true
}

Authorizations

X-API-Key
string
header
required

Your API key

X-API-Signature
string
header
required

The signature of the request

Body

application/json
instType
enum<string>
required
Available options:
perpetual,
spot,
btc,
digital,
stock,
index
symbol
string
required
tpSlMode
enum<string>
required
Available options:
partial,
full
quantity
string | null
stopLossLimitPrice
string | null
stopLossTriggerPrice
string | null
takeProfitLimitPrice
string | null
takeProfitTriggerPrice
string | null
unit
enum<string>
Available options:
sats,
btc

Response

200 - application/json

Represents a successful API response wrapper

data
object
required
error
boolean
required
Last modified on March 17, 2026