cesto.positions has two reads: getPositions for a user’s Cesto-account positions,
and getPosition for the live, on-chain position in one basket — the position view for
SDK-opened positions.
Get all positions
cesto.positions.getPositions returns a user’s open and closing positions, resolved from
their external Solana wallet address, with no end-user login required.
External Solana wallet address to look up.
Live open / partially-open positions.
Positions with a close currently in progress.
A wallet with no Cesto account returns an empty result
(
{ positions: [], pendingClosePositions: [] }) and is not an error. The user
argument is required; an empty value throws before any request is made.This endpoint reads Cesto account positions (opened in the Cesto app). Positions
opened via the SDK are self-custody and do not appear here — use getPosition below.Position by product (SDK positions)
cesto.positions.getPosition returns the wallet’s live position in one basket, read
from on-chain balances of the basket’s constituent tokens — exactly what a
close would sell. Works with a read-only key.
Solana address to read.
Basket to read, by slug (a product id also works).
The wallet’s live balances of the basket’s constituent tokens, with USD prices and values.
Total USD value of the holdings.
True when the wallet holds any of the basket’s tokens (i.e. a close would sell something).
The most recent SDK open/close execution for this wallet + product, scoped to your API
key — one partner never sees another partner’s activity for the same wallet.