# Referred Metrics

Retrieve referral performance data — which users were referred by an affiliate, how much volume they generated, and how much the referrer earned.

## Referred users for a specific affiliate

Use `getPayoutsByReferrer` to get payout and volume information for each user referred by a specific affiliate:

```typescript
import { Fuul } from '@fuul/sdk';

const results = await Fuul.getPayoutsByReferrer({
  user_identifier: '0x1234...',
  user_identifier_type: 'evm_address',
});
```

The response is an array of records where each key is a referred user's address. Each entry contains:

| Field         | Type   | Description                                                                 |
| ------------- | ------ | --------------------------------------------------------------------------- |
| `volume`      | number | Total volume generated by the referred user (USD)                           |
| `earnings`    | array  | Earnings per currency, each with `currency` (address, chainId) and `amount` |
| `date_joined` | string | When the referred user first converted                                      |

## Referred volume for a set of users

Use `getReferredVolume` to retrieve the referred volume for multiple users at once:

```typescript
import { Fuul } from '@fuul/sdk';

const results = await Fuul.getReferredVolume({
  user_identifiers: ['0x1234...', '0x5678...'],
  identifier_type: 'evm_address',
});
```

## Referred volume leaderboard

To get the full referred volume leaderboard, use the volume leaderboard with `user_type = 'affiliate'`:

{% content-ref url="/pages/DzzfdNeaVZLSZSvN0K8Q" %}
[Volume](/developer-guide/getting-leaderboard-data/volume.md)
{% endcontent-ref %}

## API reference

| Feature             | API endpoint                                  | Reference                                                                           |
| ------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------- |
| Payouts by referrer | `GET /v1/payouts/by-referrer`                 | [View](https://fuul.readme.io/reference/getpayoutsbyreferrer)                       |
| Referred volume     | `GET /v1/payouts/leaderboard/referred-volume` | [View](https://fuul.readme.io/reference/get_v1-payouts-leaderboard-referred-volume) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fuul.xyz/developer-guide/referred-metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
