Documentation Index
Fetch the complete documentation index at: https://docs.raydium.io/llms.txt
Use this file to discover all available pages before exploring further.
What this chapter is. Three end-to-end Node scripts you can paste into a file, set a few env vars, and run. Each one performs a real on-chain operation against Raydium. Use these to validate your setup before building anything bigger.What this chapter is not. Reference documentation. For the full builder API, parameter reference, and corner cases, see SDK & API and the per-product
code-demos pages.Prerequisites
Run this once:- Node 18+ with ESM support (
"type": "module"inpackage.jsonor.mjsextension). - A Solana keypair at
~/.config/solana/id.json(or anywhere — setKEYPAIR). - A funded wallet. ~0.05 SOL covers any single script in this chapter.
- An RPC URL. Free public RPC works for testing; for anything more than a smoke test, use a paid provider.
Cluster. All three scripts default to mainnet. To run on devnet, set
RPC_URL=https://api.devnet.solana.com and change cluster: "mainnet" to cluster: "devnet" inside the script. Be aware that pool seed liquidity on devnet is sparse; expect to mint your own test tokens.The three scripts
Swap from CLI
Swap one token for another through any CPMM pool. Fastest “I can hit Raydium from a script” check.
Deploy a CPMM pool
Spin up a new CPMM pool for a token pair you choose. Picks the 0.25% fee tier and seeds initial liquidity.
Deploy a CLMM pool
Spin up a new CLMM pool with a fee tier of your choice and a single concentrated position.
After this chapter
Each script ends with a minimal output (pool ID, tx signature) and a single line pointing at the next page in the SDK & API chapter for the operation it performed. When you’re ready to write your own integration:- Backends and bots → Trade API.
- Frontends and full-control apps → TypeScript SDK.
- On-chain composition → Rust CPI.
- Picking among them → the comparison table at the top of SDK & API.


