Skip to main content

Lightning API Setup

The Lightning API enables instant server-side trading on Pump.fun — one HTTP call = done. You trade without managing RPCs, signing locally, or broadcasting yourself.

One Call = Done

With Lightning, you send a single HTTP request. The server builds the transaction, signs it with your wallet. No client-side signing required.


Step 1: Generate a Lightning Wallet & API Key​

tip

If you would like to sign and send transactions with your own wallet instead of a Lightning wallet, use the Local Transaction API.

Click the button below to generate a new Solana wallet and linked API key. You will then be able to use your API key to trade with the funds in the linked wallet.


Or import your own private key:

READ ALL THE FOLLOWING BEFORE PROCEEDING:

  • SECURELY SAVE YOUR PRIVATE KEY: You can withdraw funds by adding your private key to any Solana wallet software such as Phantom. Anyone with access to your private key can do the same.
  • SECURELY SAVE YOUR API KEY: Anyone with your API key can trade using the funds in your wallet.
  • Your keys will disappear upon navigating away from this page OR clicking the button again to create a new API key and wallet.
  • KEYS CANNOT BE RECOVERED IF LOST.

Programmatic Wallet Creation​

You can also create wallets via the API:

const response = await fetch('https://pumpdev.io/api/wallet/create', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ label: 'my-trading-bot' }) // label is optional
});
const { apiKey, publicKey, privateKey } = await response.json();
console.log('API Key:', apiKey);
console.log('Public Key:', publicKey);

Programmatic Wallet Import​

const response = await fetch('https://pumpdev.io/api/wallet/import', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
privateKey: 'YourBase58PrivateKey',
label: 'imported-wallet' // label is optional
})
});
const { apiKey, publicKey } = await response.json();
console.log('API Key:', apiKey);
tip

You may create as many wallets as you like. If you are building a trading service for multiple users, you will probably want to use the API to create a new wallet per user.

Want a Persistent Key Instead of Anonymous Ones?​

Anonymous keys created above keep working forever without an account — but every one of them is a one-off: no usage dashboard, and if you lose the key or private key, it's gone for good. A free PumpDev account fixes both:

  • Create a wallet directly in your account (the API key and private key are still shown only once, but now the account itself survives).
  • Link a key you already created on this page or via the API — paste it in the Lightning API keys card.
  • See usage — trades and subscriptions against your limits, live.
  • List, unlink, or deactivate any key at any time.

→ Create a free account — takes about 30 seconds, no credit card.


Step 2: Fund Your Wallet​

Just send any amount of SOL to the address (public key) of the wallet you created above.

That's it! You can now trade with the funds in your wallet using the API. Continue to the next page to read how.

info

You can transfer SOL from any wallet or exchange. Lightning wallets use standard Solana addresses — no special setup required.


Check Wallet Info​

Verify your wallet details at any time:

You can also pass the API key via the X-Api-Key header instead of a query parameter.

const response = await fetch('https://pumpdev.io/api/wallet/info?api-key=YOUR_API_KEY');
const info = await response.json();
console.log('Public Key:', info.publicKey);
console.log('Created At:', info.createdAt);
console.log('Last Used:', info.lastUsedAt);
console.log('Label:', info.label);

Security​

Security MeasureDescription
API key shown onceWhen creating or importing, the API key is returned only in that response. Store it securely — you cannot retrieve it later.
Private key encryptedPrivate keys are encrypted at rest with AES-256-GCM.
HTTPS in productionAll API calls use HTTPS. Never send API keys over unencrypted connections.
Best Practices
  • Store your API key in environment variables, not in source code.
  • Use separate wallets for different operations (e.g., trading vs. token creation).
  • Rotate API keys periodically by creating a new wallet and migrating funds.

Build With AI — Pumpfun Skill​

Skip the boilerplate. Install the Pumpfun Skill into your AI coding assistant and have it scaffold trade/create/bundle/snipe flows against your Lightning wallet:

mkdir -p .claude/skills && cd .claude/skills && \
curl -fsSL https://pumpdev.io/skill/pumpdev.zip -o pumpdev.zip && \
unzip pumpdev.zip && rm pumpdev.zip

Then ask your AI: "use my PUMPDEV_API_KEY and build a sniper that buys 0.05 SOL of every new launch whose symbol ends in pump". The skill runs the discovery questions, picks the right endpoint, and writes the code.

→ Skill — Full install guide, example prompts, and what's inside.


Next Steps​