integrating-jupiter
यह क्या करती है
यह स्किल Solana पर Jupiter के APIs से बनाने के लिए संदर्भ है, जिसमें स्वैप, लेंडिंग, perpetuals, टोकन कीमतें और पोर्टफ़ोलियो शामिल हैं। यह सही endpoint चुनने, सही चरण अपनाने और errors संभालने में मदद करती है, उन डेवलपर्स के लिए जो ऐप में Jupiter जोड़ रहे हैं।
कब इस्तेमाल करें
- ✓जब आप Jupiter का इस्तेमाल करके ऐप में टोकन स्वैप जोड़ना चाहते हों।
- ✓जब आपको लेंडिंग, orders या कीमतों के लिए Jupiter endpoints में से चुनना हो।
- ✓जब Jupiter API कॉल विफल हो और आप उसकी गड़बड़ी ढूंढना चाहते हों।
Skill का लिंक
https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/integrating-jupiter/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं Jupiter के API से अपने Solana ऐप में टोकन स्वैप जोड़ना चाहता हूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपके काम के लिए सही Jupiter API चुनता है, फिर इंटीग्रेशन के चरण अपनाता है। REST endpoints के लिए Jupiter developer portal से मिली API कुंजी चाहिए। स्किल production के लिए मज़बूती के उपाय भी बताती है, जैसे errors को अच्छे से संभालना।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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 |
अक्सर पूछे जाने वाले सवाल
क्या Jupiter को API कुंजी चाहिए?
हाँ। REST endpoints को x-api-key हेडर चाहिए, जो Jupiter developer portal से मिलती है।
यह स्किल कौन-से Jupiter उत्पाद कवर करती है?
Swap, lend, perps, trigger orders, recurring orders, tokens, prices, portfolio, prediction markets, send, studio, lock और routing।
क्या यह सामान्य Solana सेटअप में मदद करती है?
नहीं। यह Jupiter के APIs इस्तेमाल करने के लिए है, सामान्य Solana सेटअप के लिए नहीं।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 7.0k
- रैंकिंग में स्थान
- #13633
- लाइसेंस
- —
- अपडेट की गई
- 26/10/2026
कमेंट
- …
इस repository की और skills
internet-court
7.0kयह आपके एजेंट को AI एजेंट या पेड सेवा से सुरक्षित तरीके से भुगतान और लेन-देन की शुरुआती दिशा देती है, और सही विशेष गाइड बताती है।
genlayer-erc7710-connector
7.0kयह आपके एजेंट को AI समीक्षा के नतीजे को अनुमति प्रणाली से जोड़ने देती है, ताकि खराब समीक्षा एजेंट की अनुमतियाँ सीमित कर सके।
genlayer-intelligent-contracts
7.0kयह आपके एजेंट को AI जज के नियम, सबूत और नतीजे तय करने में मदद करती है, जो जाँचता है कि दूसरा एजेंट अपने अधिकार के दायरे में रहा या नहीं।
x402-erc7710
7.0kयह आपके एजेंट को हर अनुरोध पर वेब सेवा का भुगतान करने और तय सीमा के भीतर लगातार खर्च करने की व्यवस्था में मदद करती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।