Shyft
Start BuildingSupportWebsite
  • Welcome
    • 👋Introducing Shyft
    • 🏗️Start Building
  • Solana Infrastructure
    • 🚁Shyft RPCs
  • Yellowstone gRPC Network
    • Decoding gRPC Latency
    • ⚡gRPC Docs
      • Introduction
      • Authentication
      • Subscribe Requests
      • FAQ
      • Getting Started
        • Initializing the Yellowstone Client
        • Making a gRPC connection
        • Adding a Reconnection Mechanism
        • Modifying your Subscribe Request
        • Closing a gRPC Connection
      • Subscribing to Transactions
        • All Transactions of an address
        • Subscribing to all transactions of a Liquidity Pool
        • Subscribing to all transactions of multiple addresses
        • Subscribing to all transactions of a Token
      • Subscribing to Accounts
        • Account Updates for a Program
        • Account Updates for an Address
        • Account updates using memcmp
      • Streaming Blocks & BlocksMeta
        • Streaming Block Updates
        • Subscribing to BlocksMeta
      • Modifying & Unsubscribing
  • Solana defi data
    • DeFI APIs
      • Get Pool By Address
      • Get Pools By Token Pair
      • Get All Pools for a Token
      • Get Liquidity Details of a Pool
  • Callbacks
    • ☎️What are Callbacks?
      • Transaction Callbacks
      • Account Callbacks
    • 📔Callback APIs
      • Response Structure
      • List Callbacks
      • Register callback
      • Remove callback
      • 🔥Pause a callback
      • 🔥Resume a callback
      • Update Callbacks
      • Add Addresses
      • Remove addresses
  • Solana Super Indexers
    • 🌩️GraphQL APIs
      • Getting Started
      • Building Queries
      • Paginating Response
      • Applying Filters
      • Ordering and Sorting Data
    • 📀Case Studies
      • Tensor
        • Get Active Listings of a Wallet
        • Get Active Bids of a Wallet
        • Get Active Listings of a Collection
        • Get all Bids of a Collection
        • Get all Pools of a Margin Account
        • Get all Pools by Owner
      • Raydium
        • Get Pool By Address
        • Get Pools By Token Address
        • Get Pools Created Between Time
        • Get Pool Burn Percentage
        • Get Liquidity Details of a Pool
        • Get Pool and OpenBook Market Info
        • Get Token Supply Percentage In Pool
      • Orca Whirlpool
        • Get Pool by Address
        • Get Pool by Token Address
        • Get Positions for a Pool
        • Get Positions for a Wallet
        • Get Liquidity Details of a Pool
      • Kamino
        • Get Borrow Details of a Wallet
        • Get Deposit Details of a Wallet
        • Get Reserve Details
      • Cross Marketplace Queries
        • Get active listings across marketplaces for a wallet
        • Get listings for a collection across marketplaces
        • Get floor price of a collection
      • Cross Defi Queries
        • Fetch Liquidity Pools for Token
      • Native Staking
        • Get Stakes for a Wallet
        • Get Stakes For Validator
      • Governance/Realms
        • Get DAO Token Owners
        • Get Proposals For Governing Mint
        • Get All Proposals For DAO
        • Get DAO Treasury Info
        • Get All Active Proposals For Wallet
      • Meteora
        • Get All LB Position Pairs
        • Get Position of a User Wallet
        • Get Pool by Token Addresses
        • Get All Deposits for a User
        • Get All Withdraws for a User
        • Get All Fees Claimed by a User
        • Get All User Positions and Deposits for a Pool
        • Get All User Positions and Withdrawals for a Pool
      • Fluxbeam
        • Get Pool by Address
        • Get Pool by Token Addresses
      • Drift
        • Get User account for Delegate
        • Get User accounts based on authority
        • Get User details based on Referrer
        • Get Borrow/Deposit Amount for an User
        • Get PrepPositions for an User Account
        • Getting OrderId and userOrderId
        • Get OpenOrders for a User Account
      • 🔥Pumpswap
        • 🔥Get Pool by Address
        • 🔥Get Pool by Creator Address
        • 🔥Get Pools by Token Addresses
      • 🔥Raydium Launchpad
        • 🔥Get Bonding Curve Details by Pool Address
        • 🔥Get All Pools for a Creator
        • 🔥Get Pools by Token Addresses
        • 🔥Get Migration details of a Pool
  • Solana APIs
    • API Reference
    • Transactions
      • Parsed Transaction Structure
      • Transaction APIs
        • History
        • Parse Signature
        • Parse Multiple Signatures
        • Send
        • Send Multiple
    • NFT
      • 🔥Create Gasless
      • Create
      • Read All
      • Burn
      • 🔥Burn Multiple NFTs V2
      • Update
      • 🔥Create NFT from Metadata
      • 🔥Read Wallet Nfts
      • 🔥Read Selected NFTs
      • 🔥Get NFT Owners
      • 🔥Update NFT Metadata Uri
      • 🔥Update V2
      • Search
      • Transfer
      • Transfer Multiple NFTs
      • Mint
      • Read
    • Wallet
      • Get Balance
      • Get Token Balance
      • Get All Tokens Balance
      • Get Portfolio
      • Resolve Address
      • Get All Domains
      • Get Stake Accounts
    • Fungible Tokens
      • Create
      • Mint
      • Burn
      • 🔥Update
      • Get Token Info
      • Transfer
      • Airdrop
Powered by GitBook
On this page
  • Get Pool By Address
  • GET /v0/pools/get_by_address
  • Get Pools by Token Pair
  • GET /v0/pools/get_by_pair
  • Get All Pools For a Token
  • GET /v0/pools/get_by_token
  • Get Liquidity Details of a Pool
  • GET /v0/pools/get_liquidity_details

Was this helpful?

  1. Solana defi data

DeFI APIs

Easiest way to read defi data on Solana.

Defi data on Solana is scattered across multiple dexes, making it very difficult to work with. In order to read, one needs to handle each DEX separately, either through its SDK or raw RPC calls. Some functionality is notoriously slow since we need to use `getProgramAccounts` RPC call.

