# Wallet activity

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

`GET /v1/wallet/{chain}/{address}/activity`

- Base URL: `https://api.ttf.bot`
- Cost: 3 credits, 1 if cached
- Plan: requires Starter
- Chains: 28 chains
- API key: required. Send `Authorization: Bearer YOUR_KEY` (or `X-API-Key: YOUR_KEY`).
- A refused call costs nothing; a failed one costs 1 credit (the attempt fee).

Follow a wallet (a whale, a dev, a smart-money wallet, your own): its latest transfers in and out, and TTF keeps watching it live for your account after each call.

- Want a ping the moment a wallet moves instead of asking again and again? Use a [wallet webhook](https://ttf.bot/developers/docs/md/webhook-wallet.md) rule.
- Exchange, router and burn addresses are refused: they move on every block.

## Exact rules

The wallet's recent ERC-20 transfers, in and out, newest first: public chain history (the latest 100 transfers, shared for 15 s) merged with what TTF's real-time watcher recorded for this address since YOUR account first asked about it. A call whose history answered starts (or renews) a 24 h watch of the address (at most your plan's max_watch_addresses together with your wallet webhook rules, e.g. 2,500 on Pro; the least recently asked one is dropped first, never a rule address); native-coin transfers come with token 0xeeee...eeee; data.watch says when it started (started_ms) and ends (expires_ms, unix ms like the transfers' time_ms, absent while no watch exists), whether real-time watching is configured on the chain (configured), the watcher is running and keeping up now (live) and whether the address was dropped for moving on most blocks (hot). Burn, router, wrapped-coin and exchange addresses are refused (400). Pages: data.next_cursor -> ?cursor=. Group `wallet`. Costs 3 credits (1 from the cache); a wallet with no transfers or a provider that did not answer costs 1 credit (the attempt fee); busy costs nothing.

## Parameters

### Path parameters

- `chain` (string, path, required): Chain id.
  - Allowed: `eth`, `base`, `bsc`, `abstract`, `arb`, `arc`, `avax`, `berachain`, `bttc`, `celo`, `fraxtal`, `gnosis`, `hyperevm`, `linea`, `mantle`, `megaeth`, `monad`, `opt`, `polygon`, `pulsechain`, `robinhood`, `scroll`, `sonic`, `taiko`, `unichain`, `worldchain`, `xdc`, `zksync`.
  - At most 16 characters.
  - Example: `eth`
- `address` (string, path, required): Wallet address (0x + 40 hex).
  - At most 64 characters.
  - Example: `0xd8da6bf26964af9d7eed9e03e53415d37aa96045`

### Query parameters

- `limit` (integer, query, optional): Transfers per page, 1-50. Default 20.
  - Default: `20`.
  - Range: 1 to 50.
  - Example: `20`
- `cursor` (string, query, optional): data.next_cursor of the previous page (opaque). Omit for the newest page.
  - At most 200 characters.
  - Example: `MjE0MDAwMDA6MTI6MHg1ZDVk`
- `fields` (string, query, optional): Comma-separated keys each transfer keeps (default all): tx, block, time_ms, log_index, token, symbol, decimals, value, from, to, direction, source.
  - Values, comma separated: `tx`, `block`, `time_ms`, `log_index`, `token`, `symbol`, `decimals`, `value`, `from`, `to`, `direction`, `source`. Nothing picked: all.
  - At most 200 characters.
  - Example: `tx,token,value,direction`

## Example request

```bash
curl -sS 'https://api.ttf.bot/v1/wallet/eth/0xd8da6bf26964af9d7eed9e03e53415d37aa96045/activity' \
  -H 'Authorization: Bearer YOUR_KEY'
```

Put your key in place of `YOUR_KEY`.

## Example answer

`200` (`default`): Recent transfers of a wallet

```json
{
  "data": {
    "next_cursor": "MjE0MDAwMDA6MTI6MHg1ZDVk",
    "transfers": [
      {
        "block": 21400000,
        "decimals": 18,
        "direction": "out",
        "from": "0x3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a3a",
        "log_index": 12,
        "source": "history",
        "symbol": "PEPE",
        "time_ms": 1795000000000,
        "to": "0x4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b4b",
        "token": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "tx": "0x5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d",
        "value": "1500000000000000000000"
      }
    ],
    "watch": {
      "configured": true,
      "expires_ms": 1795076400123,
      "hot": false,
      "live": true,
      "started_ms": 1794990000123
    }
  },
  "meta": {
    "cost": 3,
    "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"}` (`WalletActivityAnswer`).

### `data`

- `transfers` (array of objects, always): Transfers in and out, newest first.
  - `block` (integer, always*): Block number.
  - `direction` (string, always*): out = the wallet sent it, in = it received it, self = to itself. One of: `in`, `out`, `self`.
  - `from` (string, always*): Sender (0x + 40 hex).
  - `log_index` (integer, always*): Position of the transfer in its transaction's logs.
  - `source` (string, always*): history = public chain history, watch = recorded live by TTF's watcher. One of: `history`, `watch`.
  - `to` (string, always*): Receiver (0x + 40 hex).
  - `token` (string, always*): Token contract (0x + 40 hex); native-coin transfers use 0xeeee...eeee.
  - `tx` (string, always*): Transaction hash.
  - `value` (string, always*): Raw amount (integer string; divide by 10^decimals).
  - `decimals` (integer): Token decimals (value / 10^decimals = tokens).
  - `symbol` (string): Token ticker (third-party text: escape it).
  - `time_ms` (integer): Block time (absent when the source did not give it). Unix time in milliseconds.
- `watch` (object, always): TTF's real-time watch of this address for your account.
  - `configured` (boolean, always): true = real-time watching is set up on this chain.
  - `hot` (boolean, always): true = dropped from live watching because it moves on most blocks (history still works).
  - `live` (boolean, always): true = the watcher is running and keeping up right now.
  - `expires_ms` (integer): When it ends unless you ask again (absent while no watch exists). Unix time in milliseconds.
  - `started_ms` (integer): When your watch of the address started. Unix time in milliseconds.
- `next_cursor` (string): Pass it as ?cursor= for the next (older) page. Absent = the last page.

### `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).
