requestAirdrop
Last updated:
`requestAirdrop` asks the cluster to credit a given account with a number of **lamports** and returns the base-58 transaction signature of the airdrop transfer. It is the standard way to fund a wallet with test SOL during local development and integration testing.
**Devnet / testnet only.** Airdrops are a faucet feature of Solana's test clusters. This method has no effect on mainnet — there is no faucet on mainnet and any request routed there will fail. Point your client at a devnet or testnet endpoint when calling `requestAirdrop`.
The returned value is just the signature string; use a confirmation method such as `getSignatureStatuses` (or poll `getBalance`) to wait until the airdrop has landed before relying on the funds. Faucets are rate-limited and may cap the lamports granted per request, so request modest amounts and retry if a drop is declined.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pubkey | Pubkey | Yes | |
| lamports | integer | Yes | |
| config | CommitmentConfig | No |
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"requestAirdrop","params":["<pubkey>","<lamports>","<config>"]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "requestAirdrop",
"params": [
"<pubkey>",
"<lamports>",
"<config>"
],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"requestAirdrop","params":["<pubkey>","<lamports>","<config>"],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet, devnet, testnet.
- Credit cost: 5 per call.
FAQ
- What does requestAirdrop do?
- Requests an airdrop of lamports to a Solana public key — for use on devnet and testnet only.
- How many credits does requestAirdrop cost?
- requestAirdrop costs 5 credit(s) per call on Triport by default.
- Is requestAirdrop available over WebSocket?
- requestAirdrop is an HTTP JSON-RPC method.