Transfer
Use this to send native SOL or SPL tokens to another wallet.
- If
mintis not provided, the API sends native SOL. - If
mint: "token_address"is provided, the API sends the specified token instead. - You can also pass
memoas an optional field. It lets you attach a message that will be visible in Solana explorers.
amount can be either a numeric value (for example 0.000001) or a percentage string such as "100%" (transfer the full balance).
The example below shows a native SOL transfer.
Uncomment the "mint": "token_address" line if you want to transfer tokens instead.
Local transactions are supported
For a local-transaction example, visit the Trade API page and reuse the same local-transaction code snippets — the flow works the same way here.
The code snippets below show lightning transactions.
Endpoint
POST https://api.pumpapi.io
Request Body
| Field | Description |
|---|---|
privateKey | Base58 Private key of the wallet that will sign the transfer transaction |
action | Must be "transfer" |
to | Recipient wallet address. Example: pump22QQQnff5qmAxW7yg6VEKU3C7Mj8C4TDaXJZt9Q |
amount | Amount to send. You can pass a numeric value such as 0.000001 or a percentage string such as "100%" to transfer the full balance |
mint | Optional. Token mint address. If omitted, native SOL is sent |
memo | Optional. A memo string that will be visible in Solana explorers |
📦 Code Examples
- Python
- JavaScript
- Rust
- Go
import requests
url = "https://api.pumpapi.io"
data = {
"privateKey": "base58_private_key",
"action": "transfer",
"to": "recipient_public_key",
"amount": 0.000001, # You can also use a percentage, for example "100%" to transfer everything
# "mint": "token_address", # Add this if you want to transfer tokens
# "memo": "Hello from PumpAPI", # Optional memo visible in Solana explorers
}
response = requests.post(url, json=data)
print(response.json())
import axios from "axios";
const url = "https://api.pumpapi.io";
const data = {
privateKey: "base58_private_key",
action: "transfer",
to: "recipient_public_key",
amount: 0.000001, // You can also use a percentage, for example "100%" to transfer everything
// mint: "token_address", // Add this if you want to transfer tokens
// memo: "Hello from PumpAPI", // Optional memo visible in Solana explorers
};
axios
.post(url, data)
.then((res) => console.log(res.data))
.catch((err) => console.error(err));
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client
.post("https://api.pumpapi.io")
.json(&json!({
"privateKey": "base58_private_key",
"action": "transfer",
"to": "recipient_public_key",
"amount": 0.000001
// "mint": "token_address", // Add this if you want to transfer tokens
// "memo": "Hello from PumpAPI" // Optional memo visible in Solana explorers
}))
.send()
.await?
.text()
.await?;
println!("{}", res);
Ok(())
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.pumpapi.io"
data := map[string]any{
"privateKey": "base58_private_key",
"action": "transfer",
"to": "recipient_public_key",
"amount": 0.000001, // You can also use a percentage, for example "100%" to transfer everything
// "mint": "token_address", // Add this if you want to transfer tokens
// "memo": "Hello from PumpAPI", // Optional memo visible in Solana explorers
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result any
_ = json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%v\n", result)
}