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

# Solana Transactions Indexing

> Subscribe to Solana transaction data with addTransaction() — filter by signer, account, and program ID.

#### `addTransaction(options)`

Get some *or all* transactions on the network. `options` has the following structure:

```typescript theme={"system"}
{
  // data requests
  where?: {
    feePayer?: string[]
  }

  // related data retrieval
  include?: {
    instructions?: boolean
    logs?: boolean
  }

  range?: {
    from: number
    to?: number
  }
}
```

Data requests:

* `feePayer` sets the addresses of the fee payers. Leave it undefined to subscribe to all transactions.

Enabling the `instructions` and/or `logs` flags will cause the processor to retrieve [instructions](/en/sdk/squid-sdk/solana-indexing/sdk/solana-batch/instructions) and [logs](/en/sdk/squid-sdk/solana-indexing/sdk/solana-batch/logs) that occurred as a result of each selected transaction. The data will be added to the appropriate iterables within the [block data](/en/sdk/squid-sdk/solana-indexing/sdk/solana-batch/context-interfaces). You can also call `augmentBlock()` from `@subsquid/solana-objects` on the block data to populate the convenience reference fields like `transaction.logs`.

Note that transactions can also be requested by the other `SolanaDataSource` methods as related data.

Selection of the exact fields to be retrieved for each transaction and the optional related data items is done with the `setFields()` method documented on the [Field selection](/en/sdk/squid-sdk/solana-indexing/sdk/solana-batch/field-selection) page.

## Examples

Request all transactions with fee payer `rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ` and include logs and instructions:

```ts theme={"system"}
processor
  .addTransaction({
    where: {
      feePayer: ['rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ'],
    },
    include: {
      logs: true,
      instructions: true
    }
  })
  .build()
```
