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

Generate API Key

Generate new API Key & create a wallet

POST /createWallet

Method is used to generate new API Key & create a new wallet. It returns the private key, public key, and API key of the newly created wallet.

Attention! If you want to use the generated one-time wallet to sign transactions, you need to save the generated private key and top up the SOL balance of the associated public address

If you want to use your own node to sign transactions, then it is enough to save only the API key to access the endpoints

Headers

Name
Value

Content-Type

application/json

Response

{
  "privateKey": "your_private_key_here",
  "publicKey": "your_public_key_here",
  "apiKey": "your_api_key_here"
}
{
  "error": "Invalid request"
}

Examples

curl --location --request POST 'https://rpc.api-pump.fun/createWallet' \
--header 'Content-Type: application/json'
package main

import (
  "fmt"
  "bytes"
  "mime/multipart"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://rpc.api-pump.fun/createWallet"
  method := "POST"

  payload := &bytes.Buffer{}
  writer := multipart.NewWriter(payload)
  err := writer.Close()
  if err != nil {
    fmt.Println(err)
    return
  }


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

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

  req.Header.Set("Content-Type", writer.FormDataContentType())
  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': 'POST',
  'hostname': 'rpc.api-pump.fun',
  'path': '/createWallet',
  'headers': {
    'Content-Type': 'application/json'
  },
  '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/createWallet"

payload = {}
files={}
headers = {
  'Content-Type': 'application/json'
}

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

print(response.text)
PreviousAPI ReferenceNextBalance

Last updated 10 months ago