Send Bundle
1 to 4 transactions that land together or not at all
sendBundle sends up to four signed transactions as one bundle. They are executed in the order given, and either all of them land or none does. A bundle that would fail never lands and pays nothing: no fee, no priority fee, no tip.
Request
POST /api/v1/sendBundle
Content-Type: application/json
api-x-token: YOUR_API_KEY{
"jsonrpc": "2.0",
"id": 1,
"method": "sendBundle",
"params": [
["<signed tx 1>", "<signed tx 2>"],
{ "encoding": "base64" }
]
}| Parameter | Description |
|---|---|
params[0] | 1 to 4 signed transactions, in execution order (see below) |
params[1].encoding | base58 (default) or base64 |
params[1].revertProtection | true (default) or false; see Revert protection |
Each transaction is the signed, serialized transaction (the bytes of transaction.serialize()) encoded as a base58 or base64 string: a JSON body cannot carry raw bytes. To send a bundle as raw bytes, use QUIC.
The request has the same shape as the sendBundle of other block-engine APIs, so existing clients work by changing the URL. Other members of params[1] (such as mevProtect) are accepted and ignored.
Revert protection
| Bundle | revertProtection: true (default) | revertProtection: false |
|---|---|---|
| 1 transaction | Sent only as a bundle: if it would fail, it never lands and pays nothing | Sent the usual way: SWQoS lanes, plus a bundle when your plan includes bundles, like route=all. Lands in more slots, but a failure pays its fees |
| 2 to 4 transactions | Always a bundle, with revert protection | Always a bundle, with revert protection |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "3f1c0b5e9a..."
}result is the bundle id: the hex SHA-256 of the transactions’ first signatures, in order. Track landing by the signatures of your transactions.
Rules
- Plan: bundles are included in Base, Plus and Pro. On Free the request is refused with
403. - Tip: the tips your transactions pay to Raiden tip addresses are added up, and the total must reach your plan’s minimum tip. One tip transfer in any of the transactions is enough.
- Bundles per second: a bundle counts once against your plan’s bundles per second (Base 5, Plus 15, Pro 25), whatever its size.
- TPS: each transaction in the bundle counts against your TPS.
- Size: each transaction is at most 1232 bytes (legacy / v0) or 4096 bytes (Transaction v1).
If any rule is not met the whole bundle is refused and nothing is sent.
A bundle can only land in the slots of leaders that take bundles, and it competes on its tip. For a single transaction you can also use sendTransaction with route=bundle.
Errors
| HTTP | JSON-RPC code | Message |
|---|---|---|
| 400 | -32700 | Parse error |
| 400 | -32602 | a bundle has 1 to 4 transactions |
| 400 | -32602 | encoding must be base58 or base64 |
| 400 | -32602 | transaction N is not valid base58 (or base64) |
| 400 | -32602 | revertProtection must be true or false |
| 400 | -32602 | Invalid transaction, or tips below the minimum |
| 200 | -32000 | Invalid or missing API key |
| 403 | -32003 | Bundles are not included in this account’s plan |
| 429 | -32005 | Rate limit or bundle rate limit exceeded |
| 500 | -32005 | Queue full — retry the request |
Examples
cURL
curl -X POST http://fra.bolt.raiden.wtf/api/v1/sendBundle \
-H "Content-Type: application/json" \
-H "api-x-token: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"sendBundle","params":[["<base64 tx 1>","<base64 tx 2>"],{"encoding":"base64"}]}'