Get Pump.fun Token Pairs with Moralis API
Retrieve all token pairs, pair stats, and aggregated stats for any Pump.fun token using the Moralis Solana API. This guide will show you how to fetch token pairs by token address! π
β¨ What You Can Doβ
With this API, you can:
- Retrieve all token pairs for a given Pump.fun token
- Get detailed stats for a specific pair (price, volume, liquidity)
- Fetch aggregated stats across all pairs for a token
- Use this data for DEX analytics, trading dashboards, and more
π 3 Ways to Fetch Pump.fun Token Pairsβ
The Moralis API lets you fetch token pair data in 3 ways:
- By Token Address (π‘ This example) β Retrieve all trading pairs for a specific Pump.fun token
- Pair Stats β Get detailed stats for a specific pair (volume, price, liquidity)
- Aggregated Pair Stats β Get overall stats across all pairs for a token
In this guide, weβll focus on retrieving token pairs by token address.
π Step 1: Get Your Moralis API Keyβ
Before making API calls, you need an API key. Hereβs how to get one:
- Go to developers.moralis.com and sign up (itβs free!).
- Navigate to the "API Keys" section in your dashboard.
- Copy your API Key β youβll need this for making requests.
β‘ Step 2: Fetch Token Pairs by Addressβ
Visit the token pairs API documentation and make an API request.
You can also use cURL, Postman, or your favorite programming language.
π Example API Requestβ
curl --request GET \
--url 'https://solana-gateway.moralis.io/token/mainnet/9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump/pairs' \
--header 'accept: application/json' \
--header 'X-API-Key: YOUR_API_KEY'
π Step 3: Understanding Query Parametersβ
Parameter | Type | Required | Description |
---|---|---|---|
network | string | β | The blockchain network (e.g., mainnet) |
tokenAddress | string | β | The Pump.fun token address |
π Example Response
{
"pairs": [
{
"exchangeAddress": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
"exchangeName": "Raydium AMM v4",
"exchangeLogo": "https://entities-logos.s3.amazonaws.com/raydium.png",
"pairAddress": "Bzc9NZfMqkXR6fz1DBph7BDf9BroyEf6pnzESP7v5iiw",
"pairLabel": "Fartcoin /SOL",
"usdPrice": 1.199318671,
"usdPrice24hrPercentChange": 22.664745257790372,
"usdPrice24hrUsdChange": 22.664745257790372,
"volume24hrNative": 273987.170173767,
"volume24hrUsd": 63991693.95772195,
"liquidityUsd": 25907004.26453429,
"baseToken": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
"quoteToken": "So11111111111111111111111111111111111111112",
"inactivePair": false,
"pair": [
{
"tokenAddress": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump",
"tokenName": "Fartcoin ",
"tokenSymbol": "Fartcoin ",
"tokenLogo": null,
"tokenDecimals": "6",
"pairTokenType": "token0",
"liquidityUsd": 12937540.20684488
},
{
"tokenAddress": "So11111111111111111111111111111111111111112",
"tokenName": "Wrapped SOL",
"tokenSymbol": "SOL",
"tokenLogo": null,
"tokenDecimals": "9",
"pairTokenType": "token1",
"liquidityUsd": 12969464.057689412
}
]
}
]
}
π Step 4: Understanding the Responseβ
Field | Description |
---|---|
exchangeName | The DEX where the token is traded |
pairAddress | The liquidity pool pair address |
pairLabel | Token pair name (e.g., Fartcoin/SOL) |
usdPrice | Current price of the token in USD |
usdPrice24hrPercentChange | 24-hour price change in percentage |
volume24hrUsd | Total 24-hour trading volume in USD |
liquidityUsd | Total liquidity available in USD |
baseToken | Address of the main token in the pair |
quoteToken | Address of the quote token (SOL, USDC, etc.) |
π Step 5: Use Token Pair Data in Your Appβ
π― Some use cases:
- Build a DEX analytics dashboard
- Show price charts for Pump.fun token pairs
- Track liquidity and trading volume across exchanges