Jupiter Perpetuals API Specification (0.0.1)

Download OpenAPI specification:

/market-stats

query Parameters
mint
required
string
Enum: "So11111111111111111111111111111111111111112" "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs" "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"

Mint address for the given market

Responses

Response samples

Content type
application/json
{
  • "price": "123.00",
  • "priceChange24H": "-20.00",
  • "priceHigh24H": "123.00",
  • "priceLow24H": "123.00",
  • "volume": "48123049.00"
}

/orders/expired

query Parameters
walletAddress
required
string

Public key for the wallet to fetch expired orders

Responses

Response samples

Content type
application/json
{
  • "serializedTxs": [
    ],
  • "txMetadata": {
    }
}

/orders/limit

Request Body schema: application/json
positionRequestPubkey
required
string

Public key / account address for the position request account for the limit order.

Responses

Request samples

Content type
application/json
{
  • "positionRequestPubkey": "string"
}

Response samples

Content type
application/json
{
  • "serializedTxBase64": "string",
  • "txMetadata": {
    },
  • "positionPubkey": "string",
  • "positionRequestPubkey": "string",
  • "requireKeeperSignature": true
}

/orders/limit

Request Body schema: application/json
walletAddress
required
string

Public key for the wallet to fetch expired orders

Responses

Request samples

Content type
application/json
{
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "count": 0,
  • "dataList": [
    ]
}

/orders/limit

Request Body schema: application/json
asset
required
string
Enum: "BTC" "ETH" "SOL"

The asset or market to trade against for the limit order.

includeSerializedTx
boolean
Default: true

Sets whether to return a serialized transaction (serializedTxBase64) in the response.

inputToken
required
string
Enum: "BTC" "ETH" "SOL" "USDC"

The token symbol for the input token used to fund the limit order.

inputTokenAmount
required
string

The amount of tokens for the input token. 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).

leverage
string

Leverage of the limit order. Either provide leverage or sizeUsdDelta.

side
required
string
Enum: "long" "short"

Required when creating a limit order request.

sizeUsdDelta
string

The amount in USD for the size of the limit order (raw value with 6 decimal places). Either provide leverage or sizeUsdDelta.

triggerPrice
required
string

Trigger price at which the limit order will be executed (raw value with 6 decimal places). For example, to set a trigger price of $20, pass in 20000000.

walletAddress
string

The wallet address / public key for the trader. Required when creating a limit order that returns a serialized transaction.

Responses

Request samples

Content type
application/json
{
  • "asset": "SOL",
  • "includeSerializedTx": true,
  • "inputToken": "USDC",
  • "inputTokenAmount": "1000000000",
  • "leverage": "10",
  • "side": "long",
  • "sizeUsdDelta": "10000000",
  • "triggerPrice": "20000000",
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "positionPubkey": "string",
  • "quote": {
    },
  • "serializedTxBase64": "string",
  • "txMetadata": {
    }
}

/orders/limit

Request Body schema: application/json
positionRequestPubkey
required
string

The public key for the limit order position request.

triggerPrice
required
string

Trigger price at which the limit order will be executed (raw value with 6 decimal places). For example, to set a trigger price of $20, pass in 20000000.

Responses

Request samples

Content type
application/json
{
  • "positionRequestPubkey": "string",
  • "triggerPrice": "20000000"
}

Response samples

Content type
application/json
{
  • "positionPubkey": "string",
  • "positionRequestPubkey": "string",
  • "quote": {
    },
  • "serializedTxBase64": "string",
  • "txMetadata": {
    }
}

/positions

query Parameters
includeClosedPositions
boolean
Default: false

Set to true to return closed positions

walletAddress
required
string

Public key for the wallet to fetch trades

Responses

Response samples

Content type
application/json
{
  • "dataList": [
    ],
  • "count": 0
}

/positions/close-all

Request Body schema: application/json
walletAddress
required
string

The wallet address / public key for the trader to close all open positions

Responses

Request samples

