Comprehensive guidance for integrating Jupiter APIs (Ultra Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing).
86
Quality
84%
Does it follow best practices?
Impact
91%
1.85xAverage score across 5 eval scenarios
You are building a token research and portfolio tracking tool for Solana. The service needs two main capabilities:
Token Lookup: Users can search for tokens by name, symbol, or mint address. The UI displays token details, and the system needs to surface trust and safety information to help users avoid suspicious tokens. The system should treat some token identifiers as more authoritative than others.
Price Service: The tool fetches current prices for lists of tokens and uses them for portfolio valuation. Some prices are used in safety-critical contexts (e.g., deciding whether to trigger a stop-loss), so the system must handle cases where price data is unreliable or missing. The service needs to handle large batches of tokens efficiently.
The tool should be defensive: not all tokens have reliable data, some tokens may be flagged as suspicious, and the price API may return incomplete results for some tokens. The system should handle all of these gracefully rather than crashing or showing misleading data.
Produce a single TypeScript file called token-price-service.ts that exports:
searchTokens(query: string) - Search for tokens by name, symbol, or mint addressgetTokenInfo(mintAddress: string) - Get detailed information for a single tokengetTokensByTag(tag: string) - Get tokens by tag (e.g., verified, lst)getTrending(category: string, interval: string) - Get trending/top tokensgetPrices(mintAddresses: string[]) - Get current prices for a list of tokens, handling batching if neededgetSafePrice(mintAddress: string) - Get a price with confidence validation suitable for safety-critical decisionsTokenInfo interface that represents the normalized token data the UI will consumePriceResult interface that represents price data with confidence metadataThe code should use the native fetch API. It does not need to compile or run -- focus on correct API patterns, proper handling of missing/unreliable data, and defensive coding for the safety-critical price path.
Install with Tessl CLI
npx tessl i tessl-skill-index-evals/jup-ag__agent-skills__integrating-jupiter@0.0.1