Skip to main content

Fetch Token Price – API

Use this endpoint to request the current on‑chain price of any token by its mint address.

Heads‑up!
• We charge a fixed fee of 5,000 lamports.
• For real‑time prices you can use our WebSocket stream.

Endpoint

POST https://api.pumpapi.io

Request Body

FieldDescription
privateKeyFee wallet
actionMust be "getPrice"
mintMint address of the token

The response JSON returns the best current price in SOL per token.

📦 Code Examples

import requests

url = "http://api.pumpapi.io"

data = {
"privateKey": "your_private_key", # fee taken from this wallet
"action": "getPrice",
"mint": "token_address",
}

response = requests.post(url, json=data)
print(response.json()) # {'price': 0.0123}