Content type
application/json
{
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "serializedTxs": [
    ],
  • "txMetadata": {
    }
}

/positions/collateral-limits

query Parameters
inputMint
required
string
Example: inputMint=So11111111111111111111111111111111111111112

The mint address for the input token to deposit as collateral (e.g. 'So11111111111111111111111111111111111111112' for 'SOL')

positionPubkey
required
string
Example: positionPubkey=5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583

The public key for the open position. Use the GET positions endpoint to fetch the public key for the trader's open positions.

Responses

Response samples

Content type
application/json
{
  • "maxCollateralDepositTokenAmount": "string",
  • "maxCollateralDepositUsd": "string",
  • "minCollateralDepositTokenAmount": "string",
  • "minCollateralDepositUsd": "string",
  • "maxCollateralWithdrawalTokenAmount": "string",
  • "maxCollateralWithdrawalUsd": "string",
  • "minCollateralWithdrawalTokenAmount": "string",
  • "minCollateralWithdrawalUsd": "string"
}

/positions/decrease

Request Body schema: application/json
collateralUsdDelta
string or null

The amount of collateral to withdraw in USD from the position. 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 decrease by $10 USD, set 'collateralUsdDelta' to 10000000; for $20.50 USD, set 'collateralUsdDelta' to 20500000.

entirePosition
boolean
Default: false

When set to true, this will close the position and transfer the remaining collateral and realised profits (if the position is profitable) to the trader.

maxSlippageBps
string
Default: "200"

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

positionPubkey
required
string

The public key for the open position. Use the GET positions endpoint to fetch the public key for the trader's open positions.

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

receiveToken
required
string
Enum: "BTC" "ETH" "SOL" "USDC"

The token to receive.

sizeUsdDelta
string or null

The amount in USD to decrease 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 decrease by $10 USD, set 'sizeUsdDelta' to 10000000; for $20.50 USD, set 'sizeUsdDelta' to 20500000.

Responses

Request samples

Content type
application/json
{
  • "collateralUsdDelta": "10000000",
  • "entirePosition": false,
  • "maxSlippageBps": "100",
  • "positionPubkey": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583",
  • "priorityFeeMicroLamports": "string",
  • "receiveToken": "BTC",
  • "sizeUsdDelta": "10000000"
}

Response samples

Content type
application/json
{
  • "positionPubkey": "string",
  • "quote": {
    },
  • "serializedTxBase64": "string",
  • "txMetadata": {
    }
}

/positions/increase

Request Body schema: application/json
asset
required
string
Enum: "BTC" "ETH" "SOL"

The asset or market to trade against

inputToken
required
string
Enum: "BTC" "ETH" "SOL" "USDC"

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

inputTokenAmount
required
string

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)

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

maxSlippageBps
required
string

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

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

side
required
string
Enum: "long" "short"

Side for the trade

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'.

Array of objects or null <= 2 items

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.

walletAddress
string

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

Responses

Request samples

Content type
application/json
{
  • "asset": "SOL",
  • "inputToken": "SOL",
  • "inputTokenAmount": "1000000000",
  • "leverage": "11.5",
  • "maxSlippageBps": "100",
  • "priorityFeeMicroLamports": "string",
  • "side": "long",
  • "sizeUsdDelta": "10000000",
  • "tpsl": [
    ],
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "positionPubkey": "string",
  • "quote": {
    },
  • "serializedTxBase64": "string",
  • "tpsl": [
    ],
  • "txMetadata": {
    }
}

/pool-info

query Parameters
mint
required
string
Enum: "So11111111111111111111111111111111111111112" "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs" "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"

The token mint address for the perpetuals market

Responses

Response samples

Content type
application/json
{
  • "longAvailableLiquidity": "2500000",
  • "longBorrowRatePercent": "0.0026",
  • "longUtilizationPercent": "26.00",
  • "shortAvailableLiquidity": "2500000",
  • "shortBorrowRatePercent": "0.0026",
  • "shortUtilizationPercent": "26.00",
  • "openFeePercent": "0.06",
  • "maxRequestExecutionSec": "string",
  • "maxPriceImpactFeePercent": "string"
}

