Add getOpenPositions to Jupiter Perps API #15

Closed
opened 2026-06-26 14:22:02 +02:00 by minimons · 0 comments
Owner

Description:

Add a method to the Jupiter Perps API for finding all open Jupiter Perps positions for a wallet.

Suggested API:

Set<JupiterPerpsPosition> getOpenPositions(
        ΩSolanaAddressΩ owner
) throws IOException, InterruptedException;

Implementation:

  • Use SolanaBlockChain.getProgramAccounts(...)
  • Query the Jupiter Perps program id
  • Use a memcmp filter at offset 8 to match the position owner wallet
  • Decode each returned account with the existing Jupiter Perps position decoder
  • Return a Set<JupiterPerpsPosition>

Non-goals:

  • No liquidation price
  • No wallet history
  • No closed positions
  • No trading
  • No transaction signing
  • No generic Jupiter API changes

Acceptance criteria:

  • JupiterPerpsPositionService exposes getOpenPositions(...)
  • The Anchor IDL implementation returns decoded JupiterPerpsPosition objects
  • Manual test can find the known Jupiter Perps position account
### Description: Add a method to the Jupiter Perps API for finding all open Jupiter Perps positions for a wallet. ### Suggested API: ```java Set<JupiterPerpsPosition> getOpenPositions( ΩSolanaAddressΩ owner ) throws IOException, InterruptedException; ``` ### Implementation: * Use `SolanaBlockChain.getProgramAccounts(...)` * Query the Jupiter Perps program id * Use a `memcmp` filter at offset `8` to match the position owner wallet * Decode each returned account with the existing Jupiter Perps position decoder * Return a `Set<JupiterPerpsPosition>` ### Non-goals: * No liquidation price * No wallet history * No closed positions * No trading * No transaction signing * No generic Jupiter API changes ### Acceptance criteria: * `JupiterPerpsPositionService` exposes `getOpenPositions(...)` * The Anchor IDL implementation returns decoded `JupiterPerpsPosition` objects * Manual test can find the known Jupiter Perps position account
minimons added the enhancement label 2026-06-26 14:22:02 +02:00
minimons self-assigned this 2026-06-26 14:22:02 +02:00
minimons added this to the AssetAZ project 2026-06-26 14:22:02 +02:00
minimons moved this to Done in AssetAZ on 2026-06-26 17:07:25 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#15