# Token balance · HyperCore API · Femtos

> One token of one address on HyperCore: 0 when not held, now or at a past block.

- Base URL: `https://api.femtos.xyz/v1` (REST) · `wss://api.femtos.xyz/v1/ws` (WebSocket) · MCP: `https://api.femtos.xyz/mcp`
- Auth: `Authorization: Bearer $FEMTOS_KEY`. Free key: https://femtos.xyz/accounts/ (browser), or with
  no browser: `GET https://femtos.xyz/accounts/agent/challenge`, solve its proof of work, then `POST https://femtos.xyz/accounts/agent/signup`
  (https://femtos.xyz/agents.md#agent-onboarding)
- Decimals are exact strings, times Unix milliseconds, addresses lowercase `0x`
- Whole API in one file: https://femtos.xyz/agents.md · OpenAPI: https://api.femtos.xyz/v1/openapi.json · Index: https://femtos.xyz/llms.txt
- Page with live calls: https://femtos.xyz/hypercore/token-balance

## Token balance — GET `/v1/balances/{address}/{token}`

One token of one address on HyperCore: 0 when not held, now or at a past block.

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `address` | path | `<address>` | 0x address, or a named wallet's handle `<entityId>.<hex>` |
| `token` | path | `USDC`, `HYPE`, `UBTC`, `PURR` | EVM token address, `native` (HYPE), or a HyperCore coin name |
| `layer` | query | `hypercore` | Default: hypercore for a coin name, hyperevm for an address |
| `block` | query | (optional) | Past balance at this block |
| `at` | query | (optional) | Past balance at this time (Unix ms) |

```bash
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/balances/<address>/USDC?layer=hypercore"
```

| Field | Type | Meaning |
|---|---|---|
| `balance` | object | One token held by the address on one layer: {layer, kind, asset, symbol, name, decimals, raw, amount, priceUsd, priceSource, usd, spam, …} |
| `balance.onchain` | object | verify=true: the same balance read again on the node at the same block: {raw, match, error} |
| `layers.<layer>` | object | Provenance of the layer read: source, height, asOf: {source, height, asOf, network, chainId, testnet, syncing, dataUntil, requested, usd, usdComplete, count, …} |
| `token` | string | Token asked |

## Related (Balances)

- [Balances](https://femtos.xyz/hypercore/balances.md): Every token an address holds on HyperCore, with USD value and the block it is read at.
- [Batch balances](https://femtos.xyz/hypercore/batch-balances.md): Up to 100 addresses on HyperCore in one call, the same answer for each.
- [Balances, all layers](https://femtos.xyz/hypercore/balances-all.md): One address on HyperCore, HyperEVM and Elysium in one list, with totals per layer.

All HyperCore endpoints: https://femtos.xyz/hypercore.md
