Broadcast a transaction

Broadcast a signed transaction with pre-checks and optional idempotency (write class).

# Broadcast a transaction

`POST https://api.rarebl.com/open/tx/broadcast`

Sends a fully signed transaction to the network through Rarebl's own nodes, with pre-checks and an idempotency key.

**Rate class:** write (6 per minute, burst 3, 300 per day, per IP). **Available since:** Open API v2.

**Warning.** Try It! really broadcasts the transaction you paste here to the live network. It cannot be undone.

## Request

Send a JSON body (`Content-Type: application/json`). No API key is needed: `X-API-KEY` is reserved and ignored.

Example: `curl -X POST "https://api.rarebl.com/open/tx/broadcast" -H "Content-Type: application/json" -H "Idempotency-Key: payout-2026-11-14-0001" -d '{"chain":"dash","hex":"0200000001139f6185036ea872d9e52bd7424ba9165f31b6479556b021fe4b8f3f42e8087a010000006a473044022047ac8e878352d3ebbde1c94ce3a10d057c24175747116f8288e5d794d12d482f0220217f36a485cae903c713331d877c1f64677e3622ad4010726870540656fe9dcb012103ad1d8e89212f0b92c74d23bb710c00662ad1470198ac48c43f7d6f93a2a26873ffffffff0240420f00000000001976a91454072845a9ca039a5b585f5fd994d88d38feb31c88ac189f3419000000001976a9147fb0a45f00c25ff1cb67753221326c7c420b8b2388ac00000000"}'`

## Headers

| Header | Required | Description |
| --- | --- | --- |
| `Idempotency-Key` | No | Optional. The same key, or the same txid, within 24 hours returns the first result instead of broadcasting twice. Example: `payout-2026-11-14-0001`. |

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `chain` | string | Yes | The chain. One of: btc, ltc, bch, dash, eth, tron. |
| `hex` | string | No | The signed transaction hex (all chains; for TRON the signed protobuf hex). |
| `tx` | object | No | TRON only: the signed transaction JSON (use `tx` or `hex`). |
| `maxFeeRate` | string | No | UTXO: lowers the node's `maxfeerate` guard, in sat/vB. It can never raise it. |

## Responses

### API200 (HTTP 200): OK

Accepted by the node.

```json
{
  "status": 1,
  "code": "API200",
  "message": "success",
  "data": {
    "txid": "8235cfafa0ef70d4a5135331c6889a7c15780b7aeb3bc20721571c2a4b51ffa7",
    "accepted": true,
    "alreadyKnown": false
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data.txid` | string | The transaction id. |
| `data.accepted` | boolean | true when the node accepted it. |
| `data.alreadyKnown` | boolean | true when the node or an earlier idempotent call already had it. |

### API422 (HTTP 422): Unprocessable Entity

The node refused it. `data.detail` carries the node's message, for example `min relay fee not met`.

```json
{
  "status": 0,
  "code": "API422",
  "message": "The node rejected the transaction.",
  "data": {
    "reason": "node_rejected",
    "detail": "min relay fee not met"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API422 (HTTP 422): Unprocessable Entity

One of the inputs was spent by another transaction.

```json
{
  "status": 0,
  "code": "API422",
  "message": "An input is already spent.",
  "data": {
    "reason": "inputs_spent"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API422 (HTTP 422): Unprocessable Entity

ETH: the nonce must be at least the pending nonce.

```json
{
  "status": 0,
  "code": "API422",
  "message": "The nonce is lower than the pending nonce.",
  "data": {
    "reason": "nonce_too_low"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API422 (HTTP 422): Unprocessable Entity

ETH: the transaction is signed for another chain id.

```json
{
  "status": 0,
  "code": "API422",
  "message": "The chain id is not 1.",
  "data": {
    "reason": "chain_id_mismatch"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API422 (HTTP 422): Unprocessable Entity

TRON: the transaction expiration has passed.

```json
{
  "status": 0,
  "code": "API422",
  "message": "The transaction has expired.",
  "data": {
    "reason": "tx_expired"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API422 (HTTP 422): Unprocessable Entity

Size caps: 100 kB (UTXO), 128 kB (ETH), 64 kB (TRON).

```json
{
  "status": 0,
  "code": "API422",
  "message": "The transaction is too large.",
  "data": {
    "reason": "tx_too_large"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API400 (HTTP 400): Bad Request

A parameter is missing or malformed. `data.param` names it (here `hex`).

```json
{
  "status": 0,
  "code": "API400",
  "message": "hex is required.",
  "data": {
    "param": "hex"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API429 (HTTP 429): Too Many Requests

Rate limited (write class: 6 per minute, burst 3, 300 per day, per IP). A `Retry-After` header says how long to wait, in seconds.

```json
{
  "status": 0,
  "code": "API429",
  "message": "Too many requests. Please retry shortly.",
  "data": null,
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API502 (HTTP 502): Bad Gateway

The node is unavailable, still syncing or timed out. Retry later with a short back-off.

```json
{
  "status": 0,
  "code": "API502",
  "message": "The node is unavailable or timed out. Please try again.",
  "data": null,
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

## Notes

- Pre-checks: UTXO runs `testmempoolaccept` first, keeping the node's default `maxfeerate`. ETH requires chainId 1 and a nonce at least the pending nonce. TRON requires a signature and a transaction that has not expired.
- Size caps: 100 kB (UTXO), 128 kB (ETH), 64 kB (TRON).
- Write class: 6 per minute, burst 3, 300 per day, per IP. Use `Idempotency-Key` so a retry cannot broadcast twice.
- Rejections are `API422` with a `data.reason` (see [Responses & codes](https://docs.rarebl.com/responses-and-codes)) and, for `node_rejected`, a `data.detail`.

Back to the Rarebl AI documentation index