Enter Shyft Defi APIs

Accurate defi data across multiple dexes at blazingly fast speeds.

A simple call to fetch all pools of a token can take ~10 seconds or more, with the new Defi APIs it be done in under 500ms. Moreover all pools are returned in a parsed format, so you don't have to deal with IDLs on your end.

Following DEXs are supported by DeFi APIs currently.

DEX Name
Address

fluxbeam

FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X

meteoraAmm

Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB

meteoraDlmm

LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo

openbookV2

opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb

orca

whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc

raydiumAmm

675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8

raydiumClmm

CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK

raydiumCpmm

CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C

pumpFunAmm 🔥

pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA

Base URL for DeFi APIs: https://defi.shyft.to

New: Pumpswap is now available in DeFi APIs. The dex name for Pumpswap is pumpFunAmm.

Get Pool By Address

Accepts a pool address and returns all pool details including the DEX to which it belongs to.

GET /v0/pools/get_by_address

Query Params:

  • address: Address of the pool for which we want to fetch data. We automatically detect which dex this pools belongs to and parse accordingly.

const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("x-api-key", "<YOUR-API-KEY>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://defi.shyft.to/v0/pools/get_by_address?address=cHR79RPHM8PKMN1vkoetC3PSofXCUXnd92nPeKvhvom", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "success": true,
    "message": "Pool fetched successfully",
    "result": {
        "dex": "orca",
        "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
        "poolInfo": {
            "whirlpoolsConfig": "2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ",
            "whirlpoolBump": [
                255
            ],
            "tickSpacing": 256,
            "tickSpacingSeed": [
                0,
                1
            ],
            "feeRate": 20000,
            "protocolFeeRate": 1300,
            "liquidity": 0,
            "sqrtPrice": 5.852265938261555e+21,
            "tickCurrentIndex": 115199,
            "protocolFeeOwedA": 0,
            "protocolFeeOwedB": 0,
            "tokenMintA": "So11111111111111111111111111111111111111112",
            "tokenVaultA": "3ftEP3LhbrK6pCMJ7CmbLrpeghKbQigySs7LcnssoPLf",
            "feeGrowthGlobalA": 14160276998311468,
            "tokenMintB": "5ZCFjVZyNw8yUuYfBcqTJ2EVCfkXx7ZcHUgYyurbywMr",
            "tokenVaultB": "CXg5EMwdi2jBQunQQVon24ETGsNa3NBHBfCjrfsG6r7o",
            "feeGrowthGlobalB": 618434501757853800000,
            "rewardLastUpdatedTimestamp": 1712398469,
            "rewardInfos": [
                {
                    "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                    "emissionsPerSecondX64": "0",
                    "growthGlobalX64": "0",
                    "mint": "11111111111111111111111111111111",
                    "vault": "11111111111111111111111111111111"
                },
                {
                    "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                    "emissionsPerSecondX64": "0",
                    "growthGlobalX64": "0",
                    "mint": "11111111111111111111111111111111",
                    "vault": "11111111111111111111111111111111"
                },
                {
                    "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                    "emissionsPerSecondX64": "0",
                    "growthGlobalX64": "0",
                    "mint": "11111111111111111111111111111111",
                    "vault": "11111111111111111111111111111111"
                }
            ],
            "pubkey": "cHR79RPHM8PKMN1vkoetC3PSofXCUXnd92nPeKvhvom",
            "lamports": 5435760,
            "_updatedAt": "2024-09-04T20:28:28.265093Z"
        }
    }
}

Get Pools by Token Pair

Takes a pair of token addresses and returns all pools across DEXs with the specified liquidity pair. This API supports pagination and can also filter pools to a specific DEX if needed.

GET /v0/pools/get_by_pair

Query Params:

  • tokenA: Address of one of the Tokens in the Pair.

  • tokenB: Address of the other Token in the Liquidity Pair. The order of the token does not matter.

  • dex: (optional) Specifies an array of DEXes (string names) for which we will be receiving the pools.

  • limit: (optional) Specifies the number of items to display per page. The default value is 100.

  • page: (optional) Specifies the page number when displaying items specified by limit.

Let's say we want to fetch 50 pools from a particular DEX. We would set the limit parameter to 50 and the page parameter to 1. To get the next 50 pools, we would keep the limit at 50 but increase the page to 2.

To get the 5th set of 50 pools, we'd set the limit to 50 and the page to 5.

If a DEX doesn't have enough pools for a specific page, it will return an empty response.

