# `getAllTransactions`

Returns a list of transactions for a given Safe account, with a different structure depending on the transaction type.

## Usage


<Tabs items={['example.ts', 'setup.ts']}>
  <Tabs.Tab>
    ```typescript
    import { AllTransactionsOptions } from '@safe-global/api-kit'
    import { apiKit } from './setup.ts'

    const safeAddress = '0x...'

    const options: AllTransactionsOptions = {
      limit: 10, // Optional: Maximum number of results to return per page
      offset: 0  // Optional: Initial index from which to return the results
    }

    const allTxs = await apiKit.getAllTransactions(
      safeAddress,
      options // Optional
    )
    ```

  </Tabs.Tab>
  <Tabs.Tab>
    ```typescript
    import SafeApiKit from '@safe-global/api-kit'

    // How to get an Api key => http://docs.safe.global/core-api/how-to-use-api-keys
    export const apiKit = new SafeApiKit({
      chainId: 1n, // Mainnet
      apiKey: 'YOUR_API_KEY'
    })
    ```

  </Tabs.Tab>
</Tabs>


## Returns

`Promise<AllTransactionsListResponse>`

The list of transactions.

## Parameters

### `safeAddress`

- **Type:** `string`

The Safe address.

```typescript
const allTxs = await apiKit.getAllTransactions('0x...')
```

### `options.limit` (Optional)

- **Type:** `number`

Maximum number of results to return per page.

```typescript focus=2
const allTxs = await apiKit.getAllTransactions(safeAddress, {
  limit: 10
})
```

### `options.offset` (Optional)

- **Type:** `number`

Initial index from which to return the results.

```typescript focus=2
const allTxs = await apiKit.getAllTransactions(safeAddress, {
  offset: 20
})
```
