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

# Universal Token Transfers

# All Token Transfers

Leveraging our [open source functions](https://docs.indexing.co/guide/transformations/helpers#functions), you can readily get token transfers across any of the [networks](/networks) we support.

Here's how simple it is to get all token transfers:

```javascript theme={null}
function tokenTransfers(block) {
  return templates.tokenTransfers(block);
}
```

This will return transfers matching the following type:

```typescript theme={null}
type NetworkTransfer = {
  amount: number | bigint;
  blockNumber: number;
  from: string;
  index?: string;
  timestamp: string;
  to: string;
  token?: string;
  tokenId?: string;
  tokenType: 'NATIVE' | 'TOKEN' | 'NFT';
  transactionGasFee: bigint;
  transactionHash: string;
};
```

Here's a sample request for testing this against Polygon:

```bash theme={null}
curl "https://app.indexing.co/dw/transformations/test?network=polygon&beat=74046461" \
  -H 'X-API-KEY: <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "function(block) { return templates.tokenTransfers(block); }"
  }' | jq
```

# Filtered Transfers

Notably, the above output includes a `tokenType` key. You can leverage this to focus in on particular token types that might be useful.

For instance, this is how you could fetch only NFT transfers:

```javascript theme={null}
function tokenTransfers(block) {
  return templates
    .tokenTransfers(block)
    .filter(txfer => txfer.tokenType === 'NFT');
}
```
