Skip to main content

Transfer

Use this to send native SOL or SPL tokens to another wallet.

  • If mint is not provided, the API sends native SOL.
  • If mint: "token_address" or "mintRef": "value" is provided, the API sends the specified token instead.
  • You can also pass memo as 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​

FieldDescription
privateKeyBase58 private key of the wallet that will sign the transfer transaction. Not required if you pass apiKey instead.
apiKeyOptional. Not required. Pass it instead of privateKey if you prefer not to send the private key. Generate one on the Trade API page (πŸ”‘ spoiler).
actionMust be "transfer"
toRecipient wallet address. Example: pump22QQQnff5qmAxW7yg6VEKU3C7Mj8C4TDaXJZt9Q
amountAmount to send. You can pass a numeric value such as 0.000001 or a percentage string such as "100%" to transfer the full balance
mintOptional. Token mint address. If omitted, native SOL is sent
mintRefOptional. Temporary token reference for token creations
memoOptional. A memo string that will be visible in Solana explorers

πŸ“¦ Code Examples​

import requests

url = "https://api.pumpapi.io"

data = {
"privateKey": "base58_private_key", # or use "apiKey": "your_api_key" instead β€” generate one at pumpapi.io/trade-api (πŸ”‘ spoiler)
"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())

Need help? Join our Telegram group.