Skip to main content

TypeScript Orderbook Instructions

These are the instruction builders provided by the Orderbook class. They handle account resolution, address lookup tables, base token conversion, and CPI routing automatically.
For low-level control, see the raw Codama-generated instructions which require manual account resolution.

Installation

npm install @exponent-labs/exponent-sdk @solana/web3.js
All instructions are methods on the Orderbook class:
import { Orderbook } from "@exponent-labs/exponent-sdk";

// Load an orderbook
const orderbook = await Orderbook.load(env, connection, orderbookAddress);

// Use instructions
const { ix, setupIxs } = await orderbook.ixWrapperPostOffer({...});

Instructions