본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.0k · #13633

integrating-jupiter

하는 일

이 스킬은 Solana에서 Jupiter API를 사용하는 개발자를 위한 참고 자료입니다. 스왑, 대출, 무기한 선물, 토큰 가격, 포트폴리오 등을 다룹니다. 알맞은 엔드포인트를 고르고, 올바른 단계를 따르며, 오류를 처리하도록 돕습니다.

사용하는 경우

  • ✓Jupiter를 사용해 앱에 토큰 스왑을 추가하고 싶을 때.
  • ✓대출, 주문, 가격 작업에 맞는 Jupiter 엔드포인트를 골라야 할 때.
  • ✓Jupiter API 호출이 실패해서 디버깅이 필요할 때.

스킬 링크

https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/integrating-jupiter/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Jupiter API를 사용해 제 Solana 앱에 토큰 스왑을 추가해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 작업에 맞는 Jupiter API를 고르고, 통합 단계를 따릅니다. REST 엔드포인트는 Jupiter 개발자 포털에서 받은 API 키가 필요합니다. 스킬은 오류를 잘 처리하는 등 운영 환경 강화 방법도 다룹니다.

기술 내용 (원본 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, 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
자주 묻는 질문

Jupiter에 API 키가 필요한가요?

네. REST 엔드포인트는 Jupiter 개발자 포털에서 받은 x-api-key 헤더가 필요합니다.

스킬은 어떤 Jupiter 제품을 다루나요?

스왑, 대출, 무기한 선물, 트리거 주문, 반복 주문, 토큰, 가격, 포트폴리오, 예측 시장, 전송, 스튜디오, 잠금, 라우팅을 다룹니다.

기본 Solana 설정도 도와주나요?

아니요. 이 스킬은 Jupiter API를 사용하기 위한 것이며, 일반적인 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.

repo: internet-court/internet-court-skill

인기도

GitHub 스타
7.0k
순위
#13633
라이선스
—
업데이트
2026. 10. 26.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