Get Migration details of a Pool
Fetch migration details of a pool on Raydium Launchpad
Get all pools which are ready to migrate
async function getMigrationReadyPools() {
const SHYFT_API_KEY = "YOUR_SHYFT_API_KEY";
const operationsDoc = `
query MyQuery {
raydium_launchpad_PoolState(where: {status: {_eq: "1"}}) {
pubkey
status
migrate_type
migrate_fee
total_quote_fund_raising
total_base_sell
quote_protocol_fee
platform_fee
}
}
`; //status `1` indicates the pool has completed its bonding curve
const result = await fetch(
`https://programs.shyft.to/v0/graphql?api_key=${SHYFT_API_KEY}&network=mainnet-beta`, //SHYFT's GQL endpoint
{
method: "POST",
body: JSON.stringify({
query: operationsDoc,
variables: {},
operationName: "MyQuery",
}),
}
);
const { errors, data } = await result.json();
console.dir(data, { depth: null });
}
getMigrationReadyPools();Fetch Status and Migration Destination of a Pool by address
Last updated