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

# Fee ledger

> Per-fill fee breakdown and fee tier reads.

<Warning>
  **Testnet values — not real money.** The `amount`, `makerBps`,
  `takerBps`, and `feeRateBps` values returned by `/api/me/fees` and
  `/api/me/fees/tier` reflect the ADI-testnet deployment (`chainId
      99999`) and use placeholder rates for partner integration. See
  [Fees](/concepts/trading/fees) for the formula.
</Warning>

## Fee ledger entries

Each trade produces `FeeLedgerEntry` rows — one per role (`maker` /
`taker`). In PS\_QUADRATIC\_V1 the maker role is always 0.

```http theme={null}
GET /api/me/fees?limit=100
X-Api-Key: ps_live_<keyId>_<secret>  # integrators — needs `portfolio:read`
```

Reverse-chronological. Paginate with the opaque [`cursor`](#pagination)
echoed back as `nextCursor`. `limit` is capped at 500 (default 100).

Response:

```json theme={null}
{
  "walletAddress": "0x251e6986…",
  "nextCursor": "eyJjIjoiMjAyNi0wNC0yMlQxMDozMTo0Mi4xMTlaIiwiaWQiOiI4ODEifQ",
  "ledger": [
    {
      "id": "...",
      "tradeId": "...",
      "amount": "0.2496",
      "token": "USDC",
      "role": "taker",
      "createdAt": "2026-04-22T10:31:42.119Z"
    }
  ]
}
```

### Pagination

Keyset-paginated, same scheme as [Trades](/concepts/portfolio/trades#pagination):
each response carries an **opaque** `nextCursor` — pass it back as
`?cursor=<nextCursor>` for the next (older) page. `nextCursor` is `null` only on
the last page. `limit` caps the page (max **500**, default 100). The legacy
`?before=<ISO-8601>` still works but `cursor` is preferred (unique tiebreaker —
a single match writes both the maker and taker fee rows with the same
`createdAt`, so a timestamp-only cursor would skip one at a page edge).

## Fee tier

```http theme={null}
GET /api/me/fees/tier
```

Response:

```json theme={null}
{
  "tier": 1,
  "makerBps": 0,
  "takerBps": 140,
  "rolling30dVolume": "54230.00",
  "nextTierVolume": "100000.00"
}
```

## Reconciling against on-chain

Once on-chain settlement is wired, each fee ledger row gets a
`txHash` field pointing to the settlement transaction.
