Skip to content
Skillpedia
APIs & servers (backend)7.0k Β· #13633

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.md

Copy 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

Use this skill to help me: https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/integrating-jupiter/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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, trade assume 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, USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.
  • Convert human β†’ raw: raw = Math.round(human * 10 ** decimals). Examples: 1 SOL β†’ 1_000_000_000, 100 USDC β†’ 100_000_000. slippageBps is 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.

repo: internet-court/internet-court-skill

Popularity

GitHub stars
7.0k
Ranking position
#13633
License
β€”
Updated
10/26/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills