# Trending tokens

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

`GET /v1/trending`

- Base URL: `https://api.ttf.bot`
- Cost: 2 credits, 1 if cached
- Plan: requires Starter
- Chains: 40 chains
- API key: required. Send `Authorization: Bearer YOUR_KEY` (or `X-API-Key: YOUR_KEY`).
- A refused or failed call costs nothing.

What TTF users are scanning right now: the most scanned tokens of a window with market cap, price and quick security badges. Perfect for a "hot right now" feed or a trending channel.

- Use `window=1h` for what is hot right now, `1d` for the day.
- Keep the answer small with `fields`, for example `symbol,scans,market_cap_usd`.

## Exact rules

The tokens people scanned most with TTF in the window, optionally on one chain, most distinct scanners first. Per token: scans, scanners, chat_groups (Telegram groups it was scanned in), the first and last scan of the window, the latest scanned market cap / price / liquidity, the market cap change over the hourly spark (last 24 h, market_cap_spark_usd) and security badges when TTF scanned it lately. `fields` keeps only the asked row keys (plus chain and address). Costs 2 credits (1 from the cache).

## Parameters

### Query parameters

- `chain` (string, query, optional): Only this chain (optional). Chain id.
  - Allowed: `eth`, `sol`, `base`, `bsc`, `abstract`, `arbitrumnova`, `arc`, `berachain`, `bttc`, `celo`, `cronos`, `elysium`, `flare`, `fraxtal`, `gnosis`, `hedera`, `injective`, `ink`, `katana`, `linea`, `mantle`, `megaeth`, `merlinchain`, `monad`, `moonbeam`, `moonriver`, `opbnb`, `plasma`, `polygonzkevm`, `pulsechain`, `robinhood`, `scroll`, `seiv2`, `sophon`, `stable`, `swellchain`, `taiko`, `worldchain`, `xdc`, `zksync`.
  - At most 16 characters.
  - Example: `sol`
- `window` (enum, query, optional): Time window: the board is counted over the scans of that window. Default 1d; 24h = 1d.
  - Allowed: `5m`, `1h`, `4h`, `6h`, `1d`, `24h`.
  - Default: `1d`.
  - Example: `1d`
- `limit` (integer, query, optional): Rows, 1-40. Default 30.
  - Default: `30`.
  - Range: 1 to 40.
  - Example: `30`
- `fields` (string, query, optional): Comma-separated keys each token row keeps (default all; chain and address are always kept): chain, address, symbol, name, scans, scanners, chat_groups, first_scan_ms, last_scan_ms, market_cap_usd, price_usd, liquidity_usd, market_cap_change_pct, market_cap_spark_usd, badges.
  - Values, comma separated: `chain`, `address`, `symbol`, `name`, `scans`, `scanners`, `chat_groups`, `first_scan_ms`, `last_scan_ms`, `market_cap_usd`, `price_usd`, `liquidity_usd`, `market_cap_change_pct`, `market_cap_spark_usd`, `badges`. Nothing picked: all.
  - At most 200 characters.
  - Example: `chain,address,symbol,scans`

## Example request

```bash
curl -sS 'https://api.ttf.bot/v1/trending' \
  -H 'Authorization: Bearer YOUR_KEY'
```

Put your key in place of `YOUR_KEY`.

## Example answer

`200` (`default`): Most scanned tokens

```json
{
  "data": {
    "chain": "eth",
    "generated_at": "2026-11-28T10:00:00Z",
    "tokens": [
      {
        "address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "badges": {
          "buy_tax_pct": 0,
          "flag_count": 0,
          "honeypot": false,
          "level": "ok",
          "sell_tax_pct": 0
        },
        "chain": "eth",
        "chat_groups": 31,
        "first_scan_ms": 1794913600000,
        "last_scan_ms": 1794999990000,
        "liquidity_usd": 41200000,
        "market_cap_change_pct": 2.3,
        "market_cap_spark_usd": [
          3781000000,
          3802000000,
          3870000000
        ],
        "market_cap_usd": 3870000000,
        "name": "Pepe",
        "price_usd": "0.0000092",
        "scanners": 96,
        "scans": 412,
        "symbol": "PEPE"
      }
    ],
    "window": "1d"
  },
  "meta": {
    "cost": 2,
    "request_id": "3f2a9c0e5b7d4e18a6c1f0b2d9e8a7c6"
  }
}
```

## Response fields

`always` = in every answer; `always*` = in every answer that does not narrow it with `fields`; any other field is left out when there is no value (never `null`). Objects are open: ignore keys you do not know.

