Skip to main content
PATCH
/
tpsl-with-fee
cURL
curl --request PATCH \
  --url https://lite-api.jup.ag/perps/v1/tpsl-with-fee \
  --header 'Content-Type: application/json' \
  --data '{
  "feeReceiver": "<string>",
  "feeToken": "USDC",
  "feeTokenAmount": "1000000",
  "tpslPubkey": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583",
  "triggerPrice": "20000000"
}'
{
  "integratorFeeTokenMint": "<string>",
  "integratorFeeTokenAmount": "<string>",
  "integratorFeeUsd": "<string>",
  "integratorFeeUsdFormatted": "<string>",
  "serializedTxBase64": "<string>",
  "transactionType": "instant",
  "txMetadata": {
    "accountRentLamports": "0",
    "blockhash": "<string>",
    "lastValidBlockHeight": "<string>",
    "transactionFeeLamports": "5000"
  }
}

Body

application/json
feeReceiver
string
required

The token address (ATA) to receive the fee specified in feeTokenAmount. The ATA must match the token mint specified in feeToken

feeToken
enum<string>
required

The token symbol for the fee token. Currently only USDC is supported.

Available options:
USDC
feeTokenAmount
string
required

The amount of fee tokens to send to feeReceiver. The value must match the token mint decimals specified in feeToken (e.g., for USDC with 6 decimals, 1000000 = 1 USDC)

Example:

"1000000"

tpslPubkey
string
required

The public key for the position request account (TPSL)

Example:

"5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583"

triggerPrice
string
required

New trigger price at which the TP / SL request will be executed. The value must be an integer corresponding to 6 decimal places. For example, to set a trigger price of $20, pass in 20000000

Example:

"20000000"

Response

200 OK

integratorFeeTokenMint
string
required

The token mint for the integrator fee token

integratorFeeTokenAmount
string
required

The amount of the integrator fee token

integratorFeeUsd
string
required

The estimated integrator fee in USD (raw value with 6 decimal places)

integratorFeeUsdFormatted
string
required

The estimated integrator fee in USD (human-readable format)

serializedTxBase64
string
required

The serialized transaction (base64 encoded) containing the instructions to update the TPSL request

transactionType
enum<string>
required

Always returns instant for fee-based transactions

Available options:
instant
txMetadata
object
required

Contains relevant metadata for the serialized transaction.