🔥Get Pools by Token Addresses
Fetch Pumpswap Pools based on a single Token Address or a Liquidity Pair
Pump AMM, the native decentralized exchange for Pump.fun tokens, utilizes liquidity pools to facilitate trading. Each pool is defined by a liquidity pair of token mint addresses. This pair is denoted by baseMint and quoteMint addresses on Pumpswap. We can add filters to these two fields, to retrieve specific pool details involving a particular liquidity pair.
For instance we are trying to get liquidity pools involving USDC and SOL, so we filter baseMint
and quoteMint
fields using the _in filter.
You can directly copy paste this code on replit and see it in action.
Fetch Pool by Liquidity Pair (USDC-SOL)
We can also query liquidity pool involving a particular token address, for that we would have to filter the baseMint
or quoteMint
field using the _in filter.
Fetch Pools involving a Token (USDC)
Last updated
Was this helpful?