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 shared API client library that multiple services in your organization will use to interact with Jupiter APIs. The library needs to provide a unified, resilient HTTP layer that all Jupiter API consumers can rely on. Different teams use different Jupiter APIs (swaps, orders, pricing, portfolio), so the client must be generic enough to work across all of them.
The key requirements are:
The client should be the single source of truth for error handling patterns so that individual service teams don't have to re-implement this logic.
Produce a single TypeScript file called jupiter-client.ts that exports:
JupiterClient class (or set of functions) with a generic request<T>(path: string, options?: RequestOptions) methodwithRetry<T>(action: () => Promise<T>, options?: RetryOptions) function implementing the retry strategyclassifyError(error: any) function that normalizes any Jupiter error into a structured formatTransactionTracker class or set of functions for tracking transaction states (submitted/confirming/confirmed/failed)toUserAction(error: StructuredError) function that maps errors to actionable user-facing messagesThe code should use the native fetch API. It does not need to compile or run -- focus on correct error classification logic, proper retry semantics, and comprehensive state tracking.
Install with Tessl CLI
npx tessl i tessl-skill-index-evals/jup-ag__agent-skills__integrating-jupiter