Raydium AMM IDL
675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8Raydium AMM is the core automated market maker program. Manages liquidity pools, swap execution, and fee distribution for the Raydium DEX on Solana.
Instructions
Account Types
Integration Examples
Use the Raydium AMM IDL in your application with these code examples for TypeScript, Rust, and Python.
import { Connection, PublicKey } from "@solana/web3.js";
import { Program, AnchorProvider, Idl } from "@coral-xyz/anchor";
// Load the Raydium AMM IDL
import idl from "./raydium amm.json";
const PROGRAM_ID = new PublicKey("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8");
// Set up the provider and program
const connection = new Connection("https://api.mainnet-beta.solana.com");
const provider = new AnchorProvider(connection, wallet, {
commitment: "confirmed",
});
const program = new Program(idl as Idl, provider);
// Fetch and decode an account
const accountData = await program.account.raydium_AMM
.fetch(accountPublicKey);
console.log("Account data:", accountData);
// Build and send an instruction
const tx = await program.methods
.initialize(/* ...args */)
.accounts({
/* ...required accounts */
})
.rpc();
console.log("Transaction signature:", tx);IDL JSON Preview
{
"version": "0.3.0",
"name": "raydium_amm",
"instructions": [
{
"name": "initialize",
"accounts": [
{
"name": "tokenProgram",
"isMut": false,
"isSigner": false
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
},
{
"name": "rent",
"isMut": false,
"isSigner": false
},
{
"name": "amm",
"isMut": true,
"isSigner": false
},
{
"name": "ammAuthority",
"isMut": false,
...Frequently Asked Questions
What is the Raydium AMM IDL?
The Raydium AMM IDL (Interface Definition Language) is a JSON schema that defines the on-chain program interface for the Raydium AMM smart contract on Solana. It describes all available instructions, account structures, events, and custom types that developers need to interact with the Raydium AMM program. This IDL contains 18 instructions, 3 account types, 0 events, and 9 type definitions.
How do I use the Raydium AMM IDL in my project?
Download the JSON file and import it in your project. With TypeScript, use the @coral-xyz/anchor package to create a Program instance. In Rust, use anchor-client. For Python, use anchorpy. See the integration examples above for complete code snippets in all three languages.
What is the Raydium AMM program address on Solana?
The Raydium AMM program is deployed at address 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 on Solana mainnet. You can verify this on any Solana block explorer.
What version of the Raydium AMM IDL is this?
This is version 0.3.0 of the Raydium AMM IDL. IDL versions correspond to specific program deployments and may be updated as the protocol evolves. Always verify compatibility with the on-chain program version before integrating.