Skip to main content
The Cesto SDK (@cesto/sdk) is a typed TypeScript client for the Cesto API. Use it to list and inspect baskets (products), look up a user’s positions by their Solana wallet, and open or close positions with client-signed transactions — all behind a single API key.

Products

List baskets and fetch full basket detail, optionally with backtested performance and charts.

Positions

Read a user’s positions by wallet, and live per-basket holdings for SDK positions.

Open & Close

Open and close positions where the user’s wallet signs its own transactions — Cesto never holds the key.

Typed & resilient

Every method and response is typed (ESM + CJS), with automatic retries, timeouts, and a typed error hierarchy.

Requirements

  • Node.js 18+ (uses the global fetch).
  • Server-side only: the SDK uses a secret API key and refuses to run in a browser.
Never use the SDK in browser / client-side code; your secret key would be exposed to end users. It is meant for backends, scripts, and serverless / edge functions.

Install

Quickstart

You need an API key to use the SDK. See Authentication to request one.

Next steps

Authentication

Get a key and start making requests.

Configuration

Client options, timeouts, and retries.

Products

List and fetch baskets.

Positions

Positions by wallet.

Open a Position

Open positions with client-signed transactions.

Close a Position

Close a wallet’s full basket holding.

Examples

Runnable Node.js examples for every feature.