> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fireblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Batched Transactions

> Send SOL to up to 16 recipients, or an SPL token to up to 7, in one atomic Solana transaction. The fee is paid by the source or a Solana Gasless fee payer.

Solana batched transactions send SOL or an SPL token from one vault account to several recipients in a single atomic on-chain transaction. Either every transfer in the batch executes, or the transaction fails and no funds move. By default the source vault account pays the network fee. For SPL token batches, a fee payer vault account can pay it instead through [Solana Gasless](https://developers.fireblocks.com/docs/solana-gasless.md).

New to Solana batched transactions? See [Solana Batched Transactions](https://support.fireblocks.io/hc/en-us/articles/29031304276764) in the Help Center for a product introduction. For batching on other chains, see the [Batched Transactions Overview](https://developers.fireblocks.com/transactions/batched-transactions.md).

## Requirements

* **Balance.** The source vault account holds enough of the asset to cover the sum of all `destinations` amounts. When the source vault account pays its own fee, it also needs SOL for the fee.
* **Policy.** Your Policy allows outgoing transfers from the source vault account.
* **Fee payer (optional).** To have another vault account pay the fee for SPL token batches, set up [Solana Gasless](https://developers.fireblocks.com/docs/solana-gasless.md#step-1-set-the-fee-payer-in-the-console) and fund the fee payer with SOL.

## Send a batched transaction

Submit a transfer with a `destinations` array to [Create a new transaction](https://developers.fireblocks.com/api-reference/transactions/create-a-new-transaction.md). The example sends SOL to three vault accounts. To send an SPL token instead, change `assetId` and keep the batch to 7 recipients or fewer.

> [tab] SDK
>
> ```typescript TypeScript theme={"system"}
> import { TransferPeerPathType } from "@fireblocks/ts-sdk";
>
> await fireblocks.transactions.createTransaction({
>   transactionRequest: {
>     assetId: "SOL_TEST",
>     source: { type: TransferPeerPathType.VaultAccount, id: "<SOURCE_VAULT_ACCOUNT_ID>" },
>     destinations: [
>       { amount: "0.1", destination: { type: TransferPeerPathType.VaultAccount, id: "<VAULT_ACCOUNT_ID_1>" } },
>       { amount: "0.1", destination: { type: TransferPeerPathType.VaultAccount, id: "<VAULT_ACCOUNT_ID_2>" } },
>       { amount: "0.2", destination: { type: TransferPeerPathType.VaultAccount, id: "<VAULT_ACCOUNT_ID_3>" } },
>     ],
>     externalTxId: "<YOUR_UNIQUE_ID>", // Optional - Rejects duplicate batches
>   },
> });
> ```
>
> ```python Python theme={"system"}
> from fireblocks.models.transaction_request import TransactionRequest
> from fireblocks.models.transaction_request_destination import TransactionRequestDestination
> from fireblocks.models.source_transfer_peer_path import SourceTransferPeerPath
> from fireblocks.models.destination_transfer_peer_path import DestinationTransferPeerPath
> from fireblocks.models.transfer_peer_path_type import TransferPeerPathType
>
> def to_vault(vault_account_id, amount):
>     return TransactionRequestDestination(
>         amount=amount,
>         destination=DestinationTransferPeerPath(
>             type=TransferPeerPathType.VAULT_ACCOUNT, id=vault_account_id))
>
> transaction_request = TransactionRequest(
>     asset_id="SOL_TEST",
>     source=SourceTransferPeerPath(
>         type=TransferPeerPathType.VAULT_ACCOUNT,
>         id="<SOURCE_VAULT_ACCOUNT_ID>",
>     ),
>     destinations=[
>         to_vault("<VAULT_ACCOUNT_ID_1>", "0.1"),
>         to_vault("<VAULT_ACCOUNT_ID_2>", "0.1"),
>         to_vault("<VAULT_ACCOUNT_ID_3>", "0.2"),
>     ],
>     external_tx_id="<YOUR_UNIQUE_ID>",  # Optional - Rejects duplicate batches
> )
> fireblocks.transactions.create_transaction(transaction_request=transaction_request).result()
> ```
>
> ```java Java theme={"system"}
> import com.fireblocks.sdk.model.*;
>
> TransactionRequest transactionRequest = new TransactionRequest()
>     .assetId("SOL_TEST")
>     .source(new SourceTransferPeerPath()
>         .type(TransferPeerPathType.VAULT_ACCOUNT)
>         .id("<SOURCE_VAULT_ACCOUNT_ID>"))
>     .externalTxId("<YOUR_UNIQUE_ID>"); // Optional - Rejects duplicate batches
>
> String[][] payouts = {
>     {"<VAULT_ACCOUNT_ID_1>", "0.1"},
>     {"<VAULT_ACCOUNT_ID_2>", "0.1"},
>     {"<VAULT_ACCOUNT_ID_3>", "0.2"},
> };
> for (String[] payout : payouts) {
>     transactionRequest.addDestinationsItem(new TransactionRequestDestination()
>         .amount(payout[1])
>         .destination(new DestinationTransferPeerPath()
>             .type(TransferPeerPathType.VAULT_ACCOUNT)
>             .id(payout[0])));
> }
>
> fireblocks.transactions().createTransaction(transactionRequest, null, null).get();
> ```

> [tab] API
>
> ```http theme={"system"}
> POST /v1/transactions
> ```
>
> ```jsonc theme={"system"}
> {
>   "assetId": "SOL_TEST",
>   "source": { "type": "VAULT_ACCOUNT", "id": "<SOURCE_VAULT_ACCOUNT_ID>" },
>   "destinations": [
>     { "amount": "0.1", "destination": { "type": "VAULT_ACCOUNT", "id": "<VAULT_ACCOUNT_ID_1>" } },
>     { "amount": "0.1", "destination": { "type": "VAULT_ACCOUNT", "id": "<VAULT_ACCOUNT_ID_2>" } },
>     { "amount": "0.2", "destination": { "type": "VAULT_ACCOUNT", "id": "<VAULT_ACCOUNT_ID_3>" } }
>   ],
>   "externalTxId": "<YOUR_UNIQUE_ID>" // Optional - Rejects duplicate batches
> }
> ```
>
> Sign the request with a JWT as described in [Signing a request](https://developers.fireblocks.com/reference/signing-a-request-jwt-structure.md).

> [tab] CLI
>
> ```bash theme={"system"}
> fireblocks transactions create-transaction \
>   --data '{"assetId":"SOL_TEST","source":{"type":"VAULT_ACCOUNT","id":"<SOURCE_VAULT_ACCOUNT_ID>"},"destinations":[{"amount":"0.1","destination":{"type":"VAULT_ACCOUNT","id":"<VAULT_ACCOUNT_ID_1>"}},{"amount":"0.1","destination":{"type":"VAULT_ACCOUNT","id":"<VAULT_ACCOUNT_ID_2>"}},{"amount":"0.2","destination":{"type":"VAULT_ACCOUNT","id":"<VAULT_ACCOUNT_ID_3>"}}],"externalTxId":"<YOUR_UNIQUE_ID>"}' \
>   --dry-run
> ```

**Field notes:**

* `assetId`: SOL or an SPL token. Every recipient receives this asset.
* `destinations`: up to 16 entries for SOL, or up to 7 for an SPL token. Leave out the top-level `amount` and `destination`.
* `useGasless`: for SPL token batches in a workspace with a Solana Gasless fee payer, leave it out to have the fee payer pay, or set `false` to have the source vault account pay. See [Solana Gasless](https://developers.fireblocks.com/docs/solana-gasless.md#step-2-send-a-transaction).
* `externalTxId`: a unique ID of your own. Fireblocks rejects any later transaction with the same value, so a retried batch cannot pay recipients twice.

## Confirm the result

[Get the transaction](https://developers.fireblocks.com/api-reference/transactions/get-a-specific-transaction-by-fireblocks-transaction-id.md) or read the [transaction webhook](https://developers.fireblocks.com/reference/monitoring-transaction-status.md). The response carries one entry per recipient in `destinations`, `destination.type` is `MULTI_DESTINATION`, and `destinationAddress` is empty. When a Solana Gasless fee payer paid, `feePayerInfo` names it, as described in [Solana Gasless](https://developers.fireblocks.com/docs/solana-gasless.md#step-3-confirm-the-fee-payer-paid).

## Limitations

| Limit | Value |
| - | - |
| Recipients per batch | Up to 16 for SOL. Up to 7 for an SPL token. |
| Assets per batch | One. Submit one batch per asset. |
| Console | API only. The Console shows batches in transaction history, labeled **Multi-destination**. |

The recipient limits come from Solana's transaction size limit. Fireblocks expects to raise them after the Solana Alpenglow network upgrade.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| The batch is rejected at creation | Too many recipients for the asset, or a mix of assets | Split into batches of 16 or fewer for SOL, or 7 or fewer for an SPL token. |
| The whole batch failed | One transfer in the batch could not complete | Correct the failing entry and resubmit the batch with a new `externalTxId`. No funds moved. |
| The source vault account paid the fee instead of the fee payer | The batch sends SOL, the request set `useGasless: false`, or no fee payer is set | Solana Gasless covers SPL tokens only. For SPL batches, set the fee payer and leave out `useGasless`. |

## What to read next

* [Batched Transactions Overview](https://developers.fireblocks.com/transactions/batched-transactions.md): compare batching across chains.
* [Solana Gasless](https://developers.fireblocks.com/docs/solana-gasless.md): set up a fee payer and read `feePayerInfo`.
* [Manage withdrawals at scale](https://developers.fireblocks.com/docs/manage-withdrawals-at-scale.md#transaction-batching): when to batch customer withdrawals.
