# View Earned Fees

## Details

Get an overview of all fees you have earned as a broker so far.

For accounts with an affiliate, the values are the commission credited to your affiliate account, from its `asset_balances`. The BaaS [Operating Fee](https://docs.chainflip-broker.io/resources/pricing/) is separate and not part of that balance. Legacy accounts without an affiliate report the broker account's `earned_fees` instead, which may include the operating fee. This does not transfer or show fees held in your separate old broker account.

## API Endpoint

* [`/fees`](https://chainflip-broker.io/docs/ui/index.html#tag/Fees/operation/getEarnedFees) - Get earned broker fees.

## Example

> **Tip**
>
> Want to test first? Change the API base URL to `https://perseverance.chainflip-broker.io`. The [Testing](https://docs.chainflip-broker.io/environments/testing/) environment swaps testnet assets with no real value.
>
> Swap the API key in the examples for your own [production API key](https://chainflip-broker.io/register). Testing requires a separate [testnet API key](https://perseverance.chainflip-broker.io/register).

```bash
curl --location 'https://chainflip-broker.io/fees?apiKey=87517a91d5f34dbabfc1e410946a3a3c'
```

```json
{
  "earnedFees": {
    "eth.eth": 0,
    "flip.eth": 0,
    "usdc.eth": 50.086951,
    "usdt.eth": 0,
    "dot.hub": 0,
    "btc.btc": 0,
    "eth.arb": 0,
    "usdc.arb": 0,
    "sol.sol": 0,
    "usdc.sol": 0
  },
  "earnedFeesNative": {
    "eth.eth": "0",
    "flip.eth": "0",
    "usdc.eth": "50086951",
    "usdt.eth": "0",
    "dot.hub": "0",
    "btc.btc": "0",
    "eth.arb": "0",
    "usdc.arb": "0",
    "sol.sol": "0",
    "usdc.sol": "0"
  }
}
```
