api-pump.fun
  • General
    • Getting started
  • Reference
    • API Reference
      • Generate API Key
      • Balance
      • Token information
      • Get Quote
      • Bonding Curve
      • King of The Hill
      • Trade tokens
      • Trade tokens [local RPC]
      • Create token
  • Streams
    • Websocket subscription
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Bonding Curve

Get bonding curve information

GET /bondingCurve

Method is used to get a bonding curve of a token

Headers

Name
Value

Content-Type

application/json

x-api-key

The API key for authentication

Parameters

Parameter
Description
Required

token

The token for which the quote is requested

Yes

Body

Response

{
    "key": "25uW6hChv3HV5y1tWKWAdFSn52W7MXbjVzfydpE95MCW",
    "discriminator": 6966180631402821399,
    "virtualTokenReserves": 365093896575450,
    "virtualSolReserves": 88169099743,
    "realTokenReserves": 85193896575450,
    "realSolReserves": 58169099743,
    "tokenTotalSupply": 1000000000000000,
    "complete": false
}
{
  "error": true,
  "message": "Token not found"
}
{
  "error": true,
  "message": "Wallet not found"
}
{
  "error": true,
  "message": "Curve is complete"
}

Examples

curl --location 'https://rpc.api-pump.fun/bondingCurve?token=your_token' \
--header 'Content-Type: application/json' \
--header 'x-api-key: your_api_key'
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://rpc.api-pump.fun/bondingCurve?token=your_token"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("x-api-key", "your_api_key")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'rpc.api-pump.fun',
  'path': '/bondingCurve?token=your_token',
  'headers': {
    'Content-Type': 'application/json',
    'x-api-key': 'your_api_key'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();
import requests
import json

url = "https://rpc.api-pump.fun/bondingCurve?token=your_token"

payload = {}
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'your_api_key'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
PreviousGet QuoteNextKing of The Hill

Last updated 10 months ago