/jlp-info

Responses

Response samples

Content type
application/json
{
  • "aumUsd": "123456789000000",
  • "aumUsdFormatted": "123,456.79",
  • "aumLimitUsd": "500000000000000",
  • "aumLimitUsdFormatted": "500,000",
  • "jlpPriceUsd": "1234567",
  • "jlpPriceUsdFormatted": "1.2346",
  • "jlpTotalSupply": "100000000000",
  • "jlpTotalSupplyFormatted": "100,000",
  • "jlpAprBps": "100",
  • "jlpAprPct": "10.00",
  • "jlpApyBps": "100",
  • "jlpApyPct": "10.00",
  • "jlpAprLastUpdatedTimestamp": "1715404800",
  • "jlpRealizedFeeUsd": "100000000",
  • "custodies": [
    ]
}

/trades

query Parameters
action
string
Enum: "Increase" "Decrease"
createdAtAfter
string

Fetches trades with a 'createdAt' date that is greater or equal to the given 'createdAtAfter' UNIX timestamp'

createdAtBefore
string

Fetches trades with a 'createdAt' date that is less than the given 'createdAtBefore' UNIX timestamp'

end
number
Default: 20

The index of the last row to retrieve. This parameter specifies the ending point for fetching rows from the dataset. It is exclusive, meaning that the row at this index will not be included in the results.

mint
string
Enum: "So11111111111111111111111111111111111111112" "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs" "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"

Mint address for the underlying position of the trade

side
string
Enum: "long" "short"
start
number
Default: 0

The index of the first row to retrieve. This parameter specifies the starting point for fetching rows from the dataset. It is inclusive, meaning that the row at this index will be included in the results

walletAddress
string

Public key for the wallet to fetch trades (required unless txid is provided)

txid
string

Transaction ID for the trade to fetch directly

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "dataList": [
    ]
}

/transaction/execute

Request Body schema: application/json
action
required
string
Enum: "cancel-tpsl" "create-tpsl" "update-tpsl" "tpsl" "tpsl-with-fee" "cancel-limit-order" "create-limit-order" "update-limit-order" "limit-order" "increase-position" "increase-position-with-fee" "decrease-position" "decrease-position-with-fee"

The action for the serialized transaction to be executed

serializedTxBase64
required
string

Serialise signed transaction from user.

Responses

Request samples

Content type
application/json
{
  • "action": "cancel-tpsl",
  • "serializedTxBase64": "string"
}

Response samples

Content type
application/json
{
  • "action": "string",
  • "txid": "string"
}

/tpsl

Request Body schema: application/json
positionRequestPubkey
required
string

The public key for the TP / SL request

Responses

Request samples

Content type
application/json
{
  • "positionRequestPubkey": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583"
}

Response samples

Content type
application/json
{
  • "requireKeeperSignature": true,
  • "serializedTxBase64": "string",
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}

/tpsl

Request Body schema: application/json
walletAddress
required
string

The public key for owner of the position.

positionPubkey
required
string

The public key for the open position. Use the GET positions endpoint to fetch the public key for the trader's open positions.

required
Array of objects <= 20 items

TPSL requests to set.

transactionType
string
Default: "instant"
Enum: "instant" "mixed"

Sets the type of serialized transaction to execute the action.

Responses

Request samples

Content type
application/json
{
  • "walletAddress": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583",
  • "positionPubkey": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583",
  • "tpsl": [
    ],
  • "transactionType": "instant"
}

Response samples

Content type
application/json
{
  • "tpslPubkeys": [
    ],
  • "requireKeeperSignature": true,
  • "serializedTxBase64": "string",
  • "tpslRequests": [
    ],
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}

/tpsl

Request Body schema: application/json
positionRequestPubkey
required
string

The public key for the TP / SL request

triggerPrice
required
string

Trigger price at which the TP / SL request will be executed (raw value with 6 decimal places). For example, to set a trigger price of $20, pass in 20000000.

