# Response format

- Section: Get started (TTF API reference)
- Source: https://ttf.bot/developers/docs/#format
- The whole reference as one text: https://ttf.bot/developers/docs/llms-full.txt

Every answer has the same shape, so you write the parsing once.

A good answer is `{"data": ..., "meta": ...}`. `data` is what you asked for; `meta` says what it cost:

```json
{
  "data": { "...": "..." },
  "meta": { "cost": 1, "request_id": "3f2a9c0e5b7d4e18a6c1f0b2d9e8a7c6" }
}
```

An error is `{"error": {"code", "message", "doc_url", "request_id"}}`. The `code` never changes, so your code can check it; see [Errors](https://ttf.bot/developers/docs/md/errors.md).

## Numbers and money

- **Big dollar amounts** (market cap, liquidity, volume) are whole numbers: `"market_cap_usd": 3870000000`.
- **Prices and token amounts** are text, so no digit is lost: `"usd": "0.0000092"`. Convert with a decimal type if you do maths.
- **Percentages** are numbers and the key ends in `_pct`.
- **Raw on-chain amounts** (`value`) are integers as text; divide by 10 to the power `decimals`.

## Times

- A single time is ISO 8601 in UTC, key ending in `_at`: `"2026-11-28T10:00:00Z"`.
- Times inside lists and events are unix milliseconds, key ending in `_ms` (or `ts`).

## Missing values

A value we do not know is simply **left out**, never `null`. Lists that are the answer are always there, also when empty. So check "is the key there?" before you use it.

## Pages

Lists that have more pages return `next_cursor`. Send it back as `cursor` for the next page. No `next_cursor` = last page.

## Saving bandwidth

- Ask for compression with `Accept-Encoding: gzip` (most tools do this by themselves).
- Each data answer has an `ETag`. Send it back as `If-None-Match`: when nothing changed you get an empty `304`. It is billed like a normal answer, it only saves bytes.
- Ask only the fields you need (`fields=price,security`).
