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

King of The Hill

Get king of the hill token

GET /king

Method is used to get a top gainer token (king of the hill)

Headers

Name
Value

Content-Type

application/json

x-api-key

The API key for authentication

Body

Response

{
    "mint": "7cDvSns8bBQJLDcFJbBuqLqskzMKasS3kjbSAkhT6WTG",
    "name": "cloud",
    "symbol": "cloud",
    "description": "The sky is my younger brother, only clouds can bring beauty to everyone",
    "twitter": "https://x.com/cloud_msol",
    "telegram": "https://t.me/cloud_msol",
    "image_uri": "https://cf-ipfs.com/ipfs/QmPBTw448Kb6p36dQyfSeDNJX2TCjMxp3GQWLaxhbryCo7",
    "metadata_uri": "https://cf-ipfs.com/ipfs/QmXUzLXNQSfqGJcDiAhYXS4LmuhosJW4tKexa5KsgqHbaL",
    "bonding_curve": "5WQGaU12PG2vTtPTpbEruw9xJG1NLiMMkZFbYvquhaDz",
    "associated_bonding_curve": "9iCR4UzrGn7z3KMEyZoWjSXyW68vkc69X9umntj9fMPh",
    "creator": "66eGWZoQYQ6yeq4g6EdfQ59dfsKCzpo2B1czSTPrgCXp",
    "created_timestamp": 1721114844617,
    "king_of_the_hill_timestamp": 1721115864000
}
{
  "error": true,
  "message": "Token not found"
}

Examples

curl --location 'https://rpc.api-pump.fun/king' \
--header 'x-api-key: your_api_key'
package main

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

func main() {

  url := "https://rpc.api-pump.fun/king"
  method := "GET"

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

  if err != nil {
    fmt.Println(err)
    return
  }
  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 request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://rpc.api-pump.fun/king',
  'headers': {
    'x-api-key': 'your_api_key'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "https://rpc.api-pump.fun/king"

payload = {}
headers = {
  'x-api-key': 'your_api_key'
}

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

print(response.text)

PreviousBonding CurveNextTrade tokens

Last updated 10 months ago