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

# eth_subscribe newFlashblockTransactions | Base

> Base API method that streams individual transactions as they are pre-confirmed into Flashblocks, delivering events approximately every 200ms.

Base API method that streams individual transactions as they are pre-confirmed into a Flashblock. Events arrive approximately every 200ms—one item per WebSocket message.

This subscription type is exclusive to Flashblocks-enabled endpoints. See [Flashblocks on Base](/docs/flashblocks-on-base) for background on how Flashblocks work.

<Check>
  ### Get your own node endpoint today

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `string` — the subscription type, `newFlashblockTransactions` in this case.
* `boolean` — (optional) when `true`, includes complete transaction objects and associated logs in each notification. Defaults to `false` (minimal data only).

## Response

* `subscription` — the subscription ID.

Each notification delivers pre-confirmed transaction data. When `full` is `false` (default), the `result` is the transaction hash as a hex string. When `full` is `true`, the `result` is a complete transaction object with the following fields:

* `type` — the transaction type (`0x0` Legacy, `0x1` Access List, `0x2` EIP-1559, `0x7e` Deposit).
* `chainId` — the chain ID (hex).
* `nonce` — the sender's nonce (hex).
* `from` — the sender address.
* `to` — the recipient address.
* `value` — the ether value transferred (hex).
* `input` — the call data.
* `gas` — the gas limit (hex).
* `maxFeePerGas` — the maximum fee per gas, EIP-1559 (hex).
* `maxPriorityFeePerGas` — the maximum priority fee per gas, EIP-1559 (hex).
* `gasPrice` — the effective gas price (hex).
* `hash` — the transaction hash.
* `blockHash` — `null` because the transaction is pre-confirmed (not yet in a finalized block).
* `blockNumber` — the pending block number (hex).
* `transactionIndex` — the transaction's index position in the block (hex).
* `accessList` — the EIP-2930 access list (if applicable).
* `r`, `s`, `v`, `yParity` — signature values.
* `logs` — array of event logs emitted by the transaction. Each log includes `address`, `topics`, `data`, `blockHash`, `blockNumber`, `blockTimestamp`, `transactionHash`, `transactionIndex`, `logIndex`, and `removed`.

## `eth_subscribe("newFlashblockTransactions")` code examples

<Info>
  Note that subscriptions require a WebSocket connection and [WebSocket cat](https://www.npmjs.com/package/wscat) for you to use this method in the console.

  Install WebSocket cat with:

  `npm install -g wscat`
</Info>

### Minimal data (default)

<CodeGroup>
  ```shell wscat theme={"system"}
  $ wscat -c YOUR_CHAINSTACK_WEBSOCKET_ENDPOINT
  # Wait for the connection to be established

  Connected (press CTRL+C to quit)

  > {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newFlashblockTransactions"]}
  ```

  ```javascript javascript theme={"system"}
  const WebSocket = require('ws');

  const webSocket = new WebSocket('CHAINSTACK_WSS_URL');

  async function subscribeToFlashblockTransactions() {

    const request = {
      id: 1,
      jsonrpc: '2.0',
      method: 'eth_subscribe',
      params: ['newFlashblockTransactions'],
    };

    const onOpen = (event) => {
      webSocket.send(JSON.stringify(request));
    };

    const onMessage = (event) => {
      const response = JSON.parse(event.data);
      console.log(response);
    };

    try {
      webSocket.addEventListener('open', onOpen);
      webSocket.addEventListener('message', onMessage);
    } catch (error) {
      console.error(error);
    }
  }

  subscribeToFlashblockTransactions();
  ```
</CodeGroup>

### Full transaction objects and logs

<CodeGroup>
  ```shell wscat theme={"system"}
  $ wscat -c YOUR_CHAINSTACK_WEBSOCKET_ENDPOINT
  # Wait for the connection to be established

  Connected (press CTRL+C to quit)

  > {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newFlashblockTransactions",true]}
  ```

  ```javascript javascript theme={"system"}
  const WebSocket = require('ws');

  const webSocket = new WebSocket('CHAINSTACK_WSS_URL');

  async function subscribeToFlashblockTransactionsFull() {

    const request = {
      id: 1,
      jsonrpc: '2.0',
      method: 'eth_subscribe',
      params: ['newFlashblockTransactions', true],
    };

    const onOpen = (event) => {
      webSocket.send(JSON.stringify(request));
    };

    const onMessage = (event) => {
      const response = JSON.parse(event.data);
      console.log(response);
    };

    try {
      webSocket.addEventListener('open', onOpen);
      webSocket.addEventListener('message', onMessage);
    } catch (error) {
      console.error(error);
    }
  }

  subscribeToFlashblockTransactionsFull();
  ```
</CodeGroup>

This will generate a continuous stream of data displaying pre-confirmed transactions as they are included in Flashblocks.

<Note>
  If your handler performs heavy processing per event, throttle or debounce it to avoid blocking the WebSocket connection.
</Note>

Use [eth\_unsubscribe | Base](/reference/base-unsubscribe) to remove the subscription.

## Use case

The `eth_subscribe("newFlashblockTransactions")` method is useful in scenarios where sub-second transaction visibility matters:

* Latency-sensitive trading. DEX aggregators and MEV searchers can observe individual transactions as soon as the Base sequencer pre-confirms them—up to \~1.8 seconds before the full block seals—enabling faster reaction to on-chain events.

* Real-time transaction monitoring. Wallet providers and block explorers can show users their transaction status within \~200ms of submission instead of waiting for the next 2-second block, significantly improving perceived confirmation speed.

* Event-driven automation. Applications that trigger downstream actions on specific transactions—such as bridge relayers or liquidation bots—can act on pre-confirmed data instead of polling `eth_getBlockByNumber` with `pending`.
