Jupiter DEX icon

Jupiter DEX

Interact with Jupiter DEX on Solana blockchain

Open Position

AI-generated

Summary

Open a new perpetual position on the Jupiter DEX.

Inputs

  • Market (required) — Select the market (SOL, BTC, ETH) for the perpetual position.
  • Side (required) — Specify if the position is 'Long' or 'Short'.
  • Leverage (required) — Enter the desired leverage multiplier for the position (e.g., 4).
  • Max Slippage (bps) (required) — Set the maximum allowed slippage in basis points (e.g., 100 for 1%).
  • USDC to Add (required) — Specify the amount of USDC to use as collateral for the position (e.g., 10.5).

Output shape

a single record detailing the transaction and the newly opened position.

The output includes the transaction ID, its confirmation status ('pending' or 'confirmed'), the public key of the new position, and details of the quote received from Jupiter's Perps API. It also echoes the configured market, side, leverage, and collateral amount.

Examples

Example 1: Open a long SOL position with 2x leverage.

Market: SOL, Side: Long, Leverage: 2, Max Slippage: 100 bps, USDC to Add: 100.

Example 2: Open a short BTC position with 3x leverage.

Market: BTC, Side: Short, Leverage: 3, Max Slippage: 50 bps, USDC to Add: 50.

Discussion