Solana
Jupiter Perps
USDC
SOL
ETH
BTC
For developers
Everything the app does, any program or script can do. This page lists the accounts and instructions of the PROPFUN program as its interface file (IDL) describes them; the app's own client is web/app/app/lib/seat.ts and builds every instruction from that file.
Program
| Program | Not deployed yet. The address appears here at launch. |
| Venue | Jupiter Perpetuals, PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu |
| Prices | The Doves price feed each Jupiter custody names (the price Jupiter fills at) |
| Money | USDC, EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Accounts and their addresses
| Account | Seeds (program addresses) | What it holds |
|---|---|---|
| Config | "config" | Jupiter accounts pinned at launch, the allocation cap, pool books and running totals |
| Authority | "authority" | No data; signs for the pool vault and the fee escrow |
| Pool vault | "pool_vault" | The pool's idle USDC |
| Fee escrow | "fee_escrow" | Fees of exams still running |
| Season | "season", season id (u32, little endian) | The season's rules and its started, passed, failed and voided counts |
| Exam | "exam", season, trader | One paper account per trader per season |
| Seat | "seat", season, trader | One funded seat per trader per season |
| Seat wallet | "seat_authority", seat | The address that owns the seat's Jupiter positions; its USDC sits in its associated token account |
| LP record | "lp", owner | Pool shares and the time of the last deposit |
A seat's Jupiter positions are Jupiter's own addresses for the seat wallet: "position", seat wallet, JLP pool, custody, collateral custody, side (1 long, 2 short). Its orders are Jupiter requests: "position_request", position, the seat's request counter (u64), 1 to open or 2 to close.
Instructions
| Instruction | Who signs | Arguments | Extra accounts at the end |
|---|---|---|---|
close_season | Admin | - | - |
close_seat | Seat trader; anyone once cut | - | the mark accounts |
deposit | Anyone | amount: u64 | - |
exam_trade | Trader | market: u8, side: u8, size_usd: u64, increase: bool | [custody, oracle] for SOL, ETH, BTC |
grade_exam | Anyone | - | [custody, oracle] for SOL, ETH, BTC |
initialize | Upgrade authority, once | allocation_cap_bps: u16 | - |
issue_seat | Trader with a passed exam | - | - |
mark_seat | Anyone | - | the mark accounts |
open_season | Admin | rules: Rules | - |
report_halt | Anyone | market: u8 | - |
report_resume | Anyone | - | [custody, oracle] for SOL, ETH, BTC |
seat_close | Seat trader; anyone once cut (whole position) | market: u8, side: u8, size_usd: u64, entire: bool, price_limit: u64 | [request, request USDC account] while a request is pending |
seat_open | Seat trader | market: u8, side: u8, size_usd: u64, collateral_usdc: u64, price_limit: u64 | the mark accounts |
set_admin | Admin | new_admin: pubkey | - |
split_profit | Seat trader | - | the mark accounts |
start_exam | Trader | - | - |
void_exam | Anyone | market: u8 | - |
withdraw | Share owner, 7 days after the last deposit | shares: u64 | - |
The mark accounts, in order: the pending request and its USDC account when the seat has one in flight, then [position, custody, oracle] for every open position slot (slot = market x 2 + side - 1, markets SOL 0, ETH 1, BTC 2), lowest slot first.
Market numbers: SOL 0, ETH 1, BTC 2. Sides: 1 long, 2 short. Dollar amounts and prices are USD with 6 decimals.
Sending transactions
Fetch the blockhash at confirmed and send with a confirmed preflight. Wallets sign and send (signAndSendTransaction); the site never handles a signed transaction.
Errors
| Code | Name | Message |
|---|---|---|
| 6000 | InvalidRules | Season rules are out of range. |
| 6001 | SeasonClosed | This season is closed to new exams. |
| 6002 | ExamNotActive | The exam is not running. |
| 6003 | ExamOver | The exam time is over; grade it. |
| 6004 | MarketNotAllowed | That market is not on this season's list. |
| 6005 | ZeroSize | A trade must have a size. |
| 6006 | OppositeSideOpen | Close the open position on the other side first. |
| 6007 | NoPosition | There is no position to reduce. |
| 6008 | ReduceTooLarge | That is more than the open position. |
| 6009 | LeverageCap | Total position size would pass the leverage cap. |
| 6010 | StalePrice | The price is too old to trade on. |
| 6011 | VenueHalted | The venue is halted for this market. |
| 6012 | VenueNotHalted | The venue is not halted. |
| 6013 | HaltTooShort | The halt has not lasted long enough to void the exam. |
| 6014 | HaltAlreadyReported | A halt is already being timed. |
| 6015 | NoHaltReported | No halt is being timed. |
| 6016 | TargetNotReached | The profit target is not reached. |
| 6017 | TooFewTradingDays | Not enough distinct trading days yet. |
| 6018 | NotFlat | Close every position before claiming. |
| 6019 | ExamNotPassed | The exam has not passed. |
| 6020 | PoolCapacity | The pool has no room for another seat right now. |
| 6021 | SeatNotActive | The seat is not active. |
| 6022 | SeatNotCut | The seat has not been cut. |
| 6023 | RequestPending | Wait for the last request to finish. |
| 6024 | RequestStillOpen | The request has not finished yet. |
| 6025 | PriceLimitOutOfBand | The price limit is outside the allowed band around the oracle. |
| 6026 | InsufficientCollateral | Not enough USDC in the seat for that collateral. |
| 6027 | WouldBreachLimit | This trade would put the seat under its loss limit. |
| 6028 | NoProfit | There is no profit to split. |
| 6029 | AccountMismatch | Account does not match the expected address. |
| 6030 | WrongOwner | Account is not owned by the expected program. |
| 6031 | BadAccountData | Account data is malformed. |
| 6032 | MathOverflow | Arithmetic overflow. |
| 6033 | ZeroAmount | Amount must be greater than zero. |
| 6034 | InsufficientLiquidity | Not enough idle USDC in the pool. |
| 6035 | InsufficientShares | Not enough shares. |
| 6036 | NotTrader | Only the seat's trader may do this. |
| 6037 | SeatCut | A seat whose limit is broken can only close positions. |
| 6038 | NothingToGrade | Nothing to grade yet: no limit broken, target not reached, time not up. |
| 6039 | WithdrawLocked | Shares can be withdrawn seven days after the last deposit. |
| 6040 | ExamBreached | The exam is below a loss limit; grade it. |
| 6041 | CollateralTooThin | Each Jupiter position needs at least a tenth of its size as collateral. |