---
title: "Fetching transactions"
url: "/docs/searchers/fetching-transactions/index.md"
description: "How to fetch transactions stored on Signet's transaction cache."
---
> **The Signet transaction cache:** Signet's transaction cache stores pending transactions, orders and bundles submitted to the network, providing MEV searchers with a stream of opportunities without having to run their orderflow infrastructure. We'll focus on the basics of fetching transactions.

Transactions can be fetched from Signet's transaction cache. Fetching transactions is easy with Signet's Transaction Cache Client. Consult the [Parmigiana Quickstart](/docs/build-on-signet/parmigiana/index.md) for any other RPC endpoints or contract addresses you might need.

## Setup

Add the required Signet crates:

```bash
cargo add signet-tx-cache
```

## Fetching Transactions

Create a `TxCache` client and fetch transactions:

```rust
use signet_tx_cache::TxCache;

let cache = TxCache::parmigiana();

// `get_transactions` takes an optional cursor parameter. 
// Start with `None` to fetch the first page.
let response = cache.get_transactions(None).await?;

for tx in &response.transactions {
    println!("Transaction: {}", tx.tx_hash());
}
```

The cache returns up to 50 transactions per request as a list of [`TxEnvelope`](https://docs.rs/alloy/latest/alloy/consensus/type.TxEnvelope.html) objects. You can use these transactions to simulate, analyze, or build bundles.

Transactions are ordered by their effective gas price, so the highest-paying transactions appear first. They are only syntactically validated, which means transactions might fail during EVM execution.

## Pagination

The cache uses cursor-based pagination. If more transactions are available, the response will include a cursor. This cursor can be passed into the `get_transactions` method to fetch the next page:

```rust
let mut all_transactions = Vec::new();
let mut cursor = None;

loop {
    let response = cache.get_transactions(cursor).await?;
    all_transactions.extend(response.transactions.clone());

    if response.has_more() {
        cursor = response.next_cursor;
    } else {
        break;
    }
}
```