# Fee rules

> Published fee and levy schedules with the dates each one applied, so a backtest can charge every trade the rule in force on its trade date.

Source: https://getmarkethistory.com/docs/fee-rules

A fee schedule changes over time. A backtest of 2023 that charges today's rates is wrong by the
difference. `/v1/fee-rules` publishes the schedules as dated records: what the rule was, and from
when to when it applied. Ask for a date and you get the rules in force that day.

## What it is, and what it is not

Each row is a **published** schedule: a regulator's levy, a clearing body's fee, or a venue's own
trading fee, with the effective dates the notice, filing or tariff states.

What we do not publish, and you supply:

- **Anything that depends on your account.** Volume tiers, fee-token or staking discounts, rebates,
  market-maker programmes. Venue fees are given for the base tier only, named in `tier`.
- **Your broker's commission and pass-through policy.** A levy charged to a broker may or may not be
  passed on to you, and may be rounded differently.
- **The cost of a trade.** We do not compute one. A row says what is charged and on what (`basis`,
  `side`, `applies_to`, `cap`, `floor`); applying it to your fills is yours.

Coverage is what we could read from a primary source and cite. A dataset or a rule that is not
listed is not known to us, not known to be free.

| Dataset            | Rules                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------------ |
| `stocks/us`        | SEC Section 31 fee from 2021-02-25; FINRA trading activity fee on equity sales from 2022   |
| `options/us`       | SEC Section 31 fee from 2021-02-25; FINRA trading activity fee on option sales from 2022   |
| `futures/ru`       | the Moscow Exchange's fee per contract by contract group, maker and taker, from 2022-07-11 |
| `crypto/spot`      | Binance's base-tier maker and taker fee, as seen on 2026-11-10                             |
| `crypto/perps`     | feed `bybit`: Bybit's base-tier maker and taker fee, as seen on 2026-11-10                 |
| `crypto/dex-perps` | Lighter's default-account maker and taker fee, as seen on 2026-11-10                       |

Scheduled changes are included when the filing states them (the trading activity fee is scheduled
to 2029), so a date in the future answers with the rule announced for it.

## Query

```bash
curl -s "https://getmarkethistory.com/query/v1/fee-rules?dataset=stocks/us&at=2025-05-14" \
  -H "Authorization: Bearer $MH_KEY"
```

| Parameter      | Meaning                                                                                                                                                                               |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dataset`      | A dataset id such as `stocks/us`. Optional: without it, every dataset's rules.                                                                                                        |
| `feed`         | One feed of a dataset that has several (`crypto/perps`: `binance`, `bybit`; the older names `main`, `1s` still work). Returns that feed's rows and the rows that apply to every feed. |
| `at`           | A date (`2025-05-14`) or UTC instant (`2025-05-14T13:30:00Z`): only the rules in force then, never a withdrawn one. Without it, the history.                                          |
| `start`, `end` | The rules whose dates overlap this window, inclusive.                                                                                                                                 |
| `scheme`       | `regulatory_levy`, `clearing_fee`, `venue_fee` or `transaction_tax`.                                                                                                                  |
| `format`       | `jsonl` (default), `csv`, `json`, `parquet` or `arrow`. `mbt1` is bars only.                                                                                                          |

There is no paging: a dataset has tens of rows. An unknown dataset or feed answers as on every
other route (`unknown_dataset`, or a 400 listing the feeds).

## Columns

| Column              | Meaning                                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `dataset`, `feed`   | which data the rule applies to; `feed` is empty when it applies to every feed of the dataset                              |
| `scheme`            | `regulatory_levy`, `clearing_fee`, `venue_fee` or `transaction_tax`                                                       |
| `side`              | who pays: `sell`, `buy`, `any`, `maker` (the resting order) or `taker` (the order that matched it)                        |
| `applies_to`        | which trades or products, in words                                                                                        |
| `rate`              | the charge, an exact decimal string: parse it as a decimal, not a float                                                   |
| `basis`             | what `rate` multiplies: `per_million_notional`, `per_share`, `per_contract` or `fraction_of_notional` (`0.001` is 0.1%)   |
| `currency`          | the charge's currency, and `cap`'s and `floor`'s; empty for a fraction of notional paid in the trade's own quote currency |
| `cap`, `floor`      | the most and the least one charge is, as `applies_to` and `note` say (per trade, per contract); empty when there is none  |
| `tier`              | the account tier a venue rate is for, by the venue's label; empty when the rule has no tiers                              |
| `effective_from`    | the first trade date the rule applies to                                                                                  |
| `effective_to`      | the first trade date it no longer applies to (exclusive); empty while it is in force                                      |
| `precision_of_date` | `exact` or `observed`; see below                                                                                          |
| `origin`            | `official_notice`, `rule_filing`, `tariff_edition` or `archive_snapshot`; see below                                       |
| `label`, `note`     | the rule in words, and what to know about it (how a value was converted, why a row was withdrawn)                         |
| `retracted`         | `true` on a row we withdrew as wrong                                                                                      |

Dates are trade dates in the market's own calendar (New York for the US datasets, Moscow for
`futures/ru`) and compare as 00:00 UTC of that day, so pass `at=` the trade date. A rule given to the
minute is written as a UTC instant.

## A rule that changed

The SEC's Section 31 fee on US covered sales was 27.80 USD per million of sale proceeds, then 0.00
from 14 May 2025, then 20.60 from 4 April 2026. The history (`dataset=stocks/us&scheme=regulatory_levy`,
the rows with `basis` `per_million_notional`):

| `rate`  | `effective_from` | `effective_to` |
| ------- | ---------------- | -------------- |
| `8.00`  | 2023-02-27       | 2024-05-22     |
| `27.80` | 2024-05-22       | 2025-05-14     |
| `0.00`  | 2025-05-14       | 2026-04-04     |
| `20.60` | 2026-04-04       |                |

`at=2025-05-13` returns the 27.80 row, `at=2025-05-14` and `at=2025-05-15` the 0.00 one: the day a
rule takes effect belongs to the new rule. A sale of 50,000 USD on 13 May 2025 carried
50,000 × 27.80 / 1,000,000 = 1.39 USD of the levy before any rounding your broker applies.

## How to read `precision_of_date` and `origin`

- **`exact`**: the dates are those the source states: a regulator's notice, a rule filing's
  schedule, or the edition dates of a tariff. Rows from a filing that sets one rate per calendar year
  start on 1 January, as the filing says.
- **`observed`**: we saw the rule on the venue's own page on `effective_from`. It may have applied
  long before; `effective_from` is the day we can vouch for, not the day it started. All the crypto
  rows are observed today; their history comes later.
- **`origin`** names the kind of document behind the row: `official_notice` (a notice of a rate
  change), `rule_filing` (a filing with its fee schedule), `tariff_edition` (a dated edition of a
  venue's tariff) or `archive_snapshot` (the venue's own fee page or docs on that day).

A row is never edited or deleted once published. When one is wrong we set `retracted` to `true`, say
why in `note`, and add the right row. The history keeps both; `at=` never returns a withdrawn one.

## Price

Free with any API key, whatever the balance: no bars are charged
(`X-Bars-Charged: 0`). Requests still count toward the account's [limits](https://getmarkethistory.com/docs/limits).
