# Jupiter > Jupiter is DeFi infrastructure on Solana. All APIs are REST/JSON, require no RPC node, and return clean responses that LLMs and AI agents can parse directly. > **Swap API V2** (recommended): `/order` for managed execution, `/build` for custom transactions. Base URL: `https://api.jup.ag/swap/v2`. > **Authentication**: Keyless access is available at 0.5 RPS on `api.jup.ag` with no sign-up - ideal for prototyping and lightweight agent use cases (no analytics or usage tracking). For production, sign up at [developers.jup.ag/portal](https://developers.jup.ag/portal), generate a free API key, and pass it via the `x-api-key` header to unlock higher rate limits and analytics. > **AI tools**: Jupiter CLI (`npm i -g @jup-ag/cli`) for terminal and agent use, agent skills via `npx skills add`, MCP server at dev.jup.ag/mcp for in-editor docs, and llms-full.txt for complete documentation content. - [Swap API V2](https://dev.jup.ag/docs/swap/index.md) (recommended): `GET /swap/v2/order` + `POST /swap/v2/execute` or `GET /swap/v2/build` - [Trigger](https://dev.jup.ag/docs/trigger/index.md) (limit orders): `POST /trigger/v2/orders/price` - [Recurring](https://dev.jup.ag/docs/recurring/index.md) (DCA): `POST /recurring/v1/createOrder` - [Lend](https://dev.jup.ag/docs/lend/index.md): `POST /lend/v1/earn/deposit` - [Price](https://dev.jup.ag/docs/price/index.md): `GET /price/v3?ids={mints}` - [Tokens](https://dev.jup.ag/docs/tokens/index.md): `GET /tokens/v2/search?query={query}` - [Portfolio](https://dev.jup.ag/docs/portfolio/index.md): `GET /portfolio/v1/positions?wallet={address}` - [Prediction](https://dev.jup.ag/docs/prediction/index.md): `POST /prediction/v1/order` ## Get Started Setup guides for environment, tooling, and first API calls. ### Get Started - [Jupiter Developer Docs](https://dev.jup.ag/docs/get-started/index.md): Welcome page for Jupiter Developer Docs. Introduces Jupiter as Solana DeFi infrastructure and provides quick navigation to product APIs (Swap, Tokens, Price, Lend, Trigger, Recurring, Prediction, Perps), developer resources (Guides, API Reference, Developer Platform), AI resources (CLI, Skills, MCP, llms.txt), community links, socials (Blog and X), and get-started setup pages. - [Environment Setup](https://dev.jup.ag/docs/get-started/environment-setup.md): Install Solana web3.js and spl-token libraries, configure an RPC connection, and set up a development wallet to build with the Jupiter API. - [Development Basics](https://dev.jup.ag/docs/get-started/development-basics.md): Solana fundamentals for Jupiter developers: accounts, programs, instructions, transactions, priority fees, compute units, slippage, and how the Swap API V2 simplifies it all. Use the /order + /execute path for managed execution (no RPC needed) or /build for custom transactions. - [Developer Guides](https://dev.jup.ag/docs/guides/index.md): Jupiter developer guides: practical tutorials for common Solana development tasks. Covers token swaps with Swap API V2 /order (recommended, two API calls, no RPC needed), token information (metadata, verification, organic score), token prices (USD pricing), swap widget embedding (Plugin), custom swap transactions with Swap API V2 /build (routing, CPI, custom instructions), and prediction markets (binary event trading). Each guide includes working code examples in JavaScript, Python, and curl. ### Portal - [Getting Started](https://dev.jup.ag/docs/portal/setup.md): How to get started with the Jupiter Developer Platform: sign up, generate an API key, and make your first request. API key is passed via x-api-key header. Four tiers available: Free (1 RPS), Developer ($25/mo, 10 RPS), Launch ($100/mo, 50 RPS), Pro ($500/mo, 150 RPS). Keyless access available at 0.5 RPS without sign-up. - [Plans and Pricing](https://dev.jup.ag/docs/portal/plans.md): Jupiter Developer Platform pricing tiers: Free (1 RPS, no payment), Developer ($25/mo, 10 RPS, 25M credits), Launch ($100/mo, 50 RPS, 100M credits), Pro ($500/mo, 150 RPS, 500M credits). Credit-based billing at $1 per million credits for overages. Per-endpoint credit costs vary from 0 (execute endpoints) to 100 (portfolio positions). Keyless access available at 0.5 RPS. - [Rate Limits](https://dev.jup.ag/docs/portal/rate-limits.md): Jupiter API rate limits by plan tier: Keyless 0.5 RPS, Free 1 RPS, Developer 10 RPS, Launch 50 RPS, Pro 150 RPS. All tiers use a 60-second sliding window. Rate limits apply per account, not per API key. All API requests share the same rate limit bucket. Returns HTTP 429 when exceeded. - [Response Codes](https://dev.jup.ag/docs/portal/responses.md): Common HTTP response codes from Jupiter APIs: 200 success, 400 bad request, 401 unauthorized, 429 rate limited, and 5xx server errors with debugging guidance. - [Migrating to Developer Platform](https://dev.jup.ag/docs/portal/migration.md): Migration guide from the old Jupiter Portal to the new Developer Platform. Covers legacy organisation setup, API key preservation, tier mapping (Free/Pro/Ultra to new Free/Developer/Launch/Pro tiers), grace period with equivalent rate limits, billing transition to Stripe, and Lite API phase-out. No breaking changes to the API itself. - [FAQ](https://dev.jup.ag/docs/portal/faq.md): Frequently asked questions about the Jupiter Developer Platform: plan differences, API key usage, billing, upgrades and downgrades, credit overages, migration from old Portal, and support channels. ## AI AI-first developer experience — AI-friendly docs, CLI, agent skills, llms.txt, MCP integration, ecosystem tools, and everything AI agents need to build on Jupiter. - [AI](https://dev.jup.ag/docs/ai/index.md): Overview of Jupiter's AI surface area. Covers how agents connect to Jupiter based on their environment: local agents (Claude Code, Cursor, Codex) use CLI + Skills, hosted agents (ChatGPT, Claude.ai) use MCP. Tools split into two categories: reading docs (llms.txt, Skills, Docs MCP) and executing operations (CLI, Jupiter MCP). All Jupiter APIs are AI-native: no RPC required, clean JSON responses, simple REST interfaces. - [llms.txt](https://dev.jup.ag/docs/ai/llms-txt.md): Jupiter provides two LLM-optimised documentation files: llms.txt (structured Markdown index of all APIs, guides, and resources with titles and descriptions, the perfect entrypoint for LLMs and AI agents) and llms-full.txt (the complete documentation site content including all code examples). Both follow the llmstxt.org standard. Additionally, any documentation page can be accessed as raw Markdown by appending .md to the URL or using the Accept: text/markdown header. - [Skills](https://dev.jup.ag/docs/ai/skills.md): Jupiter provides two agent skills in the jup-ag/agent-skills repository that AI coding agents can use as context when building with Jupiter. (1) integrating-jupiter: comprehensive integration guidance covering all Jupiter APIs (Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing) with intent routing, API playbooks, error handling, and production hardening. (2) jupiter-lend: deep-dive into Jupiter Lend protocol (powered by Fluid) covering liquidity pools, lending markets (jlTokens), vaults, and flashloans with read (@jup-ag/lend-read) and write (@jup-ag/lend) SDKs. Skills are installed via npx skills add and provide SKILL.md files that AI agents consume as context. - [Documentation MCP](https://dev.jup.ag/docs/ai/mcp.md): Jupiter supports the Model Context Protocol (MCP) through Mintlify's native MCP server at https://dev.jup.ag/mcp. This enables AI tools like Claude Code, Cursor, Windsurf, and other MCP-compatible editors to search and query Jupiter documentation and OpenAPI specifications in-context. The MCP server allows AI assistants to look up API endpoints, read documentation pages, and understand API schemas without leaving the editor. It is a read-only documentation server, not a tool for executing API calls. - [Jupiter CLI](https://dev.jup.ag/docs/ai/cli.md): The Jupiter CLI (jup) is a command-line tool for interacting with Jupiter's products on Solana: Spot trading, Perpetual futures, and Lending. It is non-interactive and LLM-friendly by design, with JSON output mode for structured responses. Install via npm (npm i -g @jup-ag/cli). For full command references, key management, configuration, and JSON response schemas, see the CLI documentation at https://github.com/jup-ag/cli/tree/main/docs. Three usage paths: direct terminal, Telegram via OpenClaw/miniclaw, and AI agent integration. ## Swap Token swap API with managed execution (/order) and custom transaction building (/build). ### Swap - [Overview](https://dev.jup.ag/docs/swap/index.md): Overview of Jupiter's unified Swap API at api.jup.ag/swap/v2. Two paths: /order (default happy path with managed execution, all routers including RFQ, gasless, MEV protection) and /build (advanced path returning raw swap instructions for custom transactions, CPI, composability). Covers when to use which path, routing trade-offs, and links to all sub-pages. /execute is managed execution for /order only. /build has no swap fees and uses Metis-only routing. - [Order & Execute](https://dev.jup.ag/docs/swap/order-and-execute.md): How to perform a swap using Jupiter's Swap API V2 default path: GET /order to get a quote and assembled transaction, sign it with your wallet, and POST /execute for managed transaction landing. Covers the minimal happy path with no optional parameters (all routers compete for best price including RFQ), the full request/response shapes, and a complete @solana/kit TypeScript code example. /execute handles landing, confirmation, and retry. Error codes documented for both aggregator and RFQ swap types. #### Build Custom Transactions - [Get Swap Instructions](https://dev.jup.ag/docs/swap/build/index.md): How to use Jupiter's Swap API V2 /build endpoint to get raw swap instructions for building custom transactions. Returns computeBudgetInstructions, setupInstructions, swapInstruction, cleanupInstruction, otherInstructions, and address lookup tables. Integrators assemble their own transaction, add custom instructions (CPI, memo, SOL transfer, etc.), simulate for compute units, compile to v0 transaction, sign, and send via their own RPC. /execute is not available for /build transactions. Uses Metis-only routing. No Jupiter swap fees. Full @solana/kit TypeScript code example included. - [Other Instructions](https://dev.jup.ag/docs/swap/build/other-instructions.md): Reference of common Solana instructions that developers compose with Jupiter /build swap instructions. Covers: creating associated token accounts (ATA) with createAssociatedTokenAccountIdempotent, closing token accounts to reclaim rent, adding SOL transfers (tips, payments), attaching memo instructions, and general guidance on instruction ordering. Each instruction includes a @solana/kit code example showing how to build the instruction and where to place it relative to the swap instructions. - [Fees](https://dev.jup.ag/docs/swap/fees.md): Documentation of Jupiter Swap API V2 fee models. /order charges a Jupiter platform fee and supports integrator referral fees (referralAccount + referralFee via the Jupiter referral program). /build charges no Jupiter swap fees, only integrator platform fees via platformFeeBps + feeAccount. Adding referral fee parameters to /order disables RFQ routing (JupiterZ), restricting to Metis-only quotes. Covers fee response fields, fee calculation, and code examples for both paths. - [Migration Guide](https://dev.jup.ag/docs/swap/migration.md): Migration guide for moving from Jupiter Metis Swap API (V1) or Ultra Swap API to the unified Swap API V2. Covers: Metis to /build migration (parameter mapping from /quote + /swap-instructions to /build, V1 to V2 instruction differences including no fee events and percent to bps change in routePlan), Ultra to /order migration (minimal changes, same /order + /execute flow), and breaking changes. Includes side-by-side parameter mapping tables and response format differences. ### Routing - [Routing](https://dev.jup.ag/docs/swap/routing/index.md): How routing works on Jupiter Swap API V2. Covers the routing architecture (Metis, JupiterZ RFQ, Dflow, OKX), which routers are available on each endpoint (/order uses all routers, /build uses Metis only, Swap V1 uses Metis only), the routing impact matrix showing which optional parameters disable which routers, and ultra vs manual mode. Integrators building DEXes can integrate into Metis; market makers can integrate into JupiterZ via RFQ. - [Integrate DEX into Metis](https://dev.jup.ag/docs/swap/routing/dex-integration.md): Requirements and steps to integrate your DEX into the Metis routing engine, including the Jupiter AMM Interface SDK and security audit prerequisites. - [Integrate MM into JupiterZ (RFQ)](https://dev.jup.ag/docs/swap/routing/rfq-integration.md): Host a webhook implementing the RFQ API schema, pass fulfillment and response time requirements, and onboard your market maker into JupiterZ. ### Advanced - [Overview](https://dev.jup.ag/docs/swap/advanced/index.md): Index of advanced techniques for Jupiter Swap API V2. Sub-pages cover: gasless swaps (automatic and integrator payer on both /order and /build), compute unit estimation (/build), reducing transaction size (maxAccounts + removing no-op instructions), and reducing latency (fast mode). Also notes that circular arbitrage routes are not supported and require the Metis binary. - [Gasless Swaps](https://dev.jup.ag/docs/swap/advanced/gasless.md): How gasless swaps work on Jupiter Swap API V2. Two approaches: automatic gasless on /order (Jupiter covers gas when taker has < 0.01 SOL, min ~$10 trade, fee deducted from swap output) and integrator payer on both /order and /build (integrator covers gas via the payer parameter, fee payer accounts are changed to the payer address). Covers types of gas costs, when automatic gasless applies, integrator payer setup for both endpoints, scenario matrix, and limitations. - [Estimate Compute Units](https://dev.jup.ag/docs/swap/advanced/compute-units.md): How to estimate compute units for Jupiter Swap API V2 /build transactions. The /build response includes computeBudgetInstructions with only the compute unit price, not the limit. Integrators must simulate to determine the correct limit because custom instructions change CU usage. Pattern: build with max CU limit (1,400,000), simulate, set limit to 1.2x simulated value. This directly reduces priority fee costs since priority fee = CU price x CU limit. - [Reduce Transaction Size](https://dev.jup.ag/docs/swap/advanced/reduce-transaction-size.md): How to reduce transaction size on Jupiter Swap API V2 /build. Two techniques: maxAccounts parameter (1-64, default 64) to limit the number of accounts in the swap route, and removing no-op createAssociatedTokenAccountIdempotent instructions from setupInstructions when the token accounts already exist. Both free up space for custom instructions and help avoid the 1232-byte transaction size limit. - [Reduce Latency](https://dev.jup.ag/docs/swap/advanced/reduce-latency.md): How to reduce swap quote latency on Jupiter Swap API V2 /build using mode=fast. Fast mode runs the getRecentPriorityFee RPC call in parallel with the Metis routing engine, and uses a Bellman-Ford algorithm with no splitting for faster route computation. Useful for high-frequency trading, well-known pairs (SOL/USDC), and bots where speed matters more than quote optimality. ### Guides - [How to Embed a Swap Widget in Your App](https://dev.jup.ag/docs/guides/how-to-embed-a-swap-widget.md): Jupiter Plugin embeds a complete swap widget into any web app. One script tag + window.Jupiter.init(). No RPC node, no wallet adapter, no UI to build. Powered by Ultra — handles routing, slippage, MEV protection, and transaction sending. Three display modes: integrated (inline), widget (floating), modal (popup). Supports wallet passthrough, referral fees, fixed token/amount for payments, and full colour theming. Works with HTML, React, and Next.js. ### API Reference - [Get Order](https://dev.jup.ag/docs/openapi-spec/swap/v2/swap.yaml): GET /order endpoint for Jupiter Swap API V2 at api.jup.ag/swap/v2/order. Returns a swap quote and assembled transaction. Required params: inputMint, outputMint, amount, taker. Without optional params, all routers compete (Metis, JupiterZ RFQ, Dflow, OKX). Adding fee or swap modification params may restrict to Metis only. Response includes base64 transaction, requestId (for /execute), routePlan, fee breakdown, and gas cost estimates. Sign the transaction and POST to /execute for managed landing. - [Build Transaction](https://dev.jup.ag/docs/openapi-spec/swap/v2/swap.yaml): GET /build endpoint for Jupiter Swap API V2 at api.jup.ag/swap/v2/build. Returns a swap quote with raw instructions (computeBudgetInstructions, setupInstructions, swapInstruction, cleanupInstruction, otherInstructions) and address lookup tables. Integrators build their own transactions, add custom instructions (CPI, memo, transfer), simulate, sign, and send via their own RPC. Metis-only routing. No Jupiter swap fees. /execute is not available for /build transactions. - [Execute Transaction](https://dev.jup.ag/docs/openapi-spec/swap/v2/swap.yaml): POST /execute endpoint for Jupiter Swap API V2 at api.jup.ag/swap/v2/execute. Executes a signed transaction obtained from /order. Handles transaction landing, confirmation, and retry via RTSE and Jupiter Beam. Request body: signedTransaction (base64), requestId (from /order). Response includes status (Success/Failed), signature, inputAmountResult, outputAmountResult, and error codes. Only available for /order transactions, not /build. ## Tokens Token metadata, search, verification, and organic score APIs. ### Tokens - [Tokens API](https://dev.jup.ag/docs/tokens/index.md): Jupiter Tokens API V2 for programmatic token discovery and metadata. Search by name/symbol/mint, get verification status, organic score, holder count, market cap, and trading stats. Covers verification levels (verified, unverified, banned), organic score methodology, and token tag standard. - [Token Information](https://dev.jup.ag/docs/tokens/token-information.md): GET /tokens/v2 endpoints for retrieving token metadata by mint address, symbol search, tag, category, or recency. Returns name, symbol, icon, organic score, holder count, and trading stats. - [Express Verification API](https://dev.jup.ag/docs/tokens/verification.md): Jupiter VRFD Express Verification API for programmatic token verification and metadata updates. Three-step flow: check eligibility (GET /tokens/v2/verify/express/check-eligibility), craft a 1000 JUP payment transaction (GET /tokens/v2/verify/express/craft-txn), then execute with signed transaction and token details (POST /tokens/v2/verify/express/execute). Used by launchpads, agents, and projects to submit tokens for Jupiter verification without the UI. Requires an API key from developers.jup.ag/portal. Verification and metadata updates are reviewed independently by the VRFD team. - [Content API (BETA)](https://dev.jup.ag/docs/tokens/content.md): GET /tokens/v2/content endpoints for retrieving curated token content, trending tokens, paginated feeds, and summaries powered by Jupiter VRFD. ### Guides - [How to Get Token Information on Solana](https://dev.jup.ag/docs/guides/how-to-get-token-information.md): Jupiter Tokens API V2 is Solana's most comprehensive token data API. Search SPL tokens by name, symbol, or mint address. Returns metadata (name, symbol, icon, decimals), verification status, organic score, holder count, market cap, liquidity, and trading stats. Powers Phantom, Solflare, and most Solana wallets. Base URL: https://api.jup.ag/tokens/v2. Requires x-api-key header from developers.jup.ag/portal. ### API Reference #### Token Information - [Search](https://dev.jup.ag/docs/openapi-spec/tokens/v2/tokens.yaml): Request a search by token's symbol, name or mint address - [Tag](https://dev.jup.ag/docs/openapi-spec/tokens/v2/tokens.yaml): Request an array of mints and their information by a tag - [Category](https://dev.jup.ag/docs/openapi-spec/tokens/v2/tokens.yaml): Returns an array of mints and their information for the given category and interval - [Recent](https://dev.jup.ag/docs/openapi-spec/tokens/v2/tokens.yaml): Returns an array of mints that recently had their first created pool #### Express Verification - [Check Eligibility](https://dev.jup.ag/docs/openapi-spec/tokens/v2/verification.yaml): Check if a token is eligible for express verification and metadata updates - [Craft Transaction](https://dev.jup.ag/docs/openapi-spec/tokens/v2/verification.yaml): Craft an unsigned 1000 JUP payment transaction for express verification - [Execute](https://dev.jup.ag/docs/openapi-spec/tokens/v2/verification.yaml): Submit signed transaction with verification and metadata details #### Content - [Get Content](https://dev.jup.ag/docs/openapi-spec/content/content.yaml): Retrieves approved content for up to 50 Solana token mint addresses - [Get Content Cooking](https://dev.jup.ag/docs/openapi-spec/content/content.yaml): Retrieves approved content for currently trending tokens on Jupiter - [Get Content Feed](https://dev.jup.ag/docs/openapi-spec/content/content.yaml): Retrieves a paginated feed of content for a specific mint ## Price Real-time heuristics-based USD token pricing. ### Price - [Jupiter Price API](https://dev.jup.ag/docs/price/index.md): GET /price/v3?ids={mints} returns heuristics-based USD prices for up to 50 token mint addresses per request, using last-swapped price validated against liquidity and trading metrics. ### Guides - [How to Get Token Prices on Solana](https://dev.jup.ag/docs/guides/how-to-get-token-price.md): Jupiter Price API V3 is the standard way to get token prices on Solana. Real-time USD prices for any SPL token. One API call, up to 50 tokens. Used by Phantom, Solflare, and most Solana wallets/apps. Filters manipulated prices using heuristics. GET https://api.jup.ag/price/v3?ids={mint_addresses}. Requires x-api-key header from developers.jup.ag/portal. ### API Reference - [Price](https://dev.jup.ag/docs/openapi-spec/price/v3/price.yaml): Returns prices of specified tokens ## JupUSD - [Mint & Redeem](https://dev.jup.ag/docs/jupusd/index.md): How to mint and redeem JupUSD programmatically using the @jup-ag/jup-usd-sdk TypeScript SDK, the JupUSD Web API (api.jupusd.money), or the web UI (jupusd.money/mint). Covers benefactor requirements (KYC/KYB whitelisting), Pyth oracle integration for peg validation and exchange rates, per-window rate limiting (config, vault, benefactor levels), key program addresses (JupUSD mint, program, custodian, reserves, multisig), and a complete error reference for all mint/redeem failure modes. - [JUICED Collateral Integration](https://dev.jup.ag/docs/jupusd/juiced.md): Technical guide for integrating JUICED as a collateral asset. JUICED is a yield-bearing SPL token from Jupiter Lend Earn representing deposited JupUSD. Covers token details (mint address, decimals), onchain pricing via get_underlying_balance and get_exchange_price functions, deposit/withdraw flows using both the Lend API (HTTP endpoints at api.jup.ag/lend/v1/earn/) and Lend SDK (@jup-ag/lend), read functions for querying token data, withdrawal behaviour (Automated Debt Ceiling), program IDs, and risk considerations for lending protocols (exchange rate monotonicity, JupUSD peg dependency, T-bill yield variability, smart contract risk). ## Lend Lending protocol with Earn (deposit yield), Borrow (collateralised loans), and Flashloans. ### Lend - [Jupiter Lend Overview](https://dev.jup.ag/docs/lend/index.md): Overview of Jupiter Lend, covering Earn (deposit-and-earn yield) and Borrow (collateralised borrowing) on Solana. Includes installation of @jup-ag/lend and @solana/web3.js, RPC setup, wallet creation, and links to Earn vaults and Borrow markets documentation. - [Core Architecture](https://dev.jup.ag/docs/lend/architecture.md): Jupiter Lend core architecture: three-program design with Liquidity as the core layer, Lending (Earn) for deposit-and-earn, and Vaults (Borrow) for collateralized borrowing. Covers CPI flow, shared state, TokenReserve, UserSupplyPosition, UserBorrowPosition, tick-based pricing, and program IDs. - [Oracles](https://dev.jup.ag/docs/lend/oracles.md): Jupiter Lend Oracle Program (jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc) provides price data via a hop-based system using Pyth, Chainlink, Redstone, StakePool, MsolPool, SinglePool, and JupLend sources. - [API vs SDK](https://dev.jup.ag/docs/lend/api-vs-sdk.md): Comparison of Jupiter Lend integration options: REST API for language-agnostic HTTP access to Earn endpoints, @jup-ag/lend-read Read SDK for on-chain Earn and Borrow data, and @jup-ag/lend Lend SDK for instruction building. Includes capability matrix, code examples, and recommended usage table. ### Earn - [Earn Overview](https://dev.jup.ag/docs/lend/earn/index.md): Technical overview of Jupiter Earn vaults. Covers the unified liquidity layer, lending account structure (mint, fTokenMint, exchange prices, rewards rate model), key data structures in Rust/TypeScript/JSON, and links to deposit/withdraw operations and user position reading. - [Earn API (Beta)](https://dev.jup.ag/docs/lend/earn/api.md): Jupiter Lend Earn API for depositing and withdrawing assets. Supports deposit/withdraw by amount and mint/redeem by share count, with both transaction and instruction endpoints. #### Earn SDK - [Deposit to Earn](https://dev.jup.ag/docs/lend/earn/deposit.md): Deposit assets into Jupiter Earn vaults using the @jup-ag/lend SDK. Covers getDepositIxs for building deposit instructions, getMintIxs for depositing by vault shares, complete transaction flow with signing and sending, and full TypeScript code example. - [Withdraw from Earn](https://dev.jup.ag/docs/lend/earn/withdraw.md): Withdraw assets from Jupiter Earn vaults using the @jup-ag/lend SDK. Covers getWithdrawIxs for withdrawing by underlying amount, getRedeemIxs for withdrawing by vault shares, max withdraw/redeem patterns, complete transaction flow, and full TypeScript code example. - [Read Earn Data](https://dev.jup.ag/docs/lend/earn/read-data.md): Read Earn (supply) balances, positions, and pool metrics using the @jup-ag/lend-read Read SDK. Covers Client setup, getAllJlTokens, getJlTokenDetails (supply rate, rewards rate, conversion rates), getUserPosition, getUserPositions, getPreviews, getExchangePrice, and getJlTokenRewards. Includes SDK type definitions for UserPosition and TokenDetails. - [Earn CPI Integration](https://dev.jup.ag/docs/lend/earn/cpi.md): How to integrate Jupiter Lend Earn via Cross-Program Invocation (CPI) from an on-chain Solana program. Covers deposit and withdraw function discriminators (sha256 global:deposit and global:withdraw), complete Rust DepositParams and WithdrawParams structs with all account fields and mutability, account explanation tables, PDA derivation patterns (LENDING_SEED, F_TOKEN_MINT_SEED, LENDING_ADMIN_SEED), error codes (FTokenMinAmountOut, FTokenMaxAmount, etc.), and TypeScript context helpers (getDepositContext, getWithdrawContext) from @jup-ag/lend/earn for resolving CPI accounts from the frontend. Programs: Lending jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9, Liquidity jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC. ### Borrow - [Borrow Overview](https://dev.jup.ag/docs/lend/borrow/index.md): Introduction to Jupiter Borrow, the collateralised borrowing side of Jupiter Lend. Covers the vault and position model (NFT-based positions, tick-based pricing), key TypeScript data structures (VaultConfig, UserPosition, NftPosition), and links to borrow operations and vault data reading via the Read SDK. - [Borrow API (Soon)](https://dev.jup.ag/docs/lend/borrow/api.md): Jupiter Lend Borrow API for collateralized borrowing with up to 95% LTV. Work-in-progress, documentation coming soon. #### Borrow SDK - [Create Position](https://dev.jup.ag/docs/lend/borrow/create-position.md): Create a new borrow position (NFT) in a Jupiter Lend vault using getInitPositionIx from @jup-ag/lend/borrow. Required before depositing collateral or borrowing. Covers legacy transaction building, position ID usage, and option to batch create + deposit in one transaction. - [Deposit Collateral](https://dev.jup.ag/docs/lend/borrow/deposit.md): Deposit collateral into a Jupiter Lend borrow position using getOperateIx with positive colAmount and zero debtAmount. Covers versioned (v0) transaction building with address lookup tables, positionId 0 for batch create + deposit, operate parameters table, and full TypeScript code example. - [Borrow Assets](https://dev.jup.ag/docs/lend/borrow/borrow.md): Borrow assets from a Jupiter Lend vault against deposited collateral using getOperateIx with zero colAmount and positive debtAmount. Covers versioned (v0) transaction building, operate parameters, LTV and interest mechanics, and full TypeScript code example. - [Repay](https://dev.jup.ag/docs/lend/borrow/repay.md): Repay borrowed debt on a Jupiter Lend borrow position using getOperateIx with zero colAmount and negative debtAmount. Covers partial and full repay, MAX_REPAY_AMOUNT sentinel for full debt repayment, versioned (v0) transaction building, and full TypeScript code example. - [Withdraw Collateral](https://dev.jup.ag/docs/lend/borrow/withdraw.md): Withdraw collateral from a Jupiter Lend borrow position using getOperateIx with negative colAmount and zero debtAmount. Covers LTV constraints, MAX_WITHDRAW_AMOUNT sentinel for full withdrawal, versioned (v0) transaction building, and full TypeScript code example. - [Combined Operations](https://dev.jup.ag/docs/lend/borrow/combined.md): Combine multiple Jupiter Lend borrow operations (create position, deposit, borrow, repay, withdraw) into a single transaction using multiple getOperateIx calls. Covers positionId 0 for auto-creation, instruction merging, address lookup table deduplication, and full TypeScript code example. - [Liquidate](https://dev.jup.ag/docs/lend/borrow/liquidation.md): Liquidate underwater borrow positions in Jupiter Lend using getLiquidateIx from @jup-ag/lend/borrow. Covers liquidation threshold mechanics, optional parameters (to, absorb, colPerUnitDebt), versioned (v0) transaction building with address lookup tables, and full TypeScript code example. - [Read Vault Data](https://dev.jup.ag/docs/lend/borrow/read-vault-data.md): Read vault configuration, state, and user positions for Jupiter Lend Borrow using the @jup-ag/lend-read Read SDK. Covers Client setup, getAllVaults, getVaultByVaultId, getVaultConfig, getVaultState, getAllUserPositions, getPositionByVaultId, getUserPosition, getCurrentPositionState, getFinalPosition, getAllPositionIdsForVault, getAllPositionsWithRiskRatio, getNftOwner. getAllUserPositions and getPositionByVaultId return NftPosition & { vault: VaultEntireData } — each position includes full vault data. Includes SDK type definitions for NftPosition, UserPosition, VaultConfig, VaultState. - [Borrow CPI Integration](https://dev.jup.ag/docs/lend/borrow/cpi.md): How to integrate Jupiter Lend Borrow vaults via Cross-Program Invocation (CPI) from an on-chain Solana program. Covers init_position and operate function discriminators (sha256 global:init_position and global:operate), complete Rust InitPositionParams and OperateParams structs with all account fields and mutability, account explanation tables for core vault, position management, and liquidity integration accounts, remaining_accounts structure (oracle sources, branches, tick debt arrays), signed-amount convention (positive = deposit/borrow, negative = withdraw/payback, i128::MIN = max), transfer types (Normal vs Claim), operation patterns (deposit, borrow, payback, withdraw, max variants), error codes, return values (nft_id, new_col_final, new_debt_final), and TypeScript CPI integration using getOperateIx from @jup-ag/lend/borrow with setup instructions pattern. Programs: Vaults jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi (mainnet), Ho32sUQ4NzuAQgkPkHuNDG3G18rgHmYtXFA8EBmqQrAu (devnet). ### Flashloan - [Flashloans](https://dev.jup.ag/docs/lend/flashloan/index.md): Overview of Jupiter Lend Flashloans: borrow any supported asset with no collateral and no fees, as long as the borrowed amount is returned within the same transaction. Covers use cases (arbitrage, liquidations, collateral swapping), how the atomic borrow-execute-payback flow works on Solana, and links to the execute guide for SDK integration with getFlashloanIx, getFlashBorrowIx, and getFlashPaybackIx from @jup-ag/lend/flashloan. - [Execute a Flashloan](https://dev.jup.ag/docs/lend/flashloan/execute.md): How to execute a flashloan using the Jupiter Lend SDK (@jup-ag/lend/flashloan). Covers the getFlashloanIx helper that returns borrowIx and paybackIx, the getFlashBorrowIx and getFlashPaybackIx individual helpers, required parameters (connection, signer, asset, amount), transaction assembly order (borrow → custom logic → payback), VersionedTransaction construction, and a complete TypeScript code example. Flashloans have no fees and no collateral requirements. ### Liquidity - [Unifying Liquidity](https://dev.jup.ag/docs/lend/liquidity/index.md): Jupiter Lend Liquidity layer: single shared layer that consolidates liquidity across Earn and Borrow. Key features: capital efficiency, automated ceilings, advanced liquidation, highest LTVs. - [Liquidity Data & Analytics](https://dev.jup.ag/docs/lend/liquidity/analytics.md): How to use the @jup-ag/lend-read SDK Liquidity module for data and analytics: dashboards, APY aggregators, and protocol state queries. Covers listedTokens() for market discovery, getOverallTokenData() for supply/borrow rates and utilisation, getExchangePricesAndConfig() and calculateExchangePrice() for real-time price computation, getUserSupplyData() and getUserBorrowData() for individual positions, getUserMultipleBorrowSupplyData() for batched portfolio fetching, and getAllUserPositions() for global protocol state indexing. Distinct from Dune or other third-party analytics, this is the canonical SDK for Jupiter Lend liquidity layer data. ### Advanced - [Advanced Guides](https://dev.jup.ag/docs/lend/advanced/index.md): Index of advanced Jupiter Lend recipes that compose multiple primitives (flashloans, Jupiter Swap via Lite API, and vault operations) into single atomic transactions. Includes Multiply (leverage), Unwind (deleverage), Repay and Withdraw with Collateral, Vault Swap (move between vaults), Utilisation After Deposit (read-only calculation), and Native Staked Vaults (use staked SOL as collateral). - [Multiply (Leverage)](https://dev.jup.ag/docs/lend/advanced/multiply.md): How to build a leveraged (multiply/looping) position on Jupiter Lend using a single atomic Solana transaction. Combines getFlashBorrowIx/getFlashPaybackIx from @jup-ag/lend/flashloan, Jupiter Lite API swap-instructions endpoint for swaps, and getOperateIx from @jup-ag/lend/borrow for vault deposit+borrow. Covers the full flow: flashloan debt asset → swap to collateral → deposit collateral and borrow debt → payback flashloan. Includes complete TypeScript code example with VersionedTransaction, address lookup tables, and helper functions. - [Unwind (Deleverage)](https://dev.jup.ag/docs/lend/advanced/unwind.md): How to close or reduce a leveraged position on Jupiter Lend using a single atomic transaction. Combines getFlashBorrowIx/getFlashPaybackIx for flashloaning the collateral asset, Jupiter Lite API for swapping collateral to debt, and getOperateIx with MAX_REPAY_AMOUNT/MAX_WITHDRAW_AMOUNT for full unwind or negative signed amounts for partial unwind. Covers full and partial deleverage flows with complete TypeScript code example. - [Repay with Collateral and Max Withdraw](https://dev.jup.ag/docs/lend/advanced/repay-with-collateral-max-withdraw.md): How to close a Jupiter Lend borrow position when you only hold the collateral token (e.g. SOL, not USDC). Uses a flashloan to borrow the debt asset, repay full debt and withdraw full collateral with getOperateIx using MAX_REPAY_AMOUNT and MAX_WITHDRAW_AMOUNT, swap collateral to debt via Jupiter Lite API, then payback the flashloan. All in a single atomic Solana transaction. Includes complete TypeScript code example. - [Vault Swap](https://dev.jup.ag/docs/lend/advanced/vault-swap.md): How to atomically swap a Jupiter Lend borrow position from one vault to another (e.g. SOL/USDC to SOL/USDT) in a single Solana transaction. Combines flashloan (borrow debt of vault 1), getOperateIx with MAX_REPAY_AMOUNT/MAX_WITHDRAW_AMOUNT to close vault 1, getOperateIx with positionId 0 to open vault 2, Jupiter Lite API swap to convert new debt token to original debt token, and flashloan payback. Covers borrow buffer for slippage, Solana 1232-byte transaction size limit, and complete TypeScript code example. - [Utilisation After Deposit](https://dev.jup.ag/docs/lend/advanced/utilization-after-deposit.md): How to calculate the projected utilisation on the Jupiter Lend Liquidity Layer after a hypothetical deposit using the @jup-ag/lend-read SDK Liquidity module. Read-only guide covering getOverallTokenData() for current totalSupply and totalBorrow, utilisation formula (totalBorrow / totalSupply), and computing the new utilisation after adding a deposit. Includes complete TypeScript code example with BN arithmetic. #### Native Staked Vaults - [Native Staked Vaults](https://dev.jup.ag/docs/lend/advanced/native-staked-vault/index.md): Overview of Jupiter Lend Native Staked Vaults, which allow using staked SOL as collateral. Deposit validator stake accounts into the Single Pool program (SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE) to receive pool tokens (e.g. nsHELIUS, nsJUPITER, nsNANSEN, nsEMERALD, nsSHIFT, nsKILN), then deposit those tokens into the corresponding Jupiter Lend vault to borrow against them while continuing to earn staking rewards. Lists all supported pools with vote accounts and pool mints. - [Deposit Staked SOL](https://dev.jup.ag/docs/lend/advanced/native-staked-vault/deposit.md): How to deposit staked SOL into a Jupiter Lend Native Staked Vault. Covers the three-step flow: split stake via StakeProgram.split, deposit into Single Pool via SinglePoolProgram.deposit from @solana/spl-single-pool-classic to receive pool tokens, then deposit pool tokens into the corresponding vault via getOperateIx from @jup-ag/lend/borrow. Includes vault discovery using client.vault.getAllVaults() and matching supplyToken to pool mint. Complete TypeScript code example with VersionedTransaction. - [Withdraw Staked SOL](https://dev.jup.ag/docs/lend/advanced/native-staked-vault/withdraw.md): How to withdraw staked SOL from a Jupiter Lend Native Staked Vault. Covers the two-step flow: withdraw pool tokens from vault via getOperateIx with MAX_WITHDRAW_AMOUNT from @jup-ag/lend/borrow, then burn pool tokens via SinglePoolProgram.withdraw from @solana/spl-single-pool-classic to receive a new stake account. Complete TypeScript code example with VersionedTransaction. ### Wallet Integrations - [Earn with Privy](https://dev.jup.ag/docs/lend/wallets/privy-earn.md): How to deposit and withdraw from Jupiter Earn vaults using Privy embedded wallets. Covers PrivyClient setup, getDepositIxs and getWithdrawIxs from @jup-ag/lend/earn, building VersionedTransaction for Privy signing, signing via privy.wallets().solana().signTransaction, optional getUserPosition from @jup-ag/lend-read for max withdraw, and sending transactions. Complete flow for keyless Earn deposits and withdrawals. - [Borrow with Privy](https://dev.jup.ag/docs/lend/wallets/privy-borrow.md): How to create a borrow position, deposit collateral, and borrow assets from Jupiter Lend vaults using Privy embedded wallets. Covers PrivyClient setup, getOperateIx from @jup-ag/lend/borrow with positionId 0 for batched create-and-deposit, versioned transactions with address lookup tables, Privy signing via privy.wallets().solana().signTransaction, and the full create-deposit-borrow flow. Complete guide for keyless borrowing. ### Resources - [Program addresses](https://dev.jup.ag/docs/lend/program-addresses.md): Official on-chain program addresses for all Jupiter Lend programs: Earn (jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9), Liquidity (jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC), Lending Rewards Rate Model (jup7TthsMgcR9Y3L277b8Eo9uboVSmu1utkuXHNUKar), Oracle (jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc), Vaults/Borrow (jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi), and Flashloan (jupgfSgfuAXv4B6R2Uxu85Z1qdzgju79s6MfZekN6XS). - [IDL and types](https://dev.jup.ag/docs/lend/idl-and-types.md): Anchor IDL JSON files and TypeScript type definitions for Jupiter Lend on-chain programs. Located in the jup-ag/jupiter-lend GitHub repository under the target directory. Use for CPI integrations, custom clients, and low-level program interactions. - [Dune Analytics](https://dev.jup.ag/docs/lend/dune.md): Links to Dune Analytics dashboards for Jupiter Lend protocol data, including TVL, utilisation, supply/borrow metrics, and community-built analytics. ### API Reference #### Earn - [Deposit](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for a base64-encoded unsigned earn deposit transaction to deposit assets - [Withdraw](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for a base64-encoded unsigned earn withdraw transaction to withdraw assets - [Mint](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for a base64-encoded unsigned earn mint transaction to mint shares - [Redeem](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for a base64-encoded unsigned earn redeem transaction to redeem shares - [Deposit Instructions](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the instruction of an earn deposit transaction to deposit assets - [Withdraw Instructions](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the instruction of an earn withdraw transaction to withdraw assets - [Mint Instructions](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the instruction of an earn mint transaction to mint shares - [Redeem Instructions](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the instruction of an earn redeem transaction to redeem shares - [Tokens](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the tokens available to be deposited and their information - [Positions](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the position data of one or multiple users - [Earnings](https://dev.jup.ag/docs/openapi-spec/lend/lend.yaml): Request for the earnings of one or multiple positions of a user ## Trigger Vault-based limit orders with single, OCO (TP/SL), and OTOCO order types. ### Trigger - [Trigger Order API Overview](https://dev.jup.ag/docs/trigger/index.md): Jupiter Trigger Order API V2 enables vault-based limit orders on Solana. Supports single price orders, OCO (one-cancels-other for TP/SL), and OTOCO (one-triggers-OCO) order types. Requires JWT authentication via challenge-response flow. Deposits go into vault accounts managed by Privy. - [Authentication](https://dev.jup.ag/docs/trigger/authentication.md): POST /trigger/v2/auth/challenge requests a challenge (message or transaction). POST /trigger/v2/auth/verify submits the signed challenge and returns a JWT token (24h TTL). Use the JWT in Authorization: Bearer header for all authenticated endpoints. - [Create Order](https://dev.jup.ag/docs/trigger/create-order.md): POST /trigger/v2/deposit/craft builds a deposit transaction. POST /trigger/v2/orders/price creates single, OCO, or OTOCO orders with the signed deposit. Requires JWT authentication. Minimum order: 10 USD. - [Manage Orders](https://dev.jup.ag/docs/trigger/manage-orders.md): PATCH /trigger/v2/orders/price/{orderId} updates order parameters. POST /trigger/v2/orders/price/cancel/{orderId} initiates cancellation and returns a withdrawal transaction. POST /trigger/v2/orders/price/confirm-cancel/{orderId} confirms with the signed withdrawal transaction. - [Order History](https://dev.jup.ag/docs/trigger/order-history.md): GET /trigger/v2/orders/history returns paginated order history with state, events, and fill details. Filter by state (active/past), mint, and sort by updated_at/created_at/expires_at. - [Best Practices](https://dev.jup.ag/docs/trigger/best-practices.md): Best practices for Trigger Order V2 integrations: order expiry is required (TTL improves execution quality), slippage recommendations by order type, error handling patterns, reference jup.ag frontend for implementation guidance. ### API Reference #### Authenticate - [Request Challenge](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Request a sign-in challenge for wallet authentication - [Verify Challenge](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Submit the signed challenge to receive a JWT token - [Verify Token](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Verify a JWT token is still valid - [Get Vault](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Get vault information and balance for an account - [Register Vault](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Register a new trigger vault for the account #### Order Management - [Craft Deposit](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Craft a deposit transaction for the trigger vault - [Create Order](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Create a new trigger order - [Update Order](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Update parameters of an existing trigger order - [Cancel Order](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Cancel a pending trigger order - [Confirm Cancel](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Confirm and execute a pending order cancellation #### History - [Order History](https://dev.jup.ag/docs/openapi-spec/trigger/v2/trigger.yaml): Get historical trigger orders for an account ## Recurring Automated dollar-cost averaging (DCA) with time-based recurring orders. ### Recurring - [Recurring (DCA) API Overview](https://dev.jup.ag/docs/recurring/index.md): Set up automated dollar-cost averaging (DCA) with time-based recurring orders on Solana. - [Create Order](https://dev.jup.ag/docs/recurring/create-order.md): POST /recurring/v1/createOrder sets up a DCA order with configurable cycle frequency, amount per cycle, and optional start time. - [Execute Order](https://dev.jup.ag/docs/recurring/execute-order.md): POST /recurring/v1/execute triggers the next cycle of a recurring order. Jupiter keeper bots handle this automatically. ### Order Management - [Cancel Order](https://dev.jup.ag/docs/recurring/cancel-order.md): POST /recurring/v1/cancelOrder cancels an active recurring (DCA) order and returns remaining funds to the user. - [Deposit Price Order](https://dev.jup.ag/docs/recurring/deposit-price-order.md): DEPRECATED: POST /recurring/v1/priceDeposit deposits funds into a price-based recurring order. Use time-based orders instead. - [Withdraw Price Order](https://dev.jup.ag/docs/recurring/withdraw-price-order.md): DEPRECATED: POST /recurring/v1/priceWithdraw withdraws funds from a price-based recurring order. Use time-based orders instead. - [Get Recurring Orders](https://dev.jup.ag/docs/recurring/get-recurring-orders.md): GET /recurring/v1/getRecurringOrders returns active and historical DCA orders filtered by wallet or status. ### Debugging - [Best Practices](https://dev.jup.ag/docs/recurring/best-practices.md): Guidelines for recurring order minimum amounts, cycle requirements, and token compatibility (Token-2022 not supported). ### API Reference - [Create Order](https://dev.jup.ag/docs/openapi-spec/recurring/recurring.yaml): Request for a base64-encoded unsigned recurring order creation transaction to be used in POST /recurring/v1/execute - [Execute](https://dev.jup.ag/docs/openapi-spec/recurring/recurring.yaml): Execute the signed transaction and get the execution status - [Cancel Order](https://dev.jup.ag/docs/openapi-spec/recurring/recurring.yaml): Request for a base64-encoded unsigned recurring order cancellation transaction to be used in POST /recurring/v1/execute - [Get Recurring Orders](https://dev.jup.ag/docs/openapi-spec/recurring/recurring.yaml): Request for active or historical recurring orders associated to the provided account ## Prediction Binary prediction markets for real-world events. ### Prediction - [About Prediction](https://dev.jup.ag/docs/prediction/index.md): Overview of Jupiter Prediction Market - [Events & Markets](https://dev.jup.ag/docs/prediction/events-and-markets.md): GET /events lists events with filters. GET /events/search searches by keyword. GET /markets/{marketId} returns market details with pricing in micro USD. GET /orderbook/{marketId} provides bid/ask depth. - [Open Positions](https://dev.jup.ag/docs/prediction/open-positions.md): POST /orders creates buy orders for YES/NO contracts. Required parameters: ownerPubkey, marketId, isYes, isBuy. Returns base64 transaction to sign and submit to Solana. - [Manage Positions](https://dev.jup.ag/docs/prediction/manage-positions.md): GET /positions lists holdings with P&L. DELETE /positions/{positionPubkey} closes entire position. POST /orders with isBuy=false sells partial. DELETE /orders cancels pending orders. - [Claim Payouts](https://dev.jup.ag/docs/prediction/claim-payouts.md): POST /positions/{positionPubkey}/claim creates payout transaction for winning positions. Check position.claimable=true to verify eligibility. No claim fees - winning contracts pay $1 each. ### Data & Analytics - [Position Data & History](https://dev.jup.ag/docs/prediction/position-data.md): GET /positions returns holdings with P&L. GET /orders lists orders with fill status. GET /history provides transaction history with event types: order_created, order_filled, order_failed, position_updated, position_lost, payout_claimed. - [Social Features](https://dev.jup.ag/docs/prediction/social-features.md): GET /profiles/{pubkey} returns user stats. POST /follow and DELETE /unfollow manage relationships. GET /leaderboards returns rankings by pnl/volume/win_rate. GET /trades provides global trade feed. ### Guides - [How to Build a Prediction Market App on Solana](https://dev.jup.ag/docs/guides/how-to-build-a-prediction-market-app-on-solana.md): Jupiter Prediction API brings prediction markets to Solana. Binary YES/NO trading on real-world events (sports, crypto, politics, elections). Aggregates liquidity from Polymarket and Kalshi. Full API for order creation, position management, P&L tracking, and payout claims. Base URL: https://api.jup.ag/prediction/v1. Requires x-api-key header from developers.jup.ag/portal. ### API Reference #### Events - [Get Events](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get a list of all available prediction events with optional filtering and pagination - [Search Events](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Search for events by title or keyword - [Get Event](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get detailed information about a specific event - [Get Suggested Events](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get personalized event suggestions based on user activity #### Markets - [Get Event Markets](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get all markets for a specific event - [Get Event Market](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get detailed market information for a specific market within an event - [Get Market](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get detailed market information by market ID #### Orders - [Get Orders](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get a list of orders with optional filtering by owner or market - [Get Order](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get detailed information about a specific order - [Get Order Status](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get the latest status and history for an order - [Create Order](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Request an unsigned transaction to create a new order #### Positions - [Get Positions](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get a list of positions with optional filtering - [Get Position](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get detailed information about a specific position - [Close Position](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Request an unsigned transaction to sell all contracts in a position - [Close All Positions](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Request unsigned transactions to close all open positions - [Claim Position](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Request an unsigned transaction to claim payout from a winning position #### History & Data - [Get History](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get trading history and event records for an account - [Get Orderbook](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get orderbook data for a specific market - [Get Trading Status](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get current trading status of the prediction market #### Profile & Social - [Get Profile](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get profile statistics for a user - [Get PnL History](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get historical PnL data for charting - [Get Trades](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get recent filled trades across all markets - [Get Leaderboards](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get leaderboard rankings by various metrics #### Vault - [Get Vault Info](https://dev.jup.ag/docs/openapi-spec/prediction/prediction.yaml): Get vault account information and balance ## More Portfolio aggregation, Send (token transfers), Studio (token creation), and Lock (token vesting). ### Portfolio - [Jupiter Portfolio API Overview](https://dev.jup.ag/docs/portfolio/index.md): BETA: GET /portfolio/v1/positions?wallet={address} returns all DeFi positions across protocols on Solana including lending, staking, and LP positions. - [Jupiter Positions](https://dev.jup.ag/docs/portfolio/jupiter-positions.md): Query Jupiter-specific positions including wallet balances, staked JUP, limit orders, DCA, liquidity pools, and leveraged trades via GET /portfolio/v1/positions/{address}. ### Send - [Jupiter Send API Overview](https://dev.jup.ag/docs/send/index.md): Send tokens to any user without requiring a connected wallet on the receiving end. Recipients claim tokens via Jupiter Mobile. - [Invite Code (Beta)](https://dev.jup.ag/docs/send/invite-code.md): Client-side utilities for generating 12-character base58 invite codes and deriving deterministic Solana keypairs for the Send API. - [Craft Send (Beta)](https://dev.jup.ag/docs/send/craft-send.md): Use the POST /send/v1/craft-send endpoint to build a Send transaction that transfers tokens to a recipient via an invite code. - [Craft Clawback (Beta)](https://dev.jup.ag/docs/send/craft-clawback.md): Use the POST /send/v1/craft-clawback endpoint to reclaim tokens from an unclaimed Send invite before it expires. - [Manage Invites (Beta)](https://dev.jup.ag/docs/send/manage-invites.md): Query pending and historical Send invites using the /send/v1/pending-invites and /send/v1/invite-history endpoints. ### Studio - [Jupiter Studio Overview](https://dev.jup.ag/docs/studio/index.md): Jupiter Studio provides APIs for token creation with flexible bonding curves, LP fee management, vesting schedules, and dedicated token pages on jup.ag. - [Create Token (Beta)](https://dev.jup.ag/docs/studio/create-token.md): Use the Studio API create-tx and submit endpoints to launch a token with configurable bonding curves, upload metadata and images, and submit the signed transaction. - [Claim Fee (Beta)](https://dev.jup.ag/docs/studio/claim-fee.md): Retrieve pool addresses, check unclaimed LP fees, and claim fees from Dynamic Bonding Curve pools using the Studio API fee endpoints. ### Lock - [Jupiter Lock Overview](https://dev.jup.ag/docs/lock/index.md): Jupiter Lock (Program ID: LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn) is an open-source, audited, and free tool for locking and vesting tokens over time on Solana. ### Perps - [Jupiter Perpetuals Overview](https://dev.jup.ag/docs/perps/index.md): Jupiter Perpetuals program for leveraged trading on Solana. Work-in-progress documentation covering account structures and the Anchor IDL. - [Position Account](https://dev.jup.ag/docs/perps/position-account.md): The Position account stores trade position data including owner, side (long/short), entry price, size, collateral, PNL, and borrow fee snapshot. Derived from the trader's wallet, custody, and collateral custody. - [PositionRequest Account](https://dev.jup.ag/docs/perps/position-request-account.md): The PositionRequest account represents a pending request to open, close, or modify a position, including TP/SL triggers. It is a PDA derived from the Position account with a unique random seed. - [Pool Account](https://dev.jup.ag/docs/perps/pool-account.md): The Pool account stores JLP pool configuration including AUM (aumUsd), custody public keys, position limits, fee schedules (open/close/swap), and APR calculation data. Only one Pool account exists. - [Custody Account](https://dev.jup.ag/docs/perps/custody-account.md): The Custody account stores parameters and state for each token (SOL, ETH, BTC, USDC, USDT) managed by the JLP pool, including oracle data, pricing params, asset balances, and funding rate state. ### API Reference #### Portfolio - [Get Positions](https://dev.jup.ag/docs/openapi-spec/portfolio/portfolio.yaml): Request for Jupiter positions of an address - [Get Staked JUP](https://dev.jup.ag/docs/openapi-spec/portfolio/portfolio.yaml): Request for staked JUP information of an address - [Get Platforms](https://dev.jup.ag/docs/openapi-spec/portfolio/portfolio.yaml): Request for platform information #### Send - [Craft Send](https://dev.jup.ag/docs/openapi-spec/send/send.yaml): Request for a base64-encoded unsigned Send transaction - [Craft Clawback](https://dev.jup.ag/docs/openapi-spec/send/send.yaml): Request for a base64-encoded unsigned Send transaction - [Pending Invites](https://dev.jup.ag/docs/openapi-spec/send/send.yaml): Request for the pending invites of an address - [Invite History](https://dev.jup.ag/docs/openapi-spec/send/send.yaml): Request for the invite history of an address #### Studio - [DBC Pool Create TX](https://dev.jup.ag/docs/openapi-spec/studio/studio.yaml): Request for a base64-encoded unsigned transaction to create a Dynamic Bonding Curve pool with token metadata - [DBC Pool Submit](https://dev.jup.ag/docs/openapi-spec/studio/studio.yaml): Execute the signed transaction, and optionally upload content and header image - [DBC Pool Addresses by Mint](https://dev.jup.ag/docs/openapi-spec/studio/studio.yaml): Request for pool addresses for a given token mint - [DBC Fee](https://dev.jup.ag/docs/openapi-spec/studio/studio.yaml): Request for unclaimed creator trading fees of a Dynamic Bonding Curve pool - [DBC Fee Create TX](https://dev.jup.ag/docs/openapi-spec/studio/studio.yaml): Request for a base64-encoded unsigned transaction to claim creator trading fees of a Dynamic Bonding Curve pool ## Tool Kits Drop-in UI components (Plugin, Wallet Kit) and the Referral Program SDK. ### Tool Kits - [Jupiter Tool Kits](https://dev.jup.ag/docs/tool-kits/index.md): Three developer tool kits: Jupiter Plugin (drop-in Ultra Swap widget), Wallet Kit (unified wallet adapter for all Solana wallets), and Referral Program (earn fees on user trades). ### Jupiter Plugin - [Integrate Jupiter Plugin](https://dev.jup.ag/docs/tool-kits/plugin/index.md): Drop-in Ultra Swap widget for any web app. Supports 3 display modes (integrated, widget, modal), RPC-less operation, wallet passthrough, and customizable theming. #### Walkthrough - [Next.js App Example](https://dev.jup.ag/docs/tool-kits/plugin/nextjs-app-example.md): Step-by-step guide to integrate Jupiter Plugin into a Next.js application using either the window object or the @jup-ag/plugin npm package. - [React App Example](https://dev.jup.ag/docs/tool-kits/plugin/react-app-example.md): Step-by-step guide to integrate Jupiter Plugin into a React application using either the window object or the @jup-ag/plugin npm package. - [HTML App Example](https://dev.jup.ag/docs/tool-kits/plugin/html-app-example.md): Step-by-step guide to integrate Jupiter Plugin into a plain HTML application using the plugin script tag and window.Jupiter.init(). - [Customizing Plugin](https://dev.jup.ag/docs/tool-kits/plugin/customization.md): Configure Jupiter Plugin display modes, form props (swap mode, fixed amounts, referral fees), wallet passthrough, event handlers, branding, and color themes. - [FAQ](https://dev.jup.ag/docs/tool-kits/plugin/faq.md): Frequently asked questions about Jupiter Plugin: feature requests, adding referral fees, fixing integrated mode layout issues, and best practices for customization. ### Jupiter Wallet Kit - [Integrate Wallet Kit](https://dev.jup.ag/docs/tool-kits/wallet-kit/index.md): Open-source unified wallet adapter supporting 20+ Solana wallets, Wallet Standard, Jupiter Wallet Extension, Mobile Adapter QR login, and i18n in 7 languages. - [Jupiter Wallet Extension](https://dev.jup.ag/docs/tool-kits/wallet-kit/jupiter-wallet-extension.md): Step-by-step guide to integrate Jupiter Wallet Extension into a Next.js app using @jup-ag/wallet-adapter with UnifiedWalletProvider and notification handling. - [Jupiter Mobile Adapter](https://dev.jup.ag/docs/tool-kits/wallet-kit/jupiter-mobile-adapter.md): Integrate Jupiter Mobile QR code login into your app using the @jup-ag/jup-mobile-adapter package with Reown's AppKit for WalletConnect support. ### Jupiter Referral Program - [Referral Program](https://dev.jup.ag/docs/tool-kits/referral-program.md): The open-source Referral Program SDK enables developers to earn on-chain fees via Jupiter APIs (Swap, Trigger, Plugin) and can be integrated by any Solana program. ## Changelog Changelog, release notes, and developer blog. - [Changelog](https://dev.jup.ag/docs/changelog/index.md): Latest announcements and breaking changes across Jupiter APIs. ### Blog - [Overview](https://dev.jup.ag/docs/blog/index.md): Technical deep dives into Jupiter products, team's research and learnings - [Building the Most AI-Friendly Developer Resource](https://dev.jup.ag/docs/blog/building-ai-friendly-docs.md): "Blog post detailing how Jupiter built AI-friendly developer - [Ultra vs Metis: Execution Engine or Routing Primitive](https://dev.jup.ag/docs/blog/ultra-vs-metis.md): A technical comparison between Jupiter's Swap APIs offering both execution engine or routing primitive options. - [Ultra V3: The Ultimate Trading Engine](https://dev.jup.ag/docs/blog/ultra-v3.md): A technical deep dive into Jupiter's most comprehensive trading engine, featuring exclusive new capabilities: Iris, Jupiter Beam, Predictive Execution and more. - [600 Lines of Code Nobody Asked For](https://dev.jup.ag/docs/blog/why-ultra-v3.md): Better execution, zero infrastructure, faster shipping. Why teams should just use Ultra V3 - [How hard can it be to price a token on-chain? (very)](https://dev.jup.ag/docs/blog/how-jupiter-prices-a-token.md): Blog post exploring how Jupiter's Price API V3 derives token prices on Solana. Covers why pool-state pricing fails at scale, the last-swap-price methodology, path-based price derivation through swap ratio chains anchored to oracle-priced tokens like SOL, heuristic quality filters (liquidity depth, trading patterns, holder distribution), the V3 response format (usdPrice, blockId, decimals, priceChange24h), and practical integration notes on missing tokens, price freshness, and discrepancies with other price sources. - [How does Jupiter decide if a token is real?](https://dev.jup.ag/docs/blog/what-is-organic-score.md): Investigation into Jupiter's organic score infrastructure: wallet classification system, comparative scoring methodology, organic volume decomposition, and how the score drives Price API inclusion, token verification, and ranking across Jupiter's stack. - [Metis v7: Migration to Metis.builders](https://dev.jup.ag/docs/blog/metis-v7.md): Metis is now an independent public good at metis.builders with a new access model for v7. This separation establishes Metis as a standalone instruction-level swap primitive for builders who need full control over transaction execution. Additionally, Metis Binary moving forward will require authenticated access with a staked JUP requirement. ## Resources Support channels, brand assets, and community resources. ### Resources - [Support](https://dev.jup.ag/docs/resources/support.md): Technical and customer support platforms for Jupiter - [Brand Kit](https://dev.jup.ag/docs/resources/brand-kit.md): Logos, labelling guidelines, and brand assets for Jupiter integrations. - [Stats](https://dev.jup.ag/docs/resources/stats.md): Jupiter product metrics, revenue, and usage statistics on Dune. - [Audits](https://dev.jup.ag/docs/resources/audits.md): Formal audit reports for Jupiter programs - [References](https://dev.jup.ag/docs/resources/references.md): Links and references to Jupiter's GitHub repositories. ### Legal - [Guidelines](https://dev.jup.ag/docs/legal/index.md): Important legal documentation and guidelines that governs the use of our services and platform. Please review these documents carefully. - [SDK & API License Agreement](https://dev.jup.ag/docs/legal/sdk-api-license-agreement.md): Jupiter API & SDK License Agreement - [Terms of Use](https://dev.jup.ag/docs/legal/terms-of-use.md): Jupiter Terms of Use - [Privacy Policy](https://dev.jup.ag/docs/legal/privacy-policy.md): Privacy Policy for Jupiter ## Optional - [Developer Platform](https://developers.jup.ag/portal): Manage API keys, view analytics, and monitor usage - [API Status](https://status.jup.ag/): Check the status of Jupiter APIs - [Stay Updated](https://dev.jup.ag/docs/resources/support): Get support and stay updated with Jupiter