A `200` answer is `{"data", "meta"}` (`TrendingAnswer`).

### `data`

- `generated_at` (string (date-time), always): When the board was built (it is shared for about a minute). ISO-8601 UTC ("2026-11-28T10:00:00Z").
- `tokens` (array of objects, always): The tokens, most distinct scanners first.
  - `address` (string, always): Token address. Address on its chain: 0x + 40 hex (lower case) on EVM chains, base58 on Solana.
  - `chain` (string, always): Chain id.
  - `chat_groups` (integer, always*): Telegram groups it was scanned in during the window.
  - `first_scan_ms` (integer, always*): First scan in the window. Unix time in milliseconds.
  - `last_scan_ms` (integer, always*): Latest scan in the window. Unix time in milliseconds.
  - `scanners` (integer, always*): Distinct people who scanned it in the window.
  - `scans` (integer, always*): TTF scans of the token in the window.
  - `symbol` (string, always*): Ticker.
  - `badges` (object): Security badges from TTF's latest scan of the token (absent when not scanned lately).
    - `flag_count` (integer, always): Findings of the scan.
    - `level` (string, always): ok, warn or danger (the scan verdict). One of: `ok`, `warn`, `danger`.
    - `buy_tax_pct` (number): Buy tax. Percent (5.2 = 5.2 %).
    - `honeypot` (boolean): true = the sell simulation failed.
    - `sell_tax_pct` (number): Sell tax. Percent (5.2 = 5.2 %).
  - `liquidity_usd` (integer): Liquidity at the latest scan. Whole US dollars (integer).
  - `market_cap_change_pct` (number): Market cap change over the spark (last 24 h). Percent (5.2 = 5.2 %).
  - `market_cap_spark_usd` (array of integers): Hourly market cap over the last 24 h, oldest first (whole US dollars).
  - `market_cap_usd` (integer): Market cap at the latest scan. Whole US dollars (integer).
  - `name` (string): Token name.
  - `price_usd` (string): Price at the latest scan, in US dollars. Decimal string (never a float, no exponent).
- `window` (string, always): The window the board counts.
- `chain` (string): The chain filter, when one was asked.

### `meta`

- `cost` (integer, always): Credits this call finally spent (= the X-Credits-Cost header). 0 for free routes and refused calls.
- `request_id` (string, always): Id of this request (= the X-Request-Id header). Quote it to support.
- `cached` (array of strings): The groups answered from the shared answer cache (charged at their cached weight). Absent when none.
- `partial` (array of strings): Something is missing. A bare group name ("holders"): that group failed, its entry in data is {"error": {...}} and only the attempt fee can apply. A dotted "\<group>.\<part>" ("security.holders"): a part of a group that DID answer is missing (see its complete / missing); that group is still billed. Absent when nothing is missing.

## Errors

| Status | Code | When |
| --- | --- | --- |
| 400 | `bad_request` | Bad request: unknown chain, address, field or option. Not charged. Codes: bad_request. |
| 401 | `unauthorized` | The API key is missing or not valid. Not charged. Codes: unauthorized. |
| 402 | `payment_required` | The subscription of this API key has ended. Not charged. Codes: payment_required. |
| 403 | `forbidden` | The key has no developer plan, or does not include the asked groups. Not charged. Codes: forbidden. |
| 404 | `not_found` | Not found: no data for this token (the attempt fee applies, see the description), or the API is switched off / an unknown route (not charged). Codes: not_found. |
| 405 | `method_not_allowed` | Wrong HTTP method (every data route is GET). Not charged. Codes: method_not_allowed. |
| 429 | `rate_limited` | Too many requests per second, or the credits of the minute / day / month are used up. See Retry-After. Not charged. Codes: rate_limited. |
| 500 | `internal` | Unexpected error. Not charged. Codes: internal. |
| 502 | `upstream` | A data provider did not answer. The attempt fee (1 credit) applies to core and the paid-provider groups. Codes: upstream. |
| 503 | `capacity` `busy` `unavailable` | Capacity, shedding, busy providers or the limits store is unavailable. See Retry-After. Not charged. Codes: capacity, busy, unavailable. |
| 504 | `timeout` | The data took too long. The attempt fee (1 credit) applies to core and the paid-provider groups. Codes: timeout. |
| other | `error` | Any other refusal of the HTTP layer (rare): the status says which. Codes: error. |

Every error is `{"error": {"code", "message", "doc_url", "request_id"}}`. What each code means and how to fix it: [Errors](https://ttf.bot/developers/docs/md/errors.md).
