Get Token Info – API
Use this endpoint to request the current on‑chain token info of any token by its mint address.
Heads‑up!
• We charge a fixed fee of 10,000 lamports.
• For real‑time prices you can use our WebSocket stream.
Endpoint
POST https://api.pumpapi.io
Request Body
Field | Description |
---|---|
privateKey | Fee wallet |
action | Must be "getTokenInfo" |
mint | Mint address of the token |
The response JSON returns the current price in SOL per token, total supply, pool name, and the Solana and token reserves
📦 Code Examples
- Python
- JavaScript
- Rust
- Go
import requests
url = "http://api.pumpapi.io"
data = {
"privateKey": "your_private_key", # fee taken from this wallet
"action": "getTokenInfo",
"mint": "token_address",
}
response = requests.post(url, json=data)
print(response.json()) # {"price":2.795899348462258e-8,"pool":"pump","vTokensInBondingCurve":1072999999.999999,"vSolInBondingCurve":30.000000009,"supply":1000000000,"timestamp":1753230239232}
import axios from 'axios';
const data = {
privateKey: "your_private_key", // fee taken from this wallet
action: "getTokenInfo",
mint: "token_address"
};
axios.post('http://api.pumpapi.io', data)
.then(res => console.log(res.data)) // {"price":2.795899348462258e-8,"pool":"pump","vTokensInBondingCurve":1072999999.999999,"vSolInBondingCurve":30.000000009,"supply":1000000000,"timestamp":1753230239232}
.catch(err => console.error(err));
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client
.post("http://api.pumpapi.io")
.json(&json!({
"privateKey": "your_private_key",
"action": "getTokenInfo",
"mint": "token_address"
}))
.send()
.await?
.text()
.await?;
println!("{}", res); // {"price":2.795899348462258e-8,"pool":"pump","vTokensInBondingCurve":1072999999.999999,"vSolInBondingCurve":30.000000009,"supply":1000000000,"timestamp":1753230239232}
Ok(())
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"privateKey": "your_private_key", // fee taken from this wallet
"action": "getTokenInfo",
"mint": "token_address",
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post("http://api.pumpapi.io", "application/json", bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result) // map[price:0.0123]
}