CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-skill-index-evals/jup-ag__agent-skills__integrating-jupiter

Comprehensive guidance for integrating Jupiter APIs (Ultra Swap, Lend, Perps, Trigger, Recurring, Tokens, Price, Portfolio, Prediction Markets, Send, Studio, Lock, Routing).

86

1.85x

Quality

84%

Does it follow best practices?

Impact

91%

1.85x

Average score across 5 eval scenarios

Overview
Skills
Evals
Files

task.mdevals/scenario-3/

Dollar-Cost Averaging (DCA) Integration Module

Problem/Feature Description

You are building a feature for a personal finance app that lets users set up recurring token purchases on Solana through Jupiter. Users want to automatically buy a specific token on a regular schedule (e.g., buy $100 of SOL every day for 10 days) without having to manually trade each time.

The module needs to handle the full lifecycle: creating a recurring order schedule, executing it on-chain, listing active recurring orders with pagination, and cancelling orders. It must properly validate user inputs to prevent creating orders that would be rejected (e.g., orders that are too small or have too few executions). The system needs to correctly calculate and display fees so users know the total cost.

Users have asked about setting up "buy when price drops below X" type orders, but the product team has decided to only support time-based schedules. The module should reflect this decision. Additionally, the system needs to handle some tokens that may not be compatible.

Output Specification

Produce a single TypeScript file called recurring-orders.ts that exports:

  1. validateRecurringParams(params: RecurringOrderParams) - Validates all parameters against constraints and returns validation errors if any
  2. createRecurringOrder(params: RecurringOrderParams, walletAddress: string) - Creates a new recurring/DCA order
  3. executeRecurringOrder(createResponse: any, wallet: Keypair) - Signs and submits the recurring order transaction
  4. getRecurringOrders(walletAddress: string, page?: number) - Lists active recurring orders with pagination
  5. cancelRecurringOrder(orderId: string, walletAddress: string) - Cancels an active recurring order
  6. calculateTotalFees(totalAmount: number, numOrders: number) - Calculates the total fees for a recurring order

Define a RecurringOrderParams interface that captures the scheduling configuration.

The code should use @solana/web3.js types and the native fetch API. It does not need to compile or run -- focus on correct API patterns, proper constraint validation, and clear code structure.

Install with Tessl CLI

npx tessl i tessl-skill-index-evals/jup-ag__agent-skills__integrating-jupiter@0.0.1

evals

tile.json