Skip to main content
POST
/
positions
/
increase
cURL
curl --request POST \
  --url https://lite-api.jup.ag/perps/v1/positions/increase \
  --header 'Content-Type: application/json' \
  --data '{
  "asset": "SOL",
  "inputToken": "SOL",
  "inputTokenAmount": "1000000000",
  "leverage": "11.5",
  "maxSlippageBps": "100",
  "priorityFeeMicroLamports": "<string>",
  "side": "long",
  "sizeUsdDelta": "10000000",
  "tpsl": [
    {
      "receiveToken": "BTC",
      "triggerPrice": "20000000",
      "requestType": "tp"
    }
  ],
  "walletAddress": "<string>"
}'
{
  "positionPubkey": "<string>",
  "quote": {
    "averagePriceUsd": "10000000",
    "collateralUsdDelta": "1124450000",
    "leverage": "2.99",
    "liquidationPriceUsd": "13240000",
    "openFeeUsd": "100000",
    "outstandingBorrowFeeUsd": "100000",
    "positionCollateralUsd": "100000000",
    "positionSizeUsd": "10000000",
    "priceImpactFeeBps": "100",
    "priceImpactFeeUsd": "13301",
    "side": "long",
    "sizeUsdDelta": "1124450000",
    "sizeTokenDelta": "14420000"
  },
  "serializedTxBase64": "<string>",
  "tpsl": [
    {
      "hasProfit": true,
      "pnlUsd": "<string>",
      "pnlPercent": "<string>",
      "pubkey": "<string>",
      "requestType": "tp"
    }
  ],
  "txMetadata": {
    "blockhash": "<string>",
    "lastValidBlockHeight": "<string>",
    "transactionFeeLamports": "5000",
    "accountRentLamports": "2039280"
  }
}

Body

application/json
asset
enum<string>
required

The asset or market to trade against

Available options:
BTC,
ETH,
SOL
Example:

"SOL"

inputToken
enum<string>
required

The token symbol for the input token used to fund the position

Available options:
BTC,
ETH,
SOL,
USDC
Example:

"SOL"

inputTokenAmount
string
required

The amount of tokens for the input token to open the position or deposit collateral. NOTE: The token amount needs to be an integer and must conform to the token mint decimals specified onchain. For example, to deposit 1 SOL, the value would be '1000000000' (9 decimals)

Example:

"1000000000"

maxSlippageBps
string
required

The maximum slippage in (BPS) for the asset's price when executing trade

Example:

"100"

side
enum<string>
required

Side for the trade

Available options:
long,
short
leverage
string

Leverage of the increase position, up to 1 decimal place. Either provide 'leverage' or 'sizeUsdDelta' to open a trade. Min leverage is '1.1'. Max leverage for SOL is 250.0

Example:

"11.5"

priorityFeeMicroLamports
string

Custom priority fee in microlamports for the transaction (1,000,000 microlamports = 1 lamport). If not set, the API will automatically set the optimal priority fee

sizeUsdDelta
string

The amount in USD to increase the position size by. Must be an integer representing the USD amount multiplied by 10^6 (1 million) to align with the 6 decimal places used for USDC/USDT tokens on-chain. For example, to increase the position size by $10 USD, set 'sizeUsdDelta' to 10000000; for $0.50 USD, set 'sizeUsdDelta' to 500000. Either provide 'leverage' or 'sizeUsdDelta'.

Example:

"10000000"

tpsl
object[] | null

TPSL requests to set. TPSL requests can only be set for positions that 150x leverage or below. Only 2 TPSLs can be set at a time.

Maximum length: 2
walletAddress
string

The wallet address / public key for the trader, Required when opening a new position.

Response

200 OK

positionPubkey
string | null
required

The unique identifier (i.e. a program derived address) for the position account. Use this address to find the position account onchain.

quote
object
required
serializedTxBase64
string | null
required

The serialized transaction (base64 encoded) containing the instructions and given parameters for the increase position request. The transaction can be deserialized, signed by the owner of walletAddress and submitted onchain to execute the increase position request

tpsl
object[]
required

TPSL requests created with the increase position

txMetadata
object | null
required

Contains relevant metadata for the serialized transaction. Null if no wallet address passed in.