Skip to main content

Actions

Actions let you combine multiple operations β€” like buy, sell, create, transfer, claimCashback, burn, and more β€” into a single transaction.

Great for:

  • Tokens paired with a tokenized stock, USDC, etc. β€” buy the quote token, then buy the token you want with "100%" of it. One transaction, nothing left over.
  • Volume β€” several buys and sells in one transaction.
  • Wallet cleanup β€” sell everything in one go.

Endpoint​

POST https://api.pumpapi.io

Basic Structure​

{
"actions": [
{
"privateKey": "base58_private_key", // or use "apiKey": "your_api_key" instead β€” generate one at zeroslip.ai/trade-api (πŸ”‘ spoiler)
"action": "buy",
"mint": "token_address",
"amount": 0.1,
"denominatedInQuote": True,
"slippage": 99,
"priorityFee": 0.00002
},
{
"privateKey": "base58_private_key", // or use "apiKey": "your_api_key" instead β€” generate one at zeroslip.ai/trade-api (πŸ”‘ spoiler)
"action": "sell",
"mint": "token_address",
"amount": "100%",
"denominatedInQuote": True,
"slippage": 99,
"priorityFee": 0.00002
}
]
}

Each object in actions follows the same fields as the Trade API.


Priority Fee​

priorityFee accumulates across actions β€” because each action adds complexity to the transaction. A transaction with two swaps is more complex than with one, so it requires a higher fee to land reliably.

Global Priority Fee​

If you want a single priorityFee for the whole transaction, set it above the actions block. Per-action priorityFee values will be ignored.

{
"priorityFee": 0.00002,
"actions": [
{ "action": "buy", ... },
{ "action": "sell", ... }
]
}

Multiple Wallets​

You can use different wallets for different actions. Just set privateKey or apiKey inside each action.

You can also change the transaction signer (the wallet that pays the fee) by setting privateKey or apiKey at the top level:

{
"privateKey": "base58_fee_payer_key", // or use "apiKey": "your_api_key" instead β€” generate one at zeroslip.ai/trade-api (πŸ”‘ spoiler)
"actions": [
{ "privateKey": "wallet_a_key", "action": "buy", ... }, // or use "apiKey": "your_api_key" instead of privateKey
{ "privateKey": "wallet_b_key", "action": "sell", ... } // or use "apiKey": "your_api_key" instead of privateKey
]
}

Solana Transaction Limits​

warning

Solana has a CPI limit of 64 per transaction.

A typical swap uses ~12 CPIs, so one transaction fits around 4–5 swaps, whether they go through the same AMM or different ones.

The transaction size is also capped at 4 KB (roughly 64 accounts).


Actions vs. Jito Bundles​

ActionsJito Bundles
What it doesCombines multiple operations into 1 transactionCombines multiple transactions into 1 bundle
Use caseMulti-step logic in one atomic txAtomic ordering of separate txs

Local Transactions​

Actions also support local (unsigned) transactions β€” just use publicKey instead of privateKey or apiKey, and sign + send the transaction yourself. See the Trade API page for the local logic.


Code Examples​

import requests

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

data = {
"actions": [
{
"privateKey": "base58_private_key", # or use "apiKey": "your_api_key" instead β€” generate one at zeroslip.ai/trade-api (πŸ”‘ spoiler)
"action": "buy",
"mint": "token_address",
"amount": 0.1,
"denominatedInQuote": True,
"slippage": 99,
"priorityFee": 0.00002,
},
{
"privateKey": "base58_private_key", # or use "apiKey": "your_api_key" instead β€” generate one at zeroslip.ai/trade-api (πŸ”‘ spoiler)
"action": "sell",
"mint": "token_address",
"amount": "100%",
"denominatedInQuote": True,
"slippage": 99,
"priorityFee": 0.00002,
}
]
}

response = requests.post(url, json=data)
print(response.json())

Need help? Join our Telegram group.