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

# Bundles

> Send up to four transactions that land together, in order, or not at all.

A bundle is a list of transactions that land together, in the order given, in the same block, or not at all. Send one
with `sendBundle`.

```bash theme={null}
curl -s https://sender.tracefall.xyz \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendBundle",
    "params": [["<base64 transaction 1>", "<base64 transaction 2>"], {"encoding": "base64"}]
  }'
```

```json theme={null}
{"jsonrpc": "2.0", "id": 1, "result": "<bundle id>"}
```

* **1 to 4 transactions**, each fully signed, at `POST /`, `POST /api/v1/bundles`, or in a WebSocket JSON-RPC text
  frame. No transactions is refused with `bad_request`; a fifth is refused with `bundle_too_large`. As with
  `sendTransaction`, `encoding` defaults to `base58` (for members up to 1,232 bytes); send `base64`, which is required
  for larger v1 transactions. A request body may be up to 64 KiB.
* **Checked in order.** Each transaction is validated as a sent transaction. When a member fails validation, the whole
  bundle is refused with that member's `code` and its zero-based `memberIndex` (`error.data.memberIndex` in JSON-RPC,
  `error.memberIndex` in REST).
* **One tip for the bundle.** The tips to our [tip accounts](https://docs.tracefall.xyz/tip-accounts.md) in all of its transactions together must
  reach the minimum, 0.0001 SOL. Any of them may carry it, and a transaction may tip nothing. Pay it to one tip
  account: the builders are paid from one account alone, so a tip spread over several bids less.
* **Bundle paths only.** A bundle goes to block builders, Jito's block engine among them. It is never sent as plain
  copies.
* **All or nothing, in the normal case.** If any of your transactions fails, the bundle does not land, and its tip is
  not paid. In rare cases, when a leader's block is skipped and its transactions are sent again one by one, a
  transaction can land outside its bundle: keep your own checks of price and state in each transaction.
* **Ours goes last.** We add one transaction of ours as the last one in the bundle. It pays the block builders, and it
  runs after all of yours.
* **No durable nonce first.** The first transaction must use a recent blockhash. A bundle whose first transaction
  uses a durable nonce is refused with `nonce_not_bundled` (`memberIndex: 0`). Later transactions in the bundle may use
  a durable nonce.
* **Duplicates and rates.** A resend of the same bundle, or a bundle containing any transaction already taken alone or
  in another bundle, is answered `duplicate` and is not sent again. A bundle counts one send per transaction in it
  against your rate ([Limits](https://docs.tracefall.xyz/limits.md#rates)).
* **The result is the bundle id**, computed as Jito computes one, over your transactions alone: the SHA-256, in
  lowercase hex, of their first signatures in base58, joined by `,`. It identifies the bundle to us only. We append
  our transaction to every bundle we forward, so no block engine knows it by this id, and Jito's `getBundleStatuses`
  cannot find it.
* **When no bundle can carry it**, it is refused with `bundle_unavailable`, never accepted with nowhere to go
  ([Errors](https://docs.tracefall.xyz/errors.md)).

To see whether a bundle landed, confirm the signature of any of its transactions on your RPC node.

## REST

`POST /v1/bundles` takes the same bundle in JSON, its transactions in base64:

```bash theme={null}
curl -s https://sender.tracefall.xyz/v1/bundles \
  -H 'Content-Type: application/json' \
  -d '{"transactions": ["<base64 transaction 1>", "<base64 transaction 2>"]}'
```

```json theme={null}
{"bundleId": "<bundle id>", "status": "accepted"}
```

`status` is `accepted`, or `duplicate` for a resend. A refusal answers an HTTP status and an `error` object, as for one
transaction ([Errors](https://docs.tracefall.xyz/errors.md)). A bundle's request may be up to 64 KiB.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.