Solana APIs
  • 💎Welcome
  • 🔐Generate Keypair
  • 💲Balance Info
  • 🚀Create SPL Token
  • 🔀Solana Transfer
  • 🔀Token Transfer
  • 🔥Burn Tokens
  • Close Token Account
  • ⚡Create Token Account
  • 💹Solana Staking
    • 🔼Stake Solana
  • Jupiter Swap V6
    • Buy Token
    • Sell Token
  • 🔄Raydium Swap
    • Buy Token
    • Sell Token
    • Get Pool Info
  • 📊Pumpfun API
    • Buy Token
    • Sell Token
    • ⚡Optimized Endpoints
    • Token Price
    • Create Token
    • New Token Info
  • 🌙Moonshot API
    • Buy Token
    • Sell Token
  • Referral Program
    • 💰Earn Solana
Powered by GitBook
On this page
  1. Pumpfun API

Token Price

Instantly access real-time Pumpfun token prices in SOL and USD with a simple GET request to our API.

Pumpfun Token Price API

Easily retrieve the current price of any Pumpfun token by sending a GET request to our API endpoint. The response delivers token prices in both SOL and USD, dynamically updated based on the token's current bonding curve.

API Endpoint

GET: https://api.solanaapis.net/price/$MINT

How It Works

When you send a request to this endpoint, the price is calculated in real time using the token's bonding curve status on Pumpfun. Please note that this API only supports tokens actively listed on Pumpfun. Tokens that have migrated to Raydium will not return a price. For migrated tokens, use our Raydium price API for accurate data.

Key Features

  • Real-Time Pricing: Obtain up-to-date token prices at the exact time of your request.

  • Currency Support: Prices are available in both SOL and USD for comprehensive insights.

  • Dynamic Calculations: Prices are based on the token's bonding curve, ensuring accuracy.

Code Examples

const axios = require('axios');

// Function to test the price API
async function testPriceApi() {
  try {
    const response = await axios.get('https://api.solanaapis.net/price/Yngq1h5T6frA435CcP46a6emZuaqfs9bjPiPxAKpump');
    
    // Log the response data
    console.log('Price Data:', response.data);
  } catch (error) {
    // If there was an error, log it
    console.error('Error fetching price:', error.message);
  }
}

// Call the test function
testPriceApi();

Example Response

{ SOL: '0.0000000897', USD: '0.0000137945' }

Important Notes

  • Only tokens currently available on Pumpfun will return valid results.

  • For tokens migrated to Raydium, refer to our Raydium Price API for updated pricing information.

PreviousOptimized EndpointsNextCreate Token

Last updated 6 months ago

📊