> The index of these docs, for agents: https://traktor.fun/llms.txt

# Meta and usage

What the API publishes about itself, and what an account has drawn from it.

The four routes on this page draw no units: two take no key, and the two that take one still count against the account's per-minute budget.

### `GET /v1/plans`

Every public plan and each limit it sets.

- URL: `https://api.traktor.fun/v1/plans`
- Credential: None

Limits:

- Requests, shared with GET /v1/meta/filters: 60 a minute, per IP

```bash cURL
curl -s "https://api.traktor.fun/v1/plans"
```

```ts TypeScript
const response = await fetch("https://api.traktor.fun/v1/plans");
const body = await response.json();
```

```python Python
import requests

response = requests.get(
    "https://api.traktor.fun/v1/plans",
)
print(response.json())
```

Response `200`:

```json
{
  "data": {
    "plans": [
      {
        "id": "free",
        "name": "Free",
        "priceUsdPerMonth": 0,
        "requestsPerMinute": 30,
        "burst": 30,
        "unitsPerMonth": 20000,
        "streamUnitsPerMonth": 60000,
        "historyMinutes": 60,
        "wsConnections": 1,
        "wsSubscriptionsPerConnection": 2,
        "wsEventsPerSecond": 5,
        "wsEventBurst": 25,
        "wsInboundFramesPerSecond": 5,
        "wsAllowListMax": 10,
        "wsReplayWindowMs": 0,
        "wsFilterScoreMax": 10,
        "maxKeys": 2
      }
    ]
  },
  "meta": {
    "requestId": "req_01m40t5ek8b3x7r2mh5q",
    "generatedAt": "2026-10-03T12:00:04.210Z",
    "asOf": null,
    "caveats": []
  }
}
```

Errors: `key_in_query`, `method_not_allowed`, `rate_limited`, `rate_limit_unavailable`, `internal_error`. Every code: https://traktor.fun/docs/errors.md