const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("x-api-key", "<YOUR-API-KEY>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://defi.shyft.to/v0/pools/get_by_pair?tokenA=So11111111111111111111111111111111111111112&tokenB=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&page=1&limit=10", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "success": true,
    "message": "Pools fetched successfully",
    "result": {
        "page": 1,
        "limit": 10, //response shortened
        "dexes": {
            "fluxbeam": {
                "pools": [
                    {
                        "version": 1,
                        "isInitialized": 1,
                        "bumpSeed": 255,
                        "poolTokenProgramId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
                        "tokenAccountA": "6Mstdw2bFRpsu8QtwZb7u1waHmSbWMnT2SDhs4kaMG32",
                        "TokenAccountB": "3bXv4ztf78aCpsqcL9ncNvrkWr1XcF1vvYzG1SKVrDW1",
                        "tokenPool": "GDX61hU9HdW45LgQ36tzXYDQVMLyRjWX1tpAKyvSgxgR",
                        "mintA": "So11111111111111111111111111111111111111112",
                        "mintB": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "feeAccouunt": "AfC9vs3F2g2uUfAoAeU74rt8No5Ytm8aQdAbrgUgHvr9",
                        "tradeFeeNumerator": 20,
                        "tradeFeeDenominator": 1000,
                        "ownerTradeFeeNumerator": 5,
                        "ownerTradeFeeDenominator": 1000,
                        "ownerWithdrawFeeNumerator": 0,
                        "ownerWithdrawFeeDenominator": 1000,
                        "hostFeeNumerator": 20,
                        "hostFeeDenominator": 1000,
                        "curveType": 0,
                        "curveParameters": "{\"type\":\"Buffer\",\"data\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}",
                        "pubkey": "CZEZDGDkzsn4zTfdw6XRm4U1o6GatotMhhRmVEzdwGS3",
                        "lamports": 3145920,
                        "_updatedAt": "2024-05-29T08:42:59.78Z"
                    }
                ],
                "programId": "FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X"
            },
            "meteoraAmm": {
                "pools": [
                    {
                        "lpMint": "EydaSJmYgYh4Xub5nq8R7GTuwT2L2jLTw94CXpt63Lf9",
                        "tokenAMint": "So11111111111111111111111111111111111111112",
                        "tokenBMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "aVault": "FERjPVNEa7Udq8CEv68h6tPL46Tq7ieE49HrE2wea3XT",
                        "bVault": "3ESUFCnRNgZ7Mn2mPPUMmXYaKU8jpnV9VtA17M7t2mHQ",
                        "aVaultLp": "CpLW813hiVHWVrssx3HcUCvu7kJ1rakEBdrKzyAaMbd4",
                        "bVaultLp": "B91CQTDW6Brix1ybhrwchr3t5QsZPnfqG4CKjAxPMcw9",
                        "aVaultBump": 255,
                        "enabled": true,
                        "adminTokenAFee": "BB47VB2m4Us2hhixF27rxPzkgGUcqX86d6NVgbZLUHD6",
                        "adminTokenBFee": "BouVFMjp2FLC5bYTh5x277NaMSaZFqt5FYcd6B66Y59y",
                        "admin": "5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi",
                        "fees": {
                            "ownerTradeFeeDenominator": "100000",
                            "ownerTradeFeeNumerator": "0",
                            "tradeFeeDenominator": "100000",
                            "tradeFeeNumerator": "40"
                        },
                        "poolType": {
                            "permissionless": {}
                        },
                        "stake": "11111111111111111111111111111111",
                        "totalLockedLp": 0,
                        "curveType": {
                            "stable": {
                                "amp": "100",
                                "depeg": {
                                    "baseCacheUpdated": "0",
                                    "baseVirtualPrice": "0",
                                    "depegType": {
                                        "none": {}
                                    }
                                },
                                "lastAmpUpdatedTimestamp": "0",
                                "tokenMultiplier": {
                                    "precisionFactor": 9,
                                    "tokenAMultiplier": "1",
                                    "tokenBMultiplier": "1000"
                                }
                            }
                        },
                        "pubkey": "4u6zAdnwt39uPtuDkAiCrYU1C2oGj66dTahrqv6BfGP4",
                        "_lamports": 7461120,
                        "_updatedAt": "2024-10-22T16:11:33.666Z"
                    }
                ],
                "programId": "Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"
            },
            "openbookV2": {
                "pools": [
                    {
                        "pubkey": "6MtzKJytr6EgyGVQefP2TJBUH75aBMqwA5Zp7yukNJmL",
                        "lamports": 6792960,
                        "bump": 255,
                        "baseDecimals": 9,
                        "quoteDecimals": 6,
                        "padding1": 0,
                        "marketAuthority": "5AvWpZvN84LX49DSwoKGFGBxbtYZsx6BxiVszXShxTQr",
                        "timeExpiry": 0,
                        "collectFeeAdmin": "ob2htHLoCu2P6tX7RrNVtiG1mYTas8NGJEVLaFEUngk",
                        "openOrdersAdmin": {
                            "key": "11111111111111111111111111111111"
                        },
                        "consumeEventsAdmin": {
                            "key": "11111111111111111111111111111111"
                        },
                        "closeMarketAdmin": {
                            "key": "ob2htHLoCu2P6tX7RrNVtiG1mYTas8NGJEVLaFEUngk"
                        },
                        "name": 83,
                        "bids": "21byvGA4qEGFwZoyizb4avPtP5Ys7zLAqfocpLg4vvPF",
                        "asks": "8sC8MSHZkqUpwdeVpovyA3M66Gf4zf1hvL84vyJ1ZtZ",
                        "eventHeap": "4B141dhuPyS2ThK67tY1K1Qa8zTDFt9Gy7XWwEKkf2UW",
                        "oracleA": {
                            "key": "11111111111111111111111111111111"
                        },
                        "oracleB": {
                            "key": "11111111111111111111111111111111"
                        },
                        "oracleConfig": {
                            "confFilter": "0.10000000149011612",
                            "maxStalenessSlots": "100",
                            "reserved": 0
                        },
                        "quoteLotSize": 100,
                        "baseLotSize": 10000000,
                        "seqNum": 0,
                        "registrationTime": 1711625075,
                        "makerFee": 1000,
                        "takerFee": 1000,
                        "feesAccrued": 0,
                        "feesToReferrers": 0,
                        "referrerRebatesAccrued": 0,
                        "feesAvailable": 0,
                        "makerVolume": 0,
                        "takerVolumeWoOo": 0,
                        "baseMint": "So11111111111111111111111111111111111111112",
                        "quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "marketBaseVault": "7uYgEqTeqZBdGwab1Qv7zen3PJxw6DErLY4iyC5ekoqb",
                        "baseDepositTotal": 0,
                        "marketQuoteVault": "AJwJS6mCE5Y3CeQ7eEtA9eLhWe7EUSrdPL3W57UiC1Qh",
                        "quoteDepositTotal": 0,
                        "reserved": 0,
                        "_updatedAt": "2024-04-10T08:50:27.621Z"
                    }
                ],
                "programId": "opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb"
            },
            "orca": {
                "pools": [
                    {
                        "whirlpoolsConfig": "2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ",
                        "whirlpoolBump": [
                            255
                        ],
                        "tickSpacing": 8,
                        "tickSpacingSeed": [
                            8,
                            0
                        ],
                        "feeRate": 500,
                        "protocolFeeRate": 1,
                        "liquidity": 4333114772458,
                        "sqrtPrice": 7955113484095176000,
                        "tickCurrentIndex": -16823,
                        "protocolFeeOwedA": 14537046,
                        "protocolFeeOwedB": 2077779,
                        "tokenMintA": "So11111111111111111111111111111111111111112",
                        "tokenVaultA": "9RfZwn2Prux6QesG1Noo4HzMEBv3rPndJ2bN2Wwd6a7p",
                        "feeGrowthGlobalA": 24043789596251267000,
                        "tokenMintB": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "tokenVaultB": "BVNo8ftg2LkkssnWT4ZWdtoFaevnfD6ExYeramwM27pe",
                        "feeGrowthGlobalB": 1089920830426709200,
                        "rewardLastUpdatedTimestamp": 1730904586,
                        "rewardInfos": [
                            {
                                "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "1366725375216936208",
                                "mint": "orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE",
                                "vault": "5aN8t512S6WQEHnwXMZADP57oJWekVw892MnhJ7XYm1P"
                            },
                            {
                                "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "0",
                                "mint": "11111111111111111111111111111111",
                                "vault": "11111111111111111111111111111111"
                            },
                            {
                                "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "0",
                                "mint": "11111111111111111111111111111111",
                                "vault": "11111111111111111111111111111111"
                            }
                        ],
                        "pubkey": "7qbRF6YsyGuLUVs6Y1q64bdVrfe4ZcUUz1JRdoVNUJnm",
                        "lamports": 997698302,
                        "_updatedAt": "2024-11-06T14:49:47.64Z"
                    }
                ],
                "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
            },
            "raydiumAmm": {
                "pools": [
                    {
                        "pubkey": "GUZWuwD2qhuGZ13PVtTH9yJrB1kGEExN8YBVDiaS7DmL",
                        "lamports": 6124800,
                        "status": 6,
                        "nonce": 254,
                        "maxOrder": 7,
                        "depth": 3,
                        "baseDecimal": 9,
                        "quoteDecimal": 6,
                        "state": 2,
                        "resetFlag": 0,
                        "minSize": 1000000000,
                        "volMaxCutRatio": 500,
                        "amountWaveRatio": 0,
                        "baseLotSize": 1000000000,
                        "quoteLotSize": 10000000,
                        "minPriceMultiplier": 1,
                        "maxPriceMultiplier": 1000000000,
                        "systemDecimalValue": 1000000000,
                        "minSeparateNumerator": 5,
                        "minSeparateDenominator": 10000,
                        "tradeFeeNumerator": 25,
                        "tradeFeeDenominator": 10000,
                        "pnlNumerator": 12,
                        "pnlDenominator": 100,
                        "swapFeeNumerator": 25,
                        "swapFeeDenominator": 10000,
                        "baseNeedTakePnl": 82870,
                        "quoteNeedTakePnl": 1792,
                        "quoteTotalPnl": 14940,
                        "baseTotalPnl": 690590,
                        "poolOpenTime": 1683581973,
                        "punishPcAmount": 0,
                        "punishCoinAmount": 0,
                        "orderbookToInitTime": 0,
                        "swapBaseInAmount": 341096376543,
                        "swapQuoteOutAmount": 7034258204,
                        "swapBase2QuoteFee": 17589816,
                        "swapQuoteInAmount": 7035733864,
                        "swapBaseOutAmount": 341544296833,
                        "swapQuote2BaseFee": 852741273,
                        "baseVault": "3ieB79dHTcfBQtDtVrdBToWhytpheJF6HTkHcJVZ9CgH",
                        "quoteVault": "gRRwgkTD2CYa7uqhde6GguiM746qgyGhgC4eoyoLuaS",
                        "baseMint": "So11111111111111111111111111111111111111112",
                        "quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "lpMint": "8UqHbFufcpyAFTGyXF3s2Jrb6sWeyRAj8RZbiZ4cGM6G",
                        "openOrders": "2VcMb6coXASiqpoqvoikgM1bSbFGt739REJi5JJ3siPM",
                        "marketId": "FTm9NDDWuBXeVfvVgxQ37XNvWdLvrxxShdfSmeZiq8xB",
                        "marketProgramId": "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",
                        "targetOrders": "Ffr7BTny8taS3Mivx8PbVwL5hVEQozqV7Y291tWkBRDE",
                        "withdrawQueue": "11111111111111111111111111111111",
                        "lpVault": "11111111111111111111111111111111",
                        "owner": "GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ",
                        "lpReserve": 1000000,
                        "padding": [
                            0,
                            694,
                            0
                        ],
                        "_updatedAt": "2024-11-06T12:03:59.711Z"
                    }
                ],
                "programId": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"
            },
            "raydiumClmm": {
                "pools": [
                    {
                        "bump": [
                            254
                        ],
                        "ammConfig": "9EeWRCL8CJnikDFCDzG8rtmBs5KQR1jEYKCR5rRZ2NEi",
                        "owner": "HqDGLMCEEP4XBRjrQ9k3QxTUtRnWUXn5GN29NwetcwLK",
                        "tokenMint0": "So11111111111111111111111111111111111111112",
                        "tokenMint1": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "tokenVault0": "6PqdCQ9tqhfG4dt7a8MCKLBzdcXxeBgHqVs8BdWxPcQY",
                        "tokenVault1": "CsWhij2EZYT6WaHQUFJyPNqQUSnLEC1G9whSBdwy9wob",
                        "observationKey": "5o2Gu2FxDuQDZrmvVLoFPnBx4Yn1UTKXwZBzhQZyrM85",
                        "mintDecimals0": 9,
                        "mintDecimals1": 6,
                        "tickSpacing": 1,
                        "liquidity": 209592497,
                        "sqrtPriceX64": 7959168357173569000,
                        "tickCurrent": -16813,
                        "observationIndex": 0,
                        "observationUpdateDuration": 0,
                        "feeGrowthGlobal0X64": 517846876068501570,
                        "feeGrowthGlobal1X64": 78449053283502140,
                        "protocolFeesToken0": 3067298,
                        "protocolFeesToken1": 537456,
                        "swapInAmountToken0": 4705295410001,
                        "swapOutAmountToken0": 705817082734,
                        "swapInAmountToken1": 707692755939,
                        "swapOutAmountToken1": 4714360720785,
                        "status": 0,
                        "rewardInfos": [
                            {
                                "authority": "HqDGLMCEEP4XBRjrQ9k3QxTUtRnWUXn5GN29NwetcwLK",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            },
                            {
                                "authority": "HqDGLMCEEP4XBRjrQ9k3QxTUtRnWUXn5GN29NwetcwLK",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            },
                            {
                                "authority": "HqDGLMCEEP4XBRjrQ9k3QxTUtRnWUXn5GN29NwetcwLK",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            }
                        ],
                        "tickArrayBitmap": [
                            0,
                            8192,
                            33554432,
                            536870912,
                            32
                        ],
                        "totalFeesToken0": 1186028533,
                        "totalFeesClaimedToken0": 641151081,
                        "totalFeesToken1": 178501164,
                        "totalFeesClaimedToken1": 92020280,
                        "fundFeesToken0": 21529486,
                        "fundFeesToken1": 3458594,
                        "openTime": 1722943672,
                        "pubkey": "7PLpcezEnTV2xXU6eL3j4kLi9MJJFUngsWQvUNKyjE2V",
                        "lamports": 11637120,
                        "_updatedAt": "2024-11-06T14:48:58.72Z"
                    }
                ],
                "programId": "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK"
            },
            "raydiumCpmm": {
                "pools": [
                    {
                        "ammConfig": "2fGXL8uhqxJ4tpgtosHZXT4zcQap6j62z3bMDxdkMvy5",
                        "poolCreator": "4xSZEyiAw2NCxr4vYPxY6qeyvSzAeo9wjMW6shFH8haq",
                        "token0Vault": "6FghY4izwEJ4dq4jVLgbiQeJQBxAHQcyFEbH3ePNqAPw",
                        "token1Vault": "4kVkYx1ZL2BS5ndNBDCv6AUrmXj7q5wtQhiCaY1UXo9u",
                        "lpMint": "4wETSJG3woeMzonzp3xRHZdc9TzzTQdZPyoGHWE6ALC4",
                        "token0Mint": "So11111111111111111111111111111111111111112",
                        "token1Mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "token0Program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                        "token1Program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                        "observationKey": "Ckw9LZj6JZvQGg7cFq394ewu8zuundgNuaM3kqeY4MrL",
                        "authBump": 253,
                        "status": false,
                        "lpMintDecimals": 9,
                        "mint0Decimals": 9,
                        "mint1Decimals": 6,
                        "lpSupply": 100,
                        "protocolFeesToken0": 399,
                        "protocolFeesToken1": 10041,
                        "fundFeesToken0": 133,
                        "fundFeesToken1": 3347,
                        "openTime": 1723744072,
                        "pubkey": "Hx6EoXCzvYzcdtTvEm2QsXUFVe9pJzhH9FuMxmLw589D",
                        "lamports": 5324400,
                        "_updatedAt": "2024-11-01T18:47:19.313Z"
                    }
                ],
                "programId": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
            }
        }
    }
}

