Raydium Liquidity Pool v4 IDL

raydiumv4.0.0DEX / AMM
Program Address
675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8
On-chain

Raydium Liquidity Pool v4 is the standard constant product AMM on Solana. The most widely-used AMM for token pairs, supporting swaps, liquidity provision, and farming with deep integration across the Solana ecosystem.

33
Instructions
2
Accounts
0
Events
11
Types

Instructions

initializeStrategyinitializeUserWithNoncecloseEmptyAccountsetPositionStopLosssetPositionRangeStoptransfertransferLpborrowswapLimitswapBaseInaddLiquiditystakeLp+21 more

Account Types

StrategyStateUserInfo

Integration Examples

Use the Raydium Liquidity Pool v4 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 Liquidity Pool v4 IDL
import idl from "./raydium liquidity pool v4.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_Liquidity_Pool_v4
  .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

raydium liquidity pool v4.json
{
  "version": "4.0.0",
  "name": "Raydium Liquidity Pool V4",
  "instructions": [
    {
      "name": "initializeStrategy",
      "accounts": [
        {
          "name": "admin",
          "isMut": true,
          "isSigner": true
        },
        {
          "name": "strategyState",
          "isMut": true,
          "isSigner": false
        },
        {
          "name": "strategyAuthority",
          "isMut": false,
          "isSigner": false
        },
        {
          "name": "strategyFeeAccount",
          "isMut": false,
          "isSigner": false
        },
        {
          "name": "strategyTknAccount0",
          "isMut": true,
...

Frequently Asked Questions

What is the Raydium Liquidity Pool v4 IDL?

The Raydium Liquidity Pool v4 IDL (Interface Definition Language) is a JSON schema that defines the on-chain program interface for the Raydium Liquidity Pool v4 smart contract on Solana. It describes all available instructions, account structures, events, and custom types that developers need to interact with the Raydium Liquidity Pool v4 program. This IDL contains 33 instructions, 2 account types, 0 events, and 11 type definitions.

How do I use the Raydium Liquidity Pool v4 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 Liquidity Pool v4 program address on Solana?

The Raydium Liquidity Pool v4 program is deployed at address 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 on Solana mainnet. You can verify this on any Solana block explorer.

What version of the Raydium Liquidity Pool v4 IDL is this?

This is version 4.0.0 of the Raydium Liquidity Pool v4 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.