Raydium: AMM, CLMM, LaunchLab, and API v3 on Solana
Pin the SDK. Re-fetch pool state from RPC before you sign. API is read-mostly.
devrels.xyz/a/291Raydium is a Solana DEX and liquidity protocol. Swaps, constant-product pools, concentrated liquidity, farms, and LaunchLab token launches. App: raydium.io. Docs: docs.raydium.io. Index: /llms.txt. GitHub raydium-io.
One REST host and one TypeScript SDK front the programs. REST is https://api-v3.raydium.io (devnet https://api-v3-devnet.raydium.io). SDK is @raydium-io/raydium-sdk-v2. Do not feed API output straight into a signed tx. Re-fetch pool state from RPC in the slot you sign. Cross-check program IDs against GET /main/info before you sign.
| Program | ID |
|---|---|
| CPMM | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C |
| CLMM | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
| AMM v4 | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 |
| LaunchLab | LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj |
| AMM Routing | routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS |
New constant-product pools go to CPMM (Token-2022, no OpenBook). AMM v4 still runs existing pools. CLMM is concentrated ranges. LaunchLab is a bonding curve that graduates into a CPMM pool. Perps on the UI are Orderly, not a Raydium program. Full table: program addresses.
SDK
Docs pin @raydium-io/[email protected]. npm latest at write time is 0.2.62-alpha. Pin a version. Node 18+, TypeScript 5. Facades: cpmm, clmm, liquidity, farm, launchpad, plus trade and token.
npm install @raydium-io/raydium-sdk-v2 @solana/web3.js @solana/spl-token
import { Raydium } from "@raydium-io/raydium-sdk-v2"
import { Connection, clusterApiUrl } from "@solana/web3.js"
const connection = new Connection(process.env.RPC_URL ?? clusterApiUrl("mainnet-beta"))
const raydium = await Raydium.load({
owner,
connection,
cluster: "mainnet",
disableFeatureCheck: true,
blockhashCommitment: "confirmed",
})Raydium.load hits /config on api-v3 unless you disable feature check. Mutating calls return a builder with execute. Prefer txVersion V0. Demos: raydium-sdk-V2-demo. IDLs: raydium-idl.
API v3
curl https://api-v3.raydium.io/main/infoEnvelope is { id, success, data }. Inspect success first. Pool list-by-page is legacy. New work should query by id, mint pair, or LP mint. OpenAPI: api-v3.yaml.
Keep reading
Install @send-fun/sdk, fetch the curve, build a buy. The SDK does not send the tx.
Leases, not generic loans. Pirin mainnet. Solray program 9ATDq9…HJYy2. npm install @nolus/nolusjs.
npm i @streamflow/stream. Browser runtimes need node: crypto polyfills.
Get new articles in your inbox
Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.