transactionType
string
Default: "instant"
Enum: "instant" "mixed"

Sets the type of serialized transaction to execute the action. If the transaction type is instant, the transaction must be sent to the POST /transaction/execute endpoint. If the transaction type is mixed, the transactionType returned in the response will be either legacy or instant.

Responses

Request samples

Content type
application/json
{
  • "positionRequestPubkey": "5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583",
  • "triggerPrice": "20000000",
  • "transactionType": "instant"
}

Response samples

Content type
application/json
{
  • "requireKeeperSignature": true,
  • "serializedTxBase64": "string",
  • "tpslRequests": [
    ],
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}

/loans/deposit-borrow

Request Body schema: application/json
depositTokenAmount
required
string

JLP token amount to deposit based on the JLP mint decimals (6)`

borrowMint
string
Default: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Value: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

Mint address for the borrow token

borrowTokenAmount
required
string

Token amount for the borrow based on the mint decimals for the borrow token defined in borrowMint

walletAddress
required
string

Public key for the wallet to deposit / borrow

Responses

Request samples

Content type
application/json
{
  • "depositTokenAmount": "string",
  • "borrowMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  • "borrowTokenAmount": "string",
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "borrowSizeUsd": "string",
  • "borrowSizeTokenAmount": "string",
  • "borrowTokenMint": "string",
  • "collateralTokenAmount": "string",
  • "collateralTokenUsd": "string",
  • "maxBorrowTokenAmount": "string",
  • "maxBorrowTokenAmountBeforeBorrow": "string",
  • "maxBorrowUsd": "string",
  • "maxWithdrawUsd": "string",
  • "maxWithdrawTokenAmount": "string",
  • "maxRepayTokenAmount": "string",
  • "liquidationPriceUsd": "string",
  • "ltvBps": "string",
  • "ltvPercentage": "string",
  • "positionPubkey": "string",
  • "serializedTxBase64": "string",
  • "requireKeeperSignature": true,
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}

/loans/repay-withdraw

Request Body schema: application/json
repayMint
string
Default: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
Value: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

Mint address for the payment token

repayTokenAmount
required
string

Token amount to pay for the position's debt

withdrawTokenAmount
required
string

The JLP token amount to withdraw from the position

walletAddress
required
string

Public key for the wallet to pay / withdraw

Responses

Request samples

Content type
application/json
{
  • "repayMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  • "repayTokenAmount": "string",
  • "withdrawTokenAmount": "string",
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "borrowSizeUsd": "string",
  • "borrowSizeTokenAmount": "string",
  • "borrowTokenMint": "string",
  • "collateralTokenAmount": "string",
  • "collateralTokenUsd": "string",
  • "maxBorrowTokenAmount": "string",
  • "maxBorrowUsd": "string",
  • "maxWithdrawUsd": "string",
  • "maxWithdrawTokenAmount": "string",
  • "maxWithdrawTokenAmountBeforeWithdraw": "string",
  • "maxRepayTokenAmount": "string",
  • "liquidationPriceUsd": "string",
  • "ltvBps": "string",
  • "ltvPercentage": "string",
  • "positionPubkey": "string",
  • "serializedTxBase64": "string",
  • "txMetadata": {
    },
  • "requireKeeperSignature": true,
  • "transactionType": "legacy"
}

/loans/positions

query Parameters
walletAddress
required
string

Public key for the wallet to pay / withdraw

Responses

Response samples

Content type
application/json
{
  • "dataList": [
    ],
  • "count": 0
}

/loans/info

Responses

Response samples

Content type
application/json
{
  • "currentJlpPriceUsd": "string",
  • "borrowTokenMint": "string",
  • "availableLiquidityUsd": "string",
  • "availableLiquidityTokenAmount": "string",
  • "totalSupplyUsd": "string",
  • "totalSupplyTokenAmount": "string",
  • "utilizationRateBps": "string",
  • "utilizationRatePercentage": "string",
  • "borrowApr": "string",
  • "liquidationMarginBps": "string",
  • "liquidationMarginPercentage": "string",
  • "liquidationPenaltyBps": "string",
  • "liquidationPenaltyPercentage": "string",
  • "maxLtvBps": "string",
  • "maxLtvPercentage": "string"
}

/loans/history

query Parameters
walletAddress
string

Filter by wallet address

borrowPositionPubkey
string

Filter by specific borrow position pubkey

transactionType
string
Enum: "DepositCollateral" "WithdrawCollateral" "Borrow" "Repay" "Liquidation"

Filter by transaction type

createdAtAfter
string

Fetches transactions with a 'createdAt' date that is greater or equal to the given 'createdAtAfter' UNIX timestamp

createdAtBefore
string

Fetches transactions with a 'createdAt' date that is less than the given 'createdAtBefore' UNIX timestamp

start
number
Default: 0

The index of the first row to retrieve. This parameter specifies the starting point for fetching rows from the dataset. It is inclusive, meaning that the row at this index will be included in the results

end
number
Default: 20

The index of the last row to retrieve. This parameter specifies the ending point for fetching rows from the dataset. It is exclusive, meaning that the row at this index will not be included in the results.

Responses

Response samples

Content type
application/json
{
  • "dataList": [
    ],
  • "count": 0
}

/top-traders

query Parameters
marketMint
required
string
Enum: "So11111111111111111111111111111111111111112" "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs" "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"

Mint address for the given market to filter top trader data

year
required
string

The year for the week to query

required
"current" (string) or string

The week number (1-53) or "current" for the current week

Responses

Response samples

Content type
application/json
{
  • "marketMint": "string",
  • "totalVolumeUsd": "string",
  • "startTimestamp": 0,
  • "endTimestamp": 0,
  • "topTradersByPnl": [
    ],
  • "topTradersByVolume": [
    ]
}

/trader-stats

query Parameters
walletAddress
required
string

The pubkey of trader to get volume data

marketMint
required
string
Enum: "So11111111111111111111111111111111111111112" "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs" "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh"

Mint address for the given market to filter top trader data

year
required
string

The year for the week to query

required
"current" (string) or string

The week number (1-53) or "current" for the current week

Responses

Response samples

Content type
application/json
{
  • "totalVolumeUsd": "string",
  • "totalPnlUsd": "string",
  • "startTimestamp": 0,
  • "endTimestamp": 0
}

/jlp/burn

Request Body schema: application/json
burnTokenAmount
required
string

The amount of JLP tokens to burn scaled to 6 decimal places as per the JLP mint

receiveToken
required
string
Enum: "WBTC" "ETH" "SOL" "USDC"

Token to receive from burning JLP

walletAddress
required
string

Public key for the wallet to burn JLP

Responses

Request samples

Content type
application/json
{
  • "burnTokenAmount": "string",
  • "receiveToken": "WBTC",
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "burnFeeBps": "string",
  • "burnFeePercent": "string",
  • "burnFeeTokenAmount": "string",
  • "receiveToken": "string",
  • "receiveTokenAmount": "string",
  • "receiveTokenCustody": "string",
  • "receiveTokenMint": "string",
  • "serializedTxBase64": "string",
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}

/jlp/mint

Request Body schema: application/json
depositToken
required
string
Enum: "WBTC" "ETH" "SOL" "USDC"

Token to deposit to mint JLP

depositTokenAmount
required
string

The amount of the deposit token to deposit to mint JLP

walletAddress
required
string

Public key for the wallet to mint JLP

Responses

Request samples

Content type
application/json
{
  • "depositToken": "WBTC",
  • "depositTokenAmount": "string",
  • "walletAddress": "string"
}

Response samples

Content type
application/json
{
  • "mintFeeBps": "string",
  • "mintFeePercent": "string",
  • "mintTokenAmount": "string",
  • "serializedTxBase64": "string",
  • "transactionType": "legacy",
  • "txMetadata": {
    }
}