Get All Pools For a Token

Accepts a single token address, and fetche all pools for that particular token across supported DEXes. This API also supports pagination.

New: Pumpswap is now available in DeFi APIs. The dex name for Pumpswap is pumpFunAmm.

GET /v0/pools/get_by_token

Query Params:

  • token: Address of the token for which we are fetching pools.

  • limit: (optional) Specifies the number of items to display per page. The default value is 100.

  • page: (optional) Specifies the page number when displaying items specified by limit.

Let's say we want to fetch 50 pools from a particular DEX. We would set the limit parameter to 50 and the page parameter to 1. To get the next 50 pools, we would keep the limit at 50 but increase the page to 2.

To get the 5th set of 50 pools, we'd set the limit to 50 and the page to 5. If a DEX doesn't have enough pools for a specific page, it will return an empty response.

const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("x-api-key", "<YOUR-API-KEY>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://defi.shyft.to/v0/pools/get_by_token?token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&page=1&limit=10", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "success": true,
    "message": "Pools fetched successfully",
    "result": {
        "page": 1,
        "limit": 1,
        "dexes": {
            "fluxbeam": {
                "pools": [
                    {
                        "version": 1,
                        "isInitialized": 1,
                        "bumpSeed": 255,
                        "poolTokenProgramId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
                        "tokenAccountA": "6ZtopVUYLKuQPq7VnY2B9sUSazB9JHzuLuTJbQ4ScFWj",
                        "TokenAccountB": "3He9T9hfdzzRMDKwdw1d4Yf49K48ZWcgJBt3QBxYwwPu",
                        "tokenPool": "5MknxczbktqmMRpdQ3awBoLyw3Pn2dwuBaBMr1LKjA5n",
                        "mintA": "HDnNLYDyXwSXusAAuf4iGkLs2apz5eEYQP9dHmRmypoy",
                        "mintB": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "feeAccouunt": "5CBPaQ1EhUixz3EFLDWzzJc4FiUjk1ZHNKDGpJpTjvbx",
                        "tradeFeeNumerator": 20,
                        "tradeFeeDenominator": 1000,
                        "ownerTradeFeeNumerator": 5,
                        "ownerTradeFeeDenominator": 1000,
                        "ownerWithdrawFeeNumerator": 0,
                        "ownerWithdrawFeeDenominator": 0,
                        "hostFeeNumerator": 20,
                        "hostFeeDenominator": 1000,
                        "curveType": 0,
                        "curveParameters": "{\"type\":\"Buffer\",\"data\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}",
                        "pubkey": "75AT5Xgrz6muMRGNctDavEcN1Ho2SP6n897zzs33LEPJ",
                        "lamports": 3145920,
                        "_updatedAt": "2024-05-29T08:42:59.297Z"
                    }
                ],
                "programId": "FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X"
            },
            "meteoraAmm": {
                "pools": [
                    {
                        "lpMint": "9ZgdREVJDG5apT7gPt6CAPBYvfhUcDecFUvbXaxoKunj",
                        "tokenAMint": "7Z3thA2ZmMuapEmEGiB6rxoYmDDnnEv717NydgeoXhex",
                        "tokenBMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "aVault": "6Fzmt8UixGEK6sJkjc6ET2VUqK3wkvBoJGHB85J2ek7M",
                        "bVault": "3ESUFCnRNgZ7Mn2mPPUMmXYaKU8jpnV9VtA17M7t2mHQ",
                        "aVaultLp": "8gyv8AwYqCNKC2FkFMzZy4pPeQazM9Svad29XcXDYcrk",
                        "bVaultLp": "9C7fTkTBczhsdhjNWSJdLX27gSizyoTHdmQAVH1ZNZgg",
                        "aVaultBump": 255,
                        "enabled": true,
                        "adminTokenAFee": "7UsYbee9gpHSv3DSg2LnuHUU7AX1bRPDmGcv3NQaiDYq",
                        "adminTokenBFee": "BLcDGLJXrc2WyRxa36StWZFPULtxSM9nPE4WCoycrM6h",
                        "admin": "5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi",
                        "fees": {
                            "ownerTradeFeeDenominator": "100000",
                            "ownerTradeFeeNumerator": "0",
                            "tradeFeeDenominator": "100000",
                            "tradeFeeNumerator": "4000"
                        },
                        "poolType": {
                            "permissionless": {}
                        },
                        "stake": "11111111111111111111111111111111",
                        "totalLockedLp": 0,
                        "curveType": {
                            "constantProduct": {}
                        },
                        "pubkey": "FwpaUdQiEpLBVXZw542N9NzkiHmCJY1FJPEChH2K2Gt4",
                        "_lamports": 7461120,
                        "_updatedAt": null
                    }
                ],
                "programId": "Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"
            },
            "openbookV2": {
                "pools": [
                    {
                        "pubkey": "2ZNDYtUpfenGZcjhcrQeNJ8Bs4ecVJKQEE4oNBCkejxj",
                        "lamports": 6792960,
                        "bump": 255,
                        "baseDecimals": 9,
                        "quoteDecimals": 6,
                        "padding1": 0,
                        "marketAuthority": "BY68afooPNzRE6n9iQmpGwioLU7fzAfUsMXmThjmkYa9",
                        "timeExpiry": 1713753898,
                        "collectFeeAdmin": "7ihN8QaTfNoDTRTQGULCzbUT3PHwPDTu5Brcu4iT2paP",
                        "openOrdersAdmin": {
                            "key": "7ihN8QaTfNoDTRTQGULCzbUT3PHwPDTu5Brcu4iT2paP"
                        },
                        "consumeEventsAdmin": {
                            "key": "11111111111111111111111111111111"
                        },
                        "closeMarketAdmin": {
                            "key": "7ihN8QaTfNoDTRTQGULCzbUT3PHwPDTu5Brcu4iT2paP"
                        },
                        "name": 80,
                        "bids": "66uPx4upzDV8U8625M27FRuaNWywgyEGCb7Wi1XRY32X",
                        "asks": "AsTo6bRuTWBaFm8t1fAA59zKbS37HzfefpSVeitLsWa9",
                        "eventHeap": "GuezGsXdm86B615mdGZwmGrb6qemG3bEj4CCnaPkKH87",
                        "oracleA": {
                            "key": "11111111111111111111111111111111"
                        },
                        "oracleB": {
                            "key": "11111111111111111111111111111111"
                        },
                        "oracleConfig": {
                            "confFilter": "0.10000000149011612",
                            "maxStalenessSlots": "100",
                            "reserved": 0
                        },
                        "quoteLotSize": 100,
                        "baseLotSize": 100000000,
                        "seqNum": 0,
                        "registrationTime": 1712803519,
                        "makerFee": 25,
                        "takerFee": 75,
                        "feesAccrued": 0,
                        "feesToReferrers": 0,
                        "referrerRebatesAccrued": 0,
                        "feesAvailable": 0,
                        "makerVolume": 0,
                        "takerVolumeWoOo": 0,
                        "baseMint": "GkKTgckaYe8BZx83XQByVgdZP6WEMBDzWM5zvS5u85ic",
                        "quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "marketBaseVault": "8bvxAvEFYTiGFxJqFf9YV8Nb4t6HigmeivJsupiJhXfX",
                        "baseDepositTotal": 0,
                        "marketQuoteVault": "3Ndm6WVBtiPRJ5Csa4YBnETkgsvvhxPAeVZuDirMt8SE",
                        "quoteDepositTotal": 0,
                        "reserved": 0,
                        "_updatedAt": "2024-04-11T02:45:24.483Z"
                    }
                ],
                "programId": "opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb"
            },
            "orca": {
                "pools": [
                    {
                        "whirlpoolsConfig": "2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ",
                        "whirlpoolBump": [
                            255
                        ],
                        "tickSpacing": 64,
                        "tickSpacingSeed": [
                            64,
                            0
                        ],
                        "feeRate": 3000,
                        "protocolFeeRate": 1300,
                        "liquidity": 0,
                        "sqrtPrice": 178194428756287260,
                        "tickCurrentIndex": -92800,
                        "protocolFeeOwedA": 0,
                        "protocolFeeOwedB": 0,
                        "tokenMintA": "5PmpMzWjraf3kSsGEKtqdUsCoLhptg4yriZ17LKKdBBy",
                        "tokenVaultA": "Dy6ktGLX9So2jwUAGzJA811b2XxXVfP4NfRvgvAUXkZ5",
                        "feeGrowthGlobalA": 102588657235574930000,
                        "tokenMintB": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "tokenVaultB": "AVxMdgRUUt28vrMjvq1jR2CxdcRtA2sqBdotrjrgNCiy",
                        "feeGrowthGlobalB": 62866546968137560,
                        "rewardLastUpdatedTimestamp": 1717481791,
                        "rewardInfos": [
                            {
                                "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "2396950608335898073171",
                                "mint": "5PmpMzWjraf3kSsGEKtqdUsCoLhptg4yriZ17LKKdBBy",
                                "vault": "EMMrXsrt8KabTVgsPZbtGFLXNBgyqr1n52KvfxcvYQqo"
                            },
                            {
                                "authority": "DjDsi34mSB66p2nhBL6YvhbcLtZbkGfNybFeLDjJqxJW",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "377409543105569901",
                                "mint": "orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE",
                                "vault": "5S5axVvwG2g3P6sgdwUC2x62KzkXWXgc3xonhbRDPhHD"
                            },
                            {
                                "authority": "3Pi4tc4SxZyKZivKxWnYfGNxeqFJJxPc8xRw1VnvXpbb",
                                "emissionsPerSecondX64": "0",
                                "growthGlobalX64": "0",
                                "mint": "11111111111111111111111111111111",
                                "vault": "11111111111111111111111111111111"
                            }
                        ],
                        "pubkey": "HZUXGiKoFMqEaBRvJZJs4ueFRdK8zrVMb9akHSatNt64",
                        "lamports": 5435761,
                        "_updatedAt": "2024-09-04T20:28:28.265093Z"
                    }
                ],
                "programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
            },
            "raydiumAmm": {
                "pools": [
                    {
                        "pubkey": "5oAvct85WyF7Sj73VYHbyFJkdRJ28D8m4z4Sxjvzuc6n",
                        "lamports": 7124800,
                        "status": 6,
                        "nonce": 254,
                        "maxOrder": 7,
                        "depth": 3,
                        "baseDecimal": 9,
                        "quoteDecimal": 6,
                        "state": 1,
                        "resetFlag": 0,
                        "minSize": 1000000000,
                        "volMaxCutRatio": 500,
                        "amountWaveRatio": 5000000,
                        "baseLotSize": 1000000000,
                        "quoteLotSize": 1000,
                        "minPriceMultiplier": 1,
                        "maxPriceMultiplier": 1000000000,
                        "systemDecimalValue": 1000000000,
                        "minSeparateNumerator": 5,
                        "minSeparateDenominator": 10000,
                        "tradeFeeNumerator": 25,
                        "tradeFeeDenominator": 10000,
                        "pnlNumerator": 12,
                        "pnlDenominator": 100,
                        "swapFeeNumerator": 25,
                        "swapFeeDenominator": 10000,
                        "baseNeedTakePnl": 0,
                        "quoteNeedTakePnl": 0,
                        "quoteTotalPnl": 0,
                        "baseTotalPnl": 0,
                        "poolOpenTime": 1711805820,
                        "punishPcAmount": 0,
                        "punishCoinAmount": 0,
                        "orderbookToInitTime": 0,
                        "swapBaseInAmount": 130723408323,
                        "swapQuoteOutAmount": 19611942921,
                        "swapBase2QuoteFee": 50141279,
                        "swapQuoteInAmount": 20051565615,
                        "swapBaseOutAmount": 150917060047,
                        "swapQuote2BaseFee": 326818032,
                        "baseVault": "FzNRkDo1o1oeBud2J9Rz66FqQCyxjpmxcao4iFsewEGa",
                        "quoteVault": "tAoQ7jLRJdtrw1vhZzoCHxHfsWp3cdn9SqnPvP1LVMT",
                        "baseMint": "So11111111111111111111111111111111111111112",
                        "quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "lpMint": "H8LhJ8RgoEASP8rThuNFyapV7Vp1srbx8H8Sv4mEzX67",
                        "openOrders": "9y14U2Uexz6sjXzC3fYj4L6cpUmqa9eJVRQ6yMsVsGGZ",
                        "marketId": "B7mSdPv1CGcHNrRBV36ZxARfNJ7nBzLA2izF1pUaNZk4",
                        "marketProgramId": "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX",
                        "targetOrders": "8e5dYngB7rqJZneznzWBrR1ERBjbTKhRnNTT6G7LcEY5",
                        "withdrawQueue": "11111111111111111111111111111111",
                        "lpVault": "11111111111111111111111111111111",
                        "owner": "GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ",
                        "lpReserve": 1000000000,
                        "padding": [
                            0,
                            694,
                            0
                        ],
                        "_updatedAt": "2024-11-06T14:54:01.954Z"
                    }
                ],
                "programId": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"
            },
            "raydiumClmm": {
                "pools": [
                    {
                        "bump": [
                            254
                        ],
                        "ammConfig": "4BLNHtVe942GSs4teSZqGX24xwKNkqU7bGgNn3iUiUpw",
                        "owner": "FEKKYTdqeNWSsigguGLDz8BNDUZM5P6236QtFNTPnguV",
                        "tokenMint0": "9iLH8T7zoWhY7sBmj1WK9ENbWdS1nL8n9wAxaeRitTa6",
                        "tokenMint1": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "tokenVault0": "6mdfUDtJWBvo82MtHp1zoXJVLD4PdSyRjmch73XZF8gU",
                        "tokenVault1": "BAGWEE7gKNd8DAfnyT4sJ7erwnQEqfDrjxnnGoPW87FG",
                        "observationKey": "GS6LviEt1dgBQd6X7YQ16miBjRqvFGQwvHTHzkdNUWBk",
                        "mintDecimals0": 9,
                        "mintDecimals1": 6,
                        "tickSpacing": 10,
                        "liquidity": 203703816024,
                        "sqrtPriceX64": 583079239924189700,
                        "tickCurrent": -69090,
                        "observationIndex": 0,
                        "observationUpdateDuration": 0,
                        "feeGrowthGlobal0X64": 437022438200171,
                        "feeGrowthGlobal1X64": 417375801264,
                        "protocolFeesToken0": 689388,
                        "protocolFeesToken1": 649,
                        "swapInAmountToken0": 57450895699,
                        "swapOutAmountToken0": 57433714,
                        "swapInAmountToken1": 54589872,
                        "swapOutAmountToken1": 54594548142,
                        "status": 0,
                        "padding": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0
                        ],
                        "rewardInfos": [
                            {
                                "authority": "FEKKYTdqeNWSsigguGLDz8BNDUZM5P6236QtFNTPnguV",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            },
                            {
                                "authority": "FEKKYTdqeNWSsigguGLDz8BNDUZM5P6236QtFNTPnguV",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            },
                            {
                                "authority": "FEKKYTdqeNWSsigguGLDz8BNDUZM5P6236QtFNTPnguV",
                                "emissionsPerSecondX64": "0",
                                "endTime": "0",
                                "lastUpdateTime": "0",
                                "openTime": "0",
                                "rewardClaimed": "0",
                                "rewardGrowthGlobalX64": "0",
                                "rewardState": 0,
                                "rewardTotalEmissioned": "0",
                                "tokenMint": "11111111111111111111111111111111",
                                "tokenVault": "11111111111111111111111111111111"
                            }
                        ],
                        "tickArrayBitmap": [
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            4096,
                            0,
                            0,
                        ],
                        "totalFeesToken0": 4825954,
                        "totalFeesClaimedToken0": 0,
                        "totalFeesToken1": 4609,
                        "totalFeesClaimedToken1": 0,
                        "fundFeesToken0": 229779,
                        "fundFeesToken1": 211,
                        "openTime": 0,
                        "pubkey": "G8nTBE6mkhckyZbPRNYHam9yryTj4qsK5wSaQDXWzkhp",
                        "lamports": 11637120,
                        "_updatedAt": "2024-09-12T06:00:00.302Z"
                    }
                ],
                "programId": "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK"
            },
            "raydiumCpmm": {
                "pools": [
                    {
                        "ammConfig": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2",
                        "poolCreator": "H1TxAwm7KW4EjT1CeFZF3VecrKuZftEv926HaXQMUWCz",
                        "token0Vault": "G2fGPwMsAGruioGEQNhutzDoHoFvskMAdH49cLw2Gyjy",
                        "token1Vault": "4NxqPTqK4AbsiEe4St51CiENFpzXrDZXPR1MeL3dtqFj",
                        "lpMint": "D67d6gMuBAP4hSwApmWLioQTPzDKApiZ1buFQdkmDrbx",
                        "token0Mint": "91tkJe2T7AeEWzh4hbHfH9j51viygjxV6fRfEkwkSLrE",
                        "token1Mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "token0Program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                        "token1Program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                        "observationKey": "9HBZQr5rpjygtx3i7JMWMpptv952yRdQTbTnqixDJf4C",
                        "authBump": 253,
                        "status": false,
                        "lpMintDecimals": 9,
                        "mint0Decimals": 2,
                        "mint1Decimals": 6,
                        "lpSupply": 100,
                        "protocolFeesToken0": 0,
                        "protocolFeesToken1": 0,
                        "fundFeesToken0": 0,
                        "fundFeesToken1": 0,
                        "openTime": 1719986499,
                        "pubkey": "CEpwi28SthGbkvAGFrpDNudvb4xRXL5S3QrwRAyrmAMw",
                        "lamports": 5324400,
                        "_updatedAt": "2024-09-05T20:09:31.016054Z"
                    }
                ],
                "programId": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
            },
            {
            "pumpFunAmm": {
                "pools": [
                    {
                        "pool_bump": 254,
                        "index": 0,
                        "creator": "erAbhGh5x8ZhSQGpsMcvajKJzHPvoeFxodiVdzWKtzq",
                        "base_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                        "quote_mint": "So11111111111111111111111111111111111111112",
                        "lp_mint": "9uXagk63fc4nWwY6NuokPnHeXZgzs3HJQ2ymKHpTTkai",
                        "pool_base_token_account": "6d1YzpXmCWGmGCwfB5UVfh7SbSMf1Sohjt3NpdCXPLFq",
                        "pool_quote_token_account": "AtoKZgnH6AhdUPbjJ4wx3y4toYYhASXTuLSxF2uQT1Ya",
                        "lp_supply": 100,
                        "pubkey": "5nmZbfXMdbye1vdpF1BaE1FkqZEnJ8JBFsmS15kENjpb",
                        "lamports": 2359440,
                        "_updatedAt": "2025-03-25T23:44:37.108Z",
                        "slot": null
                    }
                ],
                "programId": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
            }
        }
    }
}

