integrating-jupiter
What it does
This skill is a reference for building with Jupiter's APIs on Solana, covering swaps, lending, perpetuals, token prices, portfolios and more. It helps pick the right endpoint, follow the right steps, and handle errors, for developers adding Jupiter to an app.
When to use it
- βWhen you want to add a token swap to an app using Jupiter.
- βWhen you need to choose between Jupiter endpoints for lending, orders or prices.
- βWhen a Jupiter API call fails and you want help debugging it.
Skill link
https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/integrating-jupiter/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to add a token swap to my Solana app using Jupiter's API.β
5 new skills a week. 1 minute to read.
How it works
The agent picks the right Jupiter API for your task, then follows the integration steps. The REST endpoints need an API key from the Jupiter developer portal. The skill also covers production hardening, such as handling errors well.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Jupiter API Integration
Single skill for all Jupiter APIs, optimized for fast routing and deterministic execution.
Base URL: https://api.jup.ag
Auth: x-api-key from developers.jup.ag (required for Jupiter REST endpoints)
Use/Do Not Use
Use when:
- The task requires choosing or calling Jupiter endpoints.
- The task involves swap, lending, perps, orders, pricing, portfolio, send, studio, lock, or routing.
- The user needs debugging help for Jupiter API calls.
Do not use when:
- The task is generic Solana setup with no Jupiter API usage.
- The task is UI-only with no API behavior decisions.
- The agent context is not DeFi/crypto (generic triggers like
buy,sell,tradeassume a DeFi domain).
Triggers: swap, quote, gasless, best route, buy, sell, trade, convert, token exchange, jupiter api, jup.ag, ultra, metis, ultra swap, ultra api, ultra-api.jup.ag, lend, borrow, earn, yield, apy, deposit, liquidation, perps, leverage, long, short, position, futures, margin trading, limit order, trigger, price condition, dca, recurring, scheduled swaps, token metadata, token search, verification, shield, price, valuation, price feed, portfolio, positions, holdings, prediction markets, market odds, event market, invite transfer, send, clawback, create token, studio, claim fee, vesting, distribution lock, unlock schedule, dex integration, rfq integration, routing engine, status page, health check, service health, accumulate, auto-buy
Developer Quickstart
import { Connection, Keypair, VersionedTransaction } from '@solana/web3.js';
const API_KEY = process.env.JUPITER_API_KEY!; // from developers.jup.ag
if (!API_KEY) throw new Error('Missing JUPITER_API_KEY');
const BASE = 'https://api.jup.ag';
const headers = { 'x-api-key': API_KEY };
async function jupiterFetch<T>(path: string, init?: RequestInit): Promise<T> {
const res = await fetch(`${BASE}${path}`, {
...init,
headers: { ...headers, ...init?.headers },
});
if (res.status === 429) throw { code: 'RATE_LIMITED', retryAfter: Number(res.headers.get('Retry-After')) || 10 };
if (!res.ok) {
const raw = await res.text();
let body: any = { message: raw || `HTTP_${res.status}` };
try {
body = raw ? JSON.parse(raw) : body;
} catch {
// keep text fallback body
}
throw { status: res.status, ...body };
}
return res.json();
}
// Sign and send any Jupiter transaction
async function signAndSend(
txBase64: string,
wallet: Keypair,
connection: Connection,
additionalSigners: Keypair[] = []
): Promise<string> {
const tx = VersionedTransaction.deserialize(Buffer.from(txBase64, 'base64'));
tx.sign([wallet, ...additionalSigners]);
const sig = await connection.sendRawTransaction(tx.serialize(), {
maxRetries: 0,
skipPreflight: true,
});
return sig;
}
Token Amounts & Decimals
Every Jupiter amount field is in the token's smallest unit (raw integer) β never a human/UI value.
- Common decimals: SOL & wSOL = 9, USDC & USDT = 6. Canonical mints: SOL
So11111111111111111111111111111111111111112, USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. - Convert human β raw:
raw = Math.round(human * 10 ** decimals). Examples:1 SOL β 1_000_000_000,100 USDC β 100_000_000.slippageBpsis basis points:0.5% = 50,1% = 100. - Read decimals per-mint on-chain with
getMint(connection, mintPubkey)from@solana/spl-tokenβ never hardcode (decimals vary by token), and do not call the Price API just to discover decimals.
Intent Router (first step)
| User intent | API family | First action |
|---|---|---|
| Swap/quote | Swap | GET /swap/v2/order -> sign -> POST /swap/v2/execute |
| Lend/borrow/yield | Lend | POST /lend/v1/earn/deposit or /withdraw |
| Leverage/perps | Perps | On-chain via Anchor IDL (no REST API yet) |
| Limit orders | Trigger | JWT auth -> POST /trigger/v2/orders/price |
| DCA/recurring buys | Recurring | POST /recurring/v1/createOrder -> sign -> POST /recurring/v1/execute |
| Token search | Tokens | GET /tokens/v2/search?query={mint} |
| Token verification/metadata update | Use jupiter-vrfd skill |
Defer β not handled by this skill |
| Price lookup | Price |
FAQ
Does Jupiter need an API key?
Yes. The REST endpoints require an x-api-key header, which you get from the Jupiter developer portal.
Which Jupiter products does the skill cover?
Swap, lend, perps, trigger orders, recurring orders, tokens, prices, portfolio, prediction markets, send, studio, lock and routing.
Does this help with a plain Solana setup?
No. It is for using Jupiter's APIs, not for general Solana setup.
Details
Original description by the author
Comprehensive guidance for integrating Jupiter APIs (Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing). Use for endpoint selection, integration flows, error handling, and production hardening.
Popularity
- GitHub stars
- 7.0k
- Ranking position
- #13633
- License
- β
- Updated
- 10/26/2026
Comments
- β¦
More skills from this repository
internet-court
7.0kHelps your agent pay, hire, or deal safely with another AI agent or paid service, and points it to the right specialized guide.
genlayer-erc7710-connector
7.0kHelps your agent connect an AI review result to a permission system, so a bad review can limit or cancel an agent's permissions.
genlayer-intelligent-contracts
7.0kHelps your agent define the rules, evidence and outputs of an AI judge that checks whether another agent followed its mandate.
x402-erc7710
7.0kHelps your agent pay for web services one request at a time, and set up ongoing spending that stays within a permission budget.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.