Bonding Curve API
The Bonding Curve API endpoint provides access to bonding curve details, including virtual reserves, bonding curve data, and token supply.
Endpoint Details
- Method:
GET
- URL:
https://api.pumpfunapis.com/api/bonding-curve/{mint}
Example mint
2ZnL2kwYxu2HJGuusJ9wkauNL2zkvndsisjVaVyppump
Example Usage
Curl Example
cURL Example
curl --location --request GET 'https://api.pumpfunapis.com/api/bonding-curve/2ZnL2kwYxu2HJGuusJ9wkauNL2zkvndsisjVaVyppump'
Python Example
Python Example
import requests
def get_bonding_curve(mint):
url = f"https://api.pumpfunapis.com/api/bonding-curve/{mint}"
response = requests.get(url)
if response.status_code == 200:
print("Bonding Curve Data:", response.json())
else:
print("Error:", response.status_code, response.text)
get_bonding_curve("2ZnL2kwYxu2HJGuusJ9wkauNL2zkvndsisjVaVyppump")
JavaScript Example
JavaScript Example
const fetch = require('node-fetch');
const getBondingCurve = async (mint) => {
const response = await fetch(`https://api.pumpfunapis.com/api/bonding-curve/${mint}`, {
method: 'GET',
});
if (!response.ok) {
throw new Error('Failed to fetch bonding curve details');
}
const data = await response.json();
console.log('Bonding Curve Data:', data);
};
getBondingCurve("2ZnL2kwYxu2HJGuusJ9wkauNL2zkvndsisjVaVyppump").catch(console.error);
Response
Successful Response
200 OK
{
"success": true,
"data": {
"mint": "2ZnL2kwYxu2HJGuusJ9wkauNL2zkvndsisjVaVyppump",
"bonding_curve": "CEn9MQ2k6viLe7nagYn7Yimbn3aDg2qbACHN64FgeAqu",
"associated_bonding_curve": "84nW9335QSyDJBmAPLac3CXguz4TFVtSCvosRb6Tjsym",
"virtual_token_reserves": 1072996765347341,
"virtual_sol_reserves": 30000090445,
"token_total_supply": 1000000000000000,
"complete": false
}
}
Error Response
Example Error
Error Response
{
"error": "Invalid mint provided"
}