Get Liquidity Details of a Pool

Returns the liquidity details for a pool address. We automatically detect which Dex this pools belongs to and handle parsing accordingly.

GET /v0/pools/get_liquidity_details

Query Params:

  • address: Address of the pool for which we want to fetch the liquidity details.

const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("x-api-key", "<YOUR-API-KEY>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://defi.shyft.to/v0/pools/get_liquidity_details?address=3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
{
    "success": true,
    "message": "Liquidity fetched successfully",
    "result": {
        "address": "3nMFwZXwY1s1M5s8vYAHqd4wGs4iSxXE4LRoUMMYqEgF",
        "dex": "raydiumClmm",
        "programId": "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK",
        "liquidity": {
            "tokenA": {
                "address": "So11111111111111111111111111111111111111112",
                "name": "Wrapped SOL",
                "symbol": "SOL",
                "decimals": 9,
                "imageUri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/So11111111111111111111111111111111111111112/logo.png",
                "amount": 2852294270867
            },
            "tokenB": {
                "address": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
                "name": "USDT",
                "symbol": "USDT",
                "decimals": 6,
                "imageUri": "https://raw.githubusercontent.com/solana-labs/token-list/main/assets/mainnet/Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB/logo.svg",
                "amount": 1541196868452
            }
        }
    }
}

PreviousModifying & UnsubscribingNextWhat are Callbacks?

Last updated 26 days ago

Was this helpful?