internet-court/internet-court-skill / vendored/jupiter/integrating-jupiter
integrating-jupiter
VerifiedComprehensive 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.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.0 KB |
| README.md | markdown | 1.6 KB |
| SKILL.md | skill md | 29.6 KB |
| examples/lend.md | markdown | 1.8 KB |
| examples/price.md | markdown | 1.8 KB |
| examples/swap.md | markdown | 2.9 KB |
| examples/trigger.md | markdown | 7.1 KB |
examples/price.md
View on GitHub# Price: Multi-Token Lookup Example
> **Prerequisites:** This example uses the `jupiterFetch` helper defined in the
> **Developer Quickstart** section of the main `SKILL.md`. `jupiterFetch`
> prepends `https://api.jup.ag` to every path and attaches the `x-api-key`
> header automatically, so you never need to build full URLs or pass the API key
> manually.
```typescript
// jupiterFetch<T>(path, init?) is defined in Developer Quickstart (SKILL.md).
// It prepends https://api.jup.ag and adds the x-api-key header.
const SOL_MINT = 'So11111111111111111111111111111111111111112';
const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
const WBTC_MINT = '3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh';
// Price API V3 response is keyed by mint. Each entry has usdPrice (number),
// blockId, decimals, priceChange24h, and liquidity. There is NO confidenceLevel
// field (that was V2). Mints with no reliable price are OMITTED from the
// response entirely — there is no null placeholder — so treat a missing mint
// as "unpriced" and fail closed for safety-sensitive actions.
type PriceEntry = {
usdPrice: number;
blockId: number;
decimals: number;
priceChange24h: number;
liquidity?: number;
};
async function getPrices(mints: string[]) {
const ids = mints.join(','); // max 50 mints per request
const data = await jupiterFetch<Record<string, PriceEntry>>(
`/price/v3?ids=${encodeURIComponent(ids)}`,
);
const prices: Record<string, PriceEntry | null> = {};
for (const mint of mints) {
// Missing mint => no reliable price. Fail closed.
prices[mint] = data[mint] ?? null;
}
return prices;
}
// Usage:
// const prices = await getPrices([SOL_MINT, USDC_MINT, WBTC_MINT]);
// const solUsd = prices[SOL_MINT]?.usdPrice; // number | undefined
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |