Skip to main content
You can call Continuum from any Solana client. This page sets up a small TypeScript project with Anchor’s client and the published IDLs, then reads a market on devnet. The Continuum app itself uses @solana/kit 8.3, with program clients that Codama generates from the same IDLs (see Kit and Codama). Anchor’s client needs less setup for scripts, so the build pages use it.

Stack

Trading needs no AMM SDK. While a market is open, commit_swap and settle_swap handle committed orders, enabled on every live market since 11 Oct 2026. Each bin book is a Pool account in the CLP program, and pool_swap fills against it instantly, but only while the market’s price is stale.

Minimal project

Pin @solana/web3.js to 1.x. Anchor 0.32 depends on 1.x and @solana/spl-token 0.4 requires it as a peer, while npm’s next tag for @solana/web3.js already points at 3.x.

The IDLs

The IDLs for all six programs are published in the docs repository. Browse them at github.com/continuum-markets/continuum-docs/tree/main/idl, or fetch the raw files:
<name> is mint_redeem, clp, oracle, registry, faucet or trading. The program source is not public, so these files are the reference for instruction names, arguments and account order. They use the Anchor 0.30+ IDL format, and each one carries its program ID in address:
Don’t use anchor idl fetch for these programs. Their on-chain IDL accounts are out of date: as of 13 Oct 2026, mint-redeem’s lists 14 of its 43 instructions and has no collateral_authority account. The devnet program IDs are in Programs overview.

Boilerplate (client.ts)

new Program(idl, provider) takes the program ID from the IDL’s address. Fetching at runtime always gets the current file. If you keep a copy in your repo instead, compare it with the published file after each program upgrade.

RPC choice

Public devnet (https://api.devnet.solana.com) is fine for one-off scripts, but it rate-limits with HTTP 429. Anything that polls or runs continuously needs a private RPC, for example:
Batch reads where you can. program.account.market.fetchMultiple(pdas) reads several markets in one getMultipleAccounts call.

Wallet and devnet funds

Browser apps should sign through a Wallet Standard wallet. Scripts can load a keypair file, as makeProvider does. Privileged instructions check signer keys stored on chain (the keeper, CLP and market authorities). An integration only needs the user’s own wallet. Fund a devnet wallet with SOL (solana airdrop 1 --url devnet, or connection.requestAirdrop in code), then drip cUSDC from the faucet program. It sends 1,000 cUSDC per wallet every 24 hours, and the mint and redeem example includes the drip call.

First call: read a market

bun read-market.ts printed this on 10 Oct 2026:
Every devnet market runs in ProxyMode. totalCollateral is the market’s own collateral ledger, which the solvency checks read. Each market has its own vault, but a plain token transfer can raise a vault’s balance without changing this field.

Typed clients

To get TypeScript types, download the IDL and generate a type with the Anchor CLI (0.30 or later):
Pass the type argument explicitly: without it, TypeScript infers a plain Program<Idl>. A typed .accounts() only accepts accounts that Anchor can’t derive, so pass PDAs such as market through .accountsPartial(). Anchor can’t derive the market PDA itself, because its seed is a field of the market account.

Kit and Codama

To build on @solana/kit like the Continuum app, generate clients with Codama:
These are the versions the app pins. The script writes one client per program under src/generated/ and adds @solana/kit and @solana/program-client-core to package.json. Only initialize_market, an admin instruction, needs the workaround.

Common pitfalls

Wrong cluster

The IDLs carry devnet program IDs. Pointed at another cluster, fetch fails with Account does not exist or has no data.

Missing token accounts

Mint and redeem need the user’s cUSDC, L and S token accounts and the fee recipient’s cUSDC account to exist. Create them first with createAssociatedTokenAccountIdempotentInstruction. A missing account fails with Anchor’s AccountNotInitialized (3012). Some fee recipients are PDAs, so pass allowOwnerOffCurve = true when you derive their ATA.

Decimals

cUSDC, L and S use 6 decimals, and prices in Market are scaled to 1e6. s_gamma_index (γ) is scaled to 1e9, and so are the prices in the oracle program’s OracleConfig. Divide by the right power of ten before display, and multiply by 10 ** 6 when you build token amounts.

See also

IDLs and PDAs

Where IDLs ship, PDA derivation patterns.

Mint and redeem example

End-to-end script: drip cUSDC, mint, redeem, verify.