in-solana by Supanode

requestAirdrop — Solana RPC Method

requestAirdrop sends free SOL to the specified account. This method is available only on devnet and testnet for development and testing purposes. It is not available on mainnet.

Parameters

NameTypeRequiredDescription
pubkeystringYesBase-58 encoded public key to receive the SOL.
lamportsu64YesAmount of lamports to airdrop (1 SOL = 1,000,000,000 lamports).
commitmentstringNoprocessed, confirmed, or finalized. Default: finalized.

Request

curl -X POST https://api.devnet.solana.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "requestAirdrop",
    "params": [
      "83astBRguLMdt2h5U1Tbd1hAFN33NxoGY728jTgBEFTZ",
      1000000000
    ]
  }'

TypeScript (@solana/kit)

import { createSolanaRpc, address } from "@solana/kit";

const rpc = createSolanaRpc("https://api.devnet.solana.com");
const signature = await rpc
  .requestAirdrop(
    address("83astBRguLMdt2h5U1Tbd1hAFN33NxoGY728jTgBEFTZ"),
    1_000_000_000n
  )
  .send();

console.log(`Airdrop signature: ${signature}`);

Response

{
  "jsonrpc": "2.0",
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
  "id": 1
}
FieldTypeDescription
resultstringTransaction signature of the airdrop transfer.

Use getSignatureStatuses to confirm the airdrop transaction has been finalized.

Common errors

  • Airdrop request too large — devnet typically limits requests to 2 SOL (2,000,000,000 lamports) per request.
  • Rate limited — the faucet has rate limits. Wait before retrying.
  • Not available on mainnet — this method only works on devnet and testnet.

Performance

The airdrop is a real transaction on the network and takes the usual confirmation time. The response returns immediately with a transaction signature, but the SOL is not usable until the transaction is confirmed.

FAQ

What is the maximum airdrop amount? On devnet, the limit is typically 2 SOL per request. On testnet, limits vary. These limits can change.

How long until the SOL is available? The airdrop creates a real transaction. Wait for confirmation using getSignatureStatuses or by polling getBalance with confirmed commitment.

Can I airdrop to any address? Yes. The address does not need to exist beforehand — the airdrop creates the account if it does not exist.

Why did my airdrop fail? Common reasons: rate limiting (too many requests), amount too large, or network congestion on devnet/testnet. Retry after a brief delay.

Can I use this on mainnet? No. requestAirdrop is a development tool available only on devnet and testnet. On mainnet, SOL must be obtained through exchanges or transfers.

Parameters

ParameterTypeRequiredDescriptionDefault
pubkeystringYesBase-58 encoded public key to receive the airdrop.—
lamportsu64YesAmount of lamports to airdrop.—
commitmentstringNoCommitment level: processed, confirmed, or finalized.finalized

Updated: