Jupiter DEX icon

Jupiter DEX

Interact with Jupiter DEX on Solana blockchain

Get Positions

AI-generated

Summary

Retrieve all active perpetual positions for the configured Solana wallet, including details such as market pair, side (long/short), size, entry price, collateral, and current estimated PnL.

Inputs

None.

Output shape

A single JSON object containing aggregated details for all active perpetual positions, grouped by market pair (e.g., 'SOL/USDC', 'BTC/USDC', 'ETH/USDC').

Each market pair entry includes 'Position Pubkey', 'Side', 'Size', 'Entry Price', 'Current Price', 'Collateral', 'PnL if closed now', and 'Opened' timestamp. The 'PnL if closed now' is an estimated value based on current prices (if available) and estimated fees. Position data is primarily fetched from Jupiter's Perps API, with an on-chain fallback if the API fails. If an unknown market is encountered or data is incomplete, some fields might be 'N/A'.

Examples

Example 1: Get all open perpetual positions for the configured wallet.

No specific parameters are required for this operation, as it retrieves all positions associated with the credentialed wallet.

Discussion