Documentation index

requestAirdrop

Requests an airdrop of lamports to a specified public key. This method is only available on devnet and testnet -- it will fail on mainnet-beta. It is the primary way for developers to fund accounts during development and testing. The airdrop amount is limited (typically 1-2 SOL per request on devnet) and may be rate-limited. Returns a transaction signature that can be used with confirmTransaction to verify the airdrop completed.

Parameters

#TypeRequiredDescription
1stringYesBase-58 encoded public key of the account to receive SOL
2u64YesAmount of lamports to airdrop
3objectNoConfiguration object

Configuration object fields:

FieldTypeDescription
commitmentstringCommitment level: processed, confirmed, or finalized

Response

Returns a single value:

FieldTypeDescription
resultstringTransaction signature of the airdrop (base-58)

Code Examples

cURL

Terminal
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "requestAirdrop",
  "params": [
    "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
    1000000000
  ]
}'

TypeScript

TypeScript
const response = await fetch("http://88.216.36.108:7999", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "requestAirdrop",
    params: [
      "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
      1000000000
    ]
  }),
});
const { result } = await response.json();
console.log("Airdrop signature:", result);

Python

Python
import requests

response = requests.post("http://88.216.36.108:7999", json={
    "jsonrpc": "2.0",
    "id": 1,
    "method": "requestAirdrop",
    "params": [
        "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
        1000000000
    ]
})
result = response.json()["result"]
print(f"Airdrop signature: {result}")

Rust

Rust
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("http://88.216.36.108:7999")
        .json(&json!({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "requestAirdrop",
            "params": [
                "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
                1000000000_u64
            ]
        }))
        .send().await?
        .text().await?;
    println!("{}", res);
    Ok(())
}

Example Response

JSON
{
  "jsonrpc": "2.0",
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
  "id": 1
}