[Plans and limits](https://traktor.fun/docs/plans.md#plans) renders its answer as a table, read live.

### `GET /v1/meta/filters`

The filter grammars, their units and costs, the tracked chain and app pairs, and retention.

- URL: `https://api.traktor.fun/v1/meta/filters`
- Credential: None

Limits:

- Requests, shared with GET /v1/plans: 60 a minute, per IP

```bash cURL
curl -s "https://api.traktor.fun/v1/meta/filters"
```

```ts TypeScript
const response = await fetch("https://api.traktor.fun/v1/meta/filters");
const body = await response.json();
```

```python Python
import requests

response = requests.get(
    "https://api.traktor.fun/v1/meta/filters",
)
print(response.json())
```

Response `200` (excerpt; the full body has more keys):

```json
{
  "data": {
    "grammarVersion": 1,
    "coverage": {
      "chains": [
        "bnb"
      ],
      "platforms": [
        "fomo"
      ],
      "pairs": [
        {
          "chain": "bnb",
          "platform": "fomo",
          "partial": false
        }
      ]
    },
    "retention": {
      "flowsHours": 24
    },
    "limits": {
      "tokensMax": 50,
      "walletsMax": 50,
      "cursorTtlHours": 24,
      "examineCapPerRequest": 10000
    },
    "nullRule": "a null metric satisfies no numeric predicate, floor or ceiling"
  },
  "meta": {
    "requestId": "req_01m40t5ek8b3x7r2mh5q",
    "generatedAt": "2026-10-03T12:00:04.210Z",
    "asOf": "2026-10-03T12:00:02.000Z",
    "caveats": []
  }
}
```

Errors: `key_in_query`, `method_not_allowed`, `rate_limited`, `rate_limit_unavailable`, `internal_error`. Every code: https://traktor.fun/docs/errors.md

It publishes what a program needs to build a query, under these keys:

- `fields`: each flow filter key, with its type, range and default.
- `money` and `nullRule`: how an amount is read, and that a null satisfies no bound.
- `coverage`: the tracked `chains`, `platforms` and `pairs`.
- `limits`, `cost` and `retention`: the bounds a request meets, the stream's filter score under `cost.ws`, and how long trades are kept.
- `caveats` and `flags`: the codes that qualify an answer and a row.
- `market`: the market filter, with its units, bounds and provenance.

`market.coverage.stockRegistrySources` dates each issuer registry by the answering server's own fetch, so each server's answer has its own `ETag`: a `304` comes only from the server that answered, until it fetches the registries again.

### `GET /v1/stream/position`

The stream's newest position as a `seq`, and how many seconds the retained stream spans.

- URL: `https://api.traktor.fun/v1/stream/position`
- Credential: API key
- REST units: 0 units

Limits:

- Invalid keys: 30 a minute, per IP
- Trades the stream retains: 200,000 entries by default, per server process

```bash cURL
curl -s "https://api.traktor.fun/v1/stream/position" \
  -H "Authorization: Bearer $TRAKTOR_API_KEY"
```

```ts TypeScript
const response = await fetch("https://api.traktor.fun/v1/stream/position", {
  headers: { Authorization: `Bearer ${process.env.TRAKTOR_API_KEY}` },
});
const body = await response.json();
```

```python Python
import os
import requests

response = requests.get(
    "https://api.traktor.fun/v1/stream/position",
    headers={"Authorization": f"Bearer {os.environ['TRAKTOR_API_KEY']}"},
)
print(response.json())
```

Response `200`:

```json
{
  "data": {
    "position": "3-1791028802120-0",
    "streamWindowSeconds": 2914
  },
  "meta": {
    "requestId": "req_01m40t5ek8b3x7r2mh5q",
    "generatedAt": "2026-10-03T12:00:04.210Z",
    "asOf": "2026-10-03T12:00:04.210Z",
    "caveats": []
  }
}
```

Errors: `missing_credentials`, `invalid_key`, `key_revoked`, `subscription_inactive`, `key_in_query`, `method_not_allowed`, `rate_limited`, `rate_limit_unavailable`, `internal_error`. Every code: https://traktor.fun/docs/errors.md

`position` is `null` while the stream is empty, and `streamWindowSeconds` whenever it cannot be measured. `position` is a `seq`, as the stream's `ack` and `events` frames carry: `streamWindowSeconds` says how far back a [resume](https://traktor.fun/docs/stream.md#resume) can reach at most, before the plan's replay window bounds it.

### `GET /v1/usage`

The account's draw this period, across every key it holds.

- URL: `https://api.traktor.fun/v1/usage`
- Credential: API key
- REST units: 0 units

Limits:

- Invalid keys: 30 a minute, per IP

```bash cURL
curl -s "https://api.traktor.fun/v1/usage" \
  -H "Authorization: Bearer $TRAKTOR_API_KEY"
```

```ts TypeScript
const response = await fetch("https://api.traktor.fun/v1/usage", {
  headers: { Authorization: `Bearer ${process.env.TRAKTOR_API_KEY}` },
});
const body = await response.json();
```

```python Python
import os
import requests

response = requests.get(
    "https://api.traktor.fun/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['TRAKTOR_API_KEY']}"},
)
print(response.json())
```

Response `200`:

```json
{
  "data": {
    "plan": "free",
    "period": {
      "start": "2026-09-15T00:00:00.000Z",
      "end": "2026-10-15T00:00:00.000Z",
      "resetsAt": "2026-10-15T00:00:00.000Z"
    },
    "rest": {
      "requests": 812,
      "units": 1644,
      "unitsIncluded": 20000,
      "unitsRemaining": 18356
    },
    "ws": {
      "connectionMinutes": 95,
      "deliveredEvents": 40211,
      "droppedEvents": 0
    },
    "openHour": {
      "partial": true
    }
  },
  "meta": {
    "requestId": "req_01m40t5ek8b3x7r2mh5q",
    "generatedAt": "2026-10-03T12:00:04.210Z",
    "asOf": "2026-10-03T12:00:04.210Z",
    "caveats": []
  }
}
```

Errors: `missing_credentials`, `invalid_key`, `key_revoked`, `subscription_inactive`, `key_in_query`, `method_not_allowed`, `rate_limited`, `rate_limit_unavailable`, `internal_error`. Every code: https://traktor.fun/docs/errors.md

The answer is per account, not per key: `plan` is the plan's `id`, `rest` holds the `requests` made and the `units` drawn beside `unitsIncluded` and `unitsRemaining`, and `ws` the `connectionMinutes` and `deliveredEvents` of the trade stream and of the market stream under a key, whose views count as delivered events, and the trade stream's `droppedEvents`. The counts include the clock hour still running, so `openHour.partial` is always `true`. Stream units are not in it: your profile's [API tab](https://traktor.fun/profile?tab=api) shows them.
