- Main API Version
- UI RPCs
- Chain Time
- TVL and 24-Hour Volume
- RAY Stake Pools
- Migrate LP Pool List
- Transaction Auto Fee
- CLMM Config
- CPMM Config
- Default Mint List
- Mint Info
- Mint Price
- Pool Info by IDs
- Pool Info by LP Mint
- Pool Info List
- Pool Info by Token Mint
- Pool Key by IDs
- Pool Liquidity History
- CLMM Position
- Farm Pool Info by IDs
- Farm Pool Info by LP Mint
- Farm Pool Key by IDs
- IDO Pool Keys by IDs
To get started, include the Composer autoloader and instantiate the relevant classes for accessing Raydium's API endpoints.
require_once 'vendor/autoload.php';
use JosephOpanel\RaydiumSDK\V3\Main;
use JosephOpanel\RaydiumSDK\V3\Mint;
use JosephOpanel\RaydiumSDK\V3\Pools;
use JosephOpanel\RaydiumSDK\V3\Farms;
use JosephOpanel\RaydiumSDK\V3\IDO;
// Initialize the endpoint classes
$main = new Main();
$mint = new Mint();
$pools = new Pools();
$farms = new Farms();
$ido = new IDO();Each class provides access to specific API endpoints, grouped by functionality:
- Main: Access general platform information, configuration, and utilities.
- Mint: Retrieve mint-related information such as token lists and prices.
- Pools: Fetch pool-specific data, including liquidity, positions, and keys.
- Farms: Access farm pool data, including APY and TVL.
- IDO: Retrieve Initial DEX Offering (IDO) pool keys and related data.
Use these classes to make API calls effortlessly, enabling seamless interaction with the Raydium platform in your PHP applications.
The getVersion method fetches the current version of the Raydium UI V3.
- Endpoint:
/main/version - HTTP Method:
GET - Parameters: None
- Response:
version(string): The current version of the Raydium UI.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the current UI V3 version
$version = $main->getVersion();
echo "Raydium UI Version: $version";The getRPCs method fetches the list of RPC endpoints for the Raydium UI.
- Endpoint:
/main/rpcs - HTTP Method:
GET - Parameters: None
- Response:
rpcs(array): An array of RPC details, each including:url(string): The RPC URL.status(string): The status of the RPC (onlineoroffline).
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the RPCs
$rpcs = $main->getRPCs();
foreach ($rpcs as $rpc) {
echo "RPC URL: {$rpc['url']} - Status: {$rpc['status']}\n";
}The getChainTime method fetches the current chain time from the Raydium API.
- Endpoint:
/main/chain-time - HTTP Method:
GET - Parameters: None
- Response:
chainTime(string): The current chain time in ISO 8601 format.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the chain time
$chainTime = $main->getChainTime();
echo "Current Chain Time: $chainTime";The getInfo method fetches the Total Value Locked (TVL) and 24-hour trading volume for the Raydium platform.
- Endpoint:
/main/info - HTTP Method:
GET - Parameters: None
- Response:
tvl(integer): The total value locked in the platform.volume24h(integer): The 24-hour trading volume.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the TVL and 24-hour volume
$info = $main->getInfo();
echo "TVL: {$info['tvl']} USD\n";
echo "24-hour Volume: {$info['volume24h']} USD\n";The getStakePools method fetches details about the RAY stake pools available on the Raydium platform.
- Endpoint:
/main/stake-pools - HTTP Method:
GET - Parameters: None
- Response:
stakePools(array): An array of stake pool details, each including:id(string): The unique identifier for the stake pool.tvl(integer): The total value locked in the pool.apy(float): The annual percentage yield for the pool.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the RAY stake pools
$stakePools = $main->getStakePools();
foreach ($stakePools as $pool) {
echo "Pool ID: {$pool['id']}, TVL: {$pool['tvl']} USD, APY: {$pool['apy']}%\n";
}The getMigrateLP method fetches the list of liquidity pools available for migration from old pools to new pools.
- Endpoint:
/main/migrate-lp - HTTP Method:
GET - Parameters: None
- Response:
pools(array): An array of LP pool details, each including:id(string): The unique identifier for the LP pool.source(string): The source pool identifier.destination(string): The destination pool identifier.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the Migrate LP Pool List
$migrateLP = $main->getMigrateLP();
foreach ($migrateLP as $pool) {
echo "Pool ID: {$pool['id']}, Source: {$pool['source']}, Destination: {$pool['destination']}\n";
}The getAutoFee method fetches the automatic transaction fee configurations from the Raydium API.
- Endpoint:
/main/auto-fee - HTTP Method:
GET - Parameters: None
- Response:
fees(array): An array of fee configurations, each including:type(string): The type of fee (e.g.,transaction,withdrawal).amount(float): The fee amount.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the transaction auto-fee configurations
$autoFee = $main->getAutoFee();
foreach ($autoFee as $fee) {
echo "Fee Type: {$fee['type']}, Amount: {$fee['amount']}\n";
}The getClmmConfig method fetches the configuration for the Concentrated Liquidity Market Maker (CLMM) from the Raydium API.
- Endpoint:
/main/clmm-config - HTTP Method:
GET - Parameters: None
- Response:
config(array): The configuration details, including:tickSpacing(integer): The spacing between ticks.maxLiquidity(integer): The maximum liquidity allowed.minLiquidity(integer): The minimum liquidity required.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the CLMM configuration
$clmmConfig = $main->getClmmConfig();
echo "Tick Spacing: {$clmmConfig['tickSpacing']}\n";
echo "Max Liquidity: {$clmmConfig['maxLiquidity']}\n";
echo "Min Liquidity: {$clmmConfig['minLiquidity']}\n";The getCpmmConfig method fetches the configuration for the Constant Product Market Maker (CPMM) from the Raydium API.
- Endpoint:
/main/cpmm-config - HTTP Method:
GET - Parameters: None
- Response:
config(array): The configuration details, including:feeRate(float): The fee rate for swaps.minLiquidity(integer): The minimum liquidity required.maxLiquidity(integer): The maximum liquidity allowed.
use JosephOpanel\RaydiumSDK\V3\Main;
$main = new Main();
// Fetch the CPMM configuration
$cpmmConfig = $main->getCpmmConfig();
echo "Fee Rate: {$cpmmConfig['feeRate']}\n";
echo "Min Liquidity: {$cpmmConfig['minLiquidity']}\n";
echo "Max Liquidity: {$cpmmConfig['maxLiquidity']}\n";The getList method fetches the default list of mints available in the Raydium platform.
- Endpoint:
/mint/list - HTTP Method:
GET - Parameters: None
- Response:
mints(array): An array of mint details, each including:address(string): The mint address.name(string): The name of the token.symbol(string): The token symbol.
use JosephOpanel\RaydiumSDK\V3\Mint;
$mint = new Mint();
// Fetch the default mint list
$mintList = $mint->getList();
foreach ($mintList as $mint) {
echo "Address: {$mint['address']}, Name: {$mint['name']}, Symbol: {$mint['symbol']}\n";
}The getMintInfo method fetches detailed information about specific mints on the Raydium platform using their IDs.
- Endpoint:
/mint/ids - HTTP Method:
GET - Parameters:
ids(array): An array of mint IDs to query.
- Response:
mints(array): An array of mint details, each including:id(string): The mint ID.name(string): The name of the token.symbol(string): The token symbol.decimals(integer): The number of decimals for the token.
use JosephOpanel\RaydiumSDK\V3\Mint;
$mint = new Mint();
// Fetch details for specific mints
$mintInfo = $mint->getMintInfo(['mint1', 'mint2']);
foreach ($mintInfo as $mint) {
echo "ID: {$mint['id']}, Name: {$mint['name']}, Symbol: {$mint['symbol']}, Decimals: {$mint['decimals']}\n";
}The getMintPrice method fetches the current price information for specific mints on the Raydium platform.
- Endpoint:
/mint/price - HTTP Method:
GET - Parameters:
ids(array): An array of mint IDs to query prices for.
- Response:
prices(array): An associative array of mint prices, where:- Key: Mint ID.
- Value: Current price (float).
use JosephOpanel\RaydiumSDK\V3\Mint;
$mint = new Mint();
// Fetch current prices for specific mints
$mintPrices = $mint->getMintPrice(['mint1', 'mint2']);
foreach ($mintPrices as $mintId => $price) {
echo "Mint ID: $mintId, Price: $price USD\n";
}The getPoolInfoByIds method fetches detailed information about specific pools on the Raydium platform using their IDs.
- Endpoint:
/pools/info/ids - HTTP Method:
GET - Parameters:
ids(array): An array of pool IDs to query.
- Response:
pools(array): An array of pool details, each including:id(string): The pool ID.tvl(integer): The total value locked in the pool.apy(float): The annual percentage yield for the pool.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch details for specific pools
$poolInfo = $pools->getPoolInfoByIds(['pool1', 'pool2']);
foreach ($poolInfo as $pool) {
echo "Pool ID: {$pool['id']}, TVL: {$pool['tvl']} USD, APY: {$pool['apy']}%\n";
}The getPoolInfoByLPs method fetches detailed information about pools on the Raydium platform using their LP mint addresses.
- Endpoint:
/pools/info/lps - HTTP Method:
GET - Parameters:
lpMints(array): An array of LP mint addresses to query.
- Response:
pools(array): An array of pool details, each including:lpMint(string): The LP mint address.tvl(integer): The total value locked in the pool.apy(float): The annual percentage yield for the pool.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch pool details using LP mint addresses
$poolInfo = $pools->getPoolInfoByLPs(['lp1', 'lp2']);
foreach ($poolInfo as $pool) {
echo "LP Mint: {$pool['lpMint']}, TVL: {$pool['tvl']} USD, APY: {$pool['apy']}%\n";
}The getAllPoolsInfo method fetches detailed information about all pools on the Raydium platform.
- Endpoint:
/pools/info/list - HTTP Method:
GET - Parameters: None
- Response:
pools(array): An array of pool details, each including:id(string): The pool ID.tvl(integer): The total value locked in the pool.apy(float): The annual percentage yield for the pool.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch information for all pools
$allPools = $pools->getAllPoolsInfo();
foreach ($allPools as $pool) {
echo "Pool ID: {$pool['id']}, TVL: {$pool['tvl']} USD, APY: {$pool['apy']}%\n";
}The getPoolInfoByTokenMint method fetches detailed information about pools on the Raydium platform using their token mint addresses.
- Endpoint:
/pools/info/mint - HTTP Method:
GET - Parameters:
tokenMints(array): An array of token mint addresses to query.
- Response:
pools(array): An array of pool details, each including:tokenMint(string): The token mint address.tvl(integer): The total value locked in the pool.apy(float): The annual percentage yield for the pool.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch pool details using token mint addresses
$poolInfo = $pools->getPoolInfoByTokenMint(['mint1', 'mint2']);
foreach ($poolInfo as $pool) {
echo "Token Mint: {$pool['tokenMint']}, TVL: {$pool['tvl']} USD, APY: {$pool['apy']}%\n";
}The getPoolKeysByIds method fetches key information for pools on the Raydium platform using their pool IDs.
- Endpoint:
/pools/key/ids - HTTP Method:
GET - Parameters:
ids(array): An array of pool IDs to query.
- Response:
keys(array): An array of pool key details, each including:id(string): The pool ID.key(string): The associated key.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch pool keys using pool IDs
$poolKeys = $pools->getPoolKeysByIds(['pool1', 'pool2']);
foreach ($poolKeys as $pool) {
echo "Pool ID: {$pool['id']}, Key: {$pool['key']}\n";
}The getPoolLiquidityHistory method fetches historical liquidity data for pools on the Raydium platform.
- Endpoint:
/pools/line/liquidity - HTTP Method:
GET - Parameters:
ids(array): An array of pool IDs to query.
- Response:
liquidityHistory(array): An array of liquidity history data, each including:id(string): The pool ID.date(string): The date of the liquidity data (in YYYY-MM-DD format).liquidity(integer): The liquidity value on that date.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch liquidity history for specific pools
$liquidityHistory = $pools->getPoolLiquidityHistory(['pool1', 'pool2']);
foreach ($liquidityHistory as $liquidity) {
echo "Pool ID: {$liquidity['id']}, Date: {$liquidity['date']}, Liquidity: {$liquidity['liquidity']}\n";
}The getPoolPositionHistory method fetches historical position data for pools on the Raydium platform.
- Endpoint:
/pools/line/position - HTTP Method:
GET - Parameters:
ids(array): An array of pool IDs to query.
- Response:
positionHistory(array): An array of position history data, each including:id(string): The pool ID.date(string): The date of the position data (in YYYY-MM-DD format).position(integer): The position value on that date.
use JosephOpanel\RaydiumSDK\V3\Pools;
$pools = new Pools();
// Fetch position history for specific pools
$positionHistory = $pools->getPoolPositionHistory(['pool1', 'pool2']);
foreach ($positionHistory as $position) {
echo "Pool ID: {$position['id']}, Date: {$position['date']}, Position: {$position['position']}\n";
}The getFarmInfoByIds method fetches detailed information about farm pools on the Raydium platform using their farm IDs.
- Endpoint:
/farms/info/ids - HTTP Method:
GET - Parameters:
ids(array): An array of farm IDs to query.
- Response:
farms(array): An array of farm pool details, each including:id(string): The farm ID.tvl(integer): The total value locked in the farm.apy(float): The annual percentage yield for the farm.
use JosephOpanel\RaydiumSDK\V3\Farms;
$farms = new Farms();
// Fetch details for specific farms
$farmInfo = $farms->getFarmInfoByIds(['farm1', 'farm2']);
foreach ($farmInfo as $farm) {
echo "Farm ID: {$farm['id']}, TVL: {$farm['tvl']} USD, APY: {$farm['apy']}%\n";
}The getFarmInfoByLP method fetches detailed information about farm pools on the Raydium platform using their LP mint addresses.
- Endpoint:
/farms/info/lp - HTTP Method:
GET - Parameters:
lpMints(array): An array of LP mint addresses to query.
- Response:
farms(array): An array of farm pool details, each including:lpMint(string): The LP mint address.tvl(integer): The total value locked in the farm.apy(float): The annual percentage yield for the farm.
use JosephOpanel\RaydiumSDK\V3\Farms;
$farms = new Farms();
// Fetch farm details using LP mint addresses
$farmInfo = $farms->getFarmInfoByLP(['lp1', 'lp2']);
foreach ($farmInfo as $farm) {
echo "LP Mint: {$farm['lpMint']}, TVL: {$farm['tvl']} USD, APY: {$farm['apy']}%\n";
}The getFarmKeysByIds method fetches key information for farm pools on the Raydium platform using their farm IDs.
- Endpoint:
/farms/key/ids - HTTP Method:
GET - Parameters:
ids(array): An array of farm IDs to query.
- Response:
keys(array): An array of farm key details, each including:id(string): The farm ID.key(string): The associated key.
use JosephOpanel\RaydiumSDK\V3\Farms;
$farms = new Farms();
// Fetch farm keys using farm IDs
$farmKeys = $farms->getFarmKeysByIds(['farm1', 'farm2']);
foreach ($farmKeys as $farm) {
echo "Farm ID: {$farm['id']}, Key: {$farm['key']}\n";
}The getIDOPoolKeys method fetches key information for IDO pools on the Raydium platform using their IDs.
- Endpoint:
/ido/key/ids - HTTP Method:
GET - Parameters:
ids(array): An array of IDO pool IDs to query.
- Response:
keys(array): An array of IDO pool key details, each including:id(string): The IDO pool ID.key(string): The associated key.
use JosephOpanel\RaydiumSDK\V3\IDO;
$ido = new IDO();
// Fetch IDO pool keys using IDO IDs
$idoKeys = $ido->getIDOPoolKeys(['ido1', 'ido2']);
foreach ($idoKeys as $ido) {
echo "IDO ID: {$ido['id']}, Key: {$ido['key']}\n";
}