# transactionReceipts - EVM Data Stream

> Stream raw EVM transaction receipts filtered by status, sender, recipient, and type. Complete guide on how to use the transactionReceipts topic in GetBlock EVM Data Stream documentation.

The `transactionReceipts` topic sends one notification per matching mined transaction, carrying its **original receipt**, exactly as `eth_getTransactionReceipt` returns it. Use it to learn whether transactions succeeded, what they cost, which contracts they created, and which logs they emitted.

> **Warning:** **WebSocket-only topic.** Subscribe with [`getblock_subscribe`](/evm-data-stream/api-reference/getblock_subscribe-evm-data-stream/) on any [network endpoint](/evm-data-stream/api-reference/#endpoints).

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `filters.status` | string | No | `success` or `failure`. |
| `filters.from` | string | No | Transaction sender. |
| `filters.to` | string | No | Transaction recipient. |
| `filters.contractCreated` | boolean | No | `true` for contract-creation receipts only; `false` for ordinary transactions only. |
| `filters.transactionType` | string | No | EIP-2718 transaction type as a hex quantity: `"0x0"` legacy, `"0x1"` access list, `"0x2"` EIP-1559, `"0x3"` blob, `"0x4"` EIP-7702. |

## Request Example

#### wscat

```bash
# WebSocket-only. Connect first:
wscat -c 'wss://stream.eu-central-1.getblock.io/v1/eth-mainnet/stream' -H 'Authorization: Bearer <API-KEY>'

# Then send:
{"jsonrpc":"2.0","id":1,"method":"getblock_subscribe","params":[{"topic":"transactionReceipts","filters":{"from":"0x965e7b3578110a781b86b1cca9b2d7824b62a678","status":"failure"}}]}
```

#### JavaScript

```javascript
// npm install ws
import WebSocket from 'ws';

const ws = new WebSocket('wss://stream.eu-central-1.getblock.io/v1/eth-mainnet/stream', {
  headers: { Authorization: 'Bearer <API-KEY>' }
});

ws.on('open', () => {
  ws.send(JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getblock_subscribe',
    params: [{
      topic: 'transactionReceipts',
      filters: {
        from: '0x965e7b3578110a781b86b1cca9b2d7824b62a678',
        status: 'failure'
      }
    }]
  }));
});

ws.on('message', (raw) => {
  const msg = JSON.parse(raw);

  // First reply is the subscription ID (or an error)
  if (msg.id !== undefined) {
    console.log(msg.error ?? `Subscribed: ${msg.result}`);
    return;
  }

  const { removed, data } = msg.params.result;
  const ok = data.status === '0x1';
  console.log(removed ? 'REVERTED' : ok ? 'success' : 'FAILED', data.transactionHash, 'gas', parseInt(data.gasUsed, 16));
});
```

#### Python

```python
# pip install "websockets>=14"
import asyncio, json, websockets

URL = "wss://stream.eu-central-1.getblock.io/v1/eth-mainnet/stream"
HEADERS = {"Authorization": "Bearer <API-KEY>"}

async def main():
    # ping_interval=None: the server sends its own keepalive pings (see Connection keepalive)
    async with websockets.connect(URL, additional_headers=HEADERS, ping_interval=None) as ws:
        await ws.send(json.dumps({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "getblock_subscribe",
            "params": [{
                "topic": "transactionReceipts",
                "filters": {
                    "from": "0x965e7b3578110a781b86b1cca9b2d7824b62a678",
                    "status": "failure"
                }
            }]
        }))

        async for message in ws:
            msg = json.loads(message)

            # First reply is the subscription ID (or an error)
            if "id" in msg:
                print(msg.get("error") or f"Subscribed: {msg['result']}")
                continue

            event = msg["params"]["result"]
            removed, data = event["removed"], event["data"]
            ok = data['status'] == '0x1'
            print('REVERTED' if removed else 'success' if ok else 'FAILED', data['transactionHash'], 'gas', int(data['gasUsed'], 16))

asyncio.run(main())
```

## Response Example

The first reply is the subscription ID:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x9247e050d6cf2adba09143092ee169a9"
}
```

Every later message is an event notification (a failed transaction):

```json
{
  "jsonrpc": "2.0",
  "method": "getblock_subscribe",
  "params": {
    "subscription": "0x9247e050d6cf2adba09143092ee169a9",
    "result": {
      "eventId": "eth:mainnet:receipts:0x19ddc6864bd5ec1cdbd493e3d3653b529d79293a677…",
      "removed": false,
      "revision": 116876401,
      "data": {
        "blockHash": "0x19ddc6864bd5ec1cdbd493e3d3653b529d79293a6773517018153cdff6ac0be2",
        "blockNumber": "0x18d1e1e",
        "contractAddress": null,
        "cumulativeGasUsed": "0x52a2e2",
        "effectiveGasPrice": "0x19a412a0",
        "from": "0x965e7b3578110a781b86b1cca9b2d7824b62a678",
        "gasUsed": "0x7aa8",
        "logs": [],
        "logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000…",
        "status": "0x0",
        "to": "0xe84ed58fe56169acca155867ab186a30a4a2e731",
        "transactionHash": "0xa5e02c3cdc33428d01de9cf5acc0c43795b5f34ac34d918d07a363e8d45a6bdc",
        "transactionIndex": "0x5a",
        "type": "0x2"
      }
    }
  }
}
```

## Response Parameters

The `result` object contains the event envelope and the payload in `data`.

| Field | Type | Description |
| --- | --- | --- |
| `eventId` | string | Stable event identifier. A reorg correction reuses it. |
| `removed` | boolean | `true` when a reorg removed this previously delivered event. |
| `revision` | number | Event version. For one `eventId`, a greater revision is newer. |
| `data` | object | The receipt, in the same shape as `eth_getTransactionReceipt`. |
| `data.transactionHash` | string | Transaction hash. |
| `data.transactionIndex` | string | Transaction's position in the block, hex-encoded. |
| `data.blockHash` | string | Block hash. |
| `data.blockNumber` | string | Block number, hex-encoded. |
| `data.from` | string | Sender. |
| `data.to` | string | Recipient. `null` for contract creation. |
| `data.contractAddress` | string | Address of the created contract, or `null`. |
| `data.status` | string | `0x1` for success, `0x0` for failure (reverted). |
| `data.type` | string | EIP-2718 transaction type, hex-encoded. |
| `data.gasUsed` | string | Gas used by this transaction, hex-encoded. |
| `data.cumulativeGasUsed` | string | Gas used in the block up to and including this transaction, hex-encoded. |
| `data.effectiveGasPrice` | string | Price paid per gas in wei, hex-encoded. Fee = `gasUsed × effectiveGasPrice`. |
| `data.logs` | array | Logs emitted by the transaction, each in the [`logs`](/evm-data-stream/api-reference/logs-evm-data-stream/#response-parameters) shape. |
| `data.logsBloom` | string | Bloom filter for the receipt's logs. |

Network-specific receipt fields, such as `blobGasUsed` on blob transactions or L1 fee fields on rollups, are passed through unchanged.

## Use Cases

* Confirming that a submitted transaction succeeded or failed, without polling
* Alerting on failed transactions from your hot wallets
* Detecting new contract deployments (`contractCreated: true`)
* Gas-cost accounting per transaction

## Error Handling

| Code | Message | Cause |
| --- | --- | --- |
| `-32602` | `invalid status "…": must be success or failure` | `status` has an unsupported value. Note it is `failure` here, but `failed` on the trace topics. |
| `-32602` | `… cannot unmarshal hex string without 0x prefix into Go struct field .filters.transactionType …` | `transactionType` was sent as a decimal string. Use `"0x2"`, not `"2"`. |
| `-32602` | `invalid from: invalid EVM address "…"` | `from` is not a 20-byte hex address. |
| `-32602` | `invalid to: invalid EVM address "…"` | `to` is not a 20-byte hex address. |
| `-32602` | `invalid transactionReceipts request: json: unknown field "…"` | The request has a field this topic does not accept. |
| `-32001` | `subscription limit exceeded` | You already have 15 active or pending subscriptions. |
