> ## 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.

# Outputs

> Subscribe to Fuel transaction output data with addOutput() — filter by asset ID, owner, and output type.

#### `addOutput(options)`

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

```typescript theme={"system"}
{
  // data requests
  type?: OutputType[]

  // related data retrieval
  transaction?: boolean

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

Data requests:

* `type` sets the type of the output. Output type has the following options: `'CoinOutput' | 'ContractOutput' | 'ChangeOutput' | 'VariableOutput' | 'ContractCreated'`. Leave it undefined to subscribe to all outputs.

Enabling the `transaction` flag will cause the processor to retrieve transactions where the selected outputs have occurred. The data will be added to the appropriate iterables within the [block data](/en/sdk/squid-sdk/fuel-indexing/fuel-datasource/context-interfaces). You can also call `augmentBlock()` from `@subsquid/fuel-objects` on the block data to populate the convenience reference fields like `output.transaction`.

Note that receipts can also be requested by the other `FuelDataSource` 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/fuel-indexing/fuel-datasource/field-selection) page.

## Examples

Request all outputs with `ChangeOutput` type and include transactions:

```ts theme={"system"}
processor
  .addOutput({
    type: ["ChangeOutput"],
    transaction: true,
  })
  .build();
```
