> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Realtime API Tools

> Access current and historical blockchain data without writing SQL queries.

## Overview

Realtime API tools provide access to current and historical blockchain data without writing SQL queries. These tools are optimized for common use cases like price lookups, wallet balances, and transaction history.

## Available Tools

| Tool Name                                 | Description                                                         |
| :---------------------------------------- | :------------------------------------------------------------------ |
| `realtime_get_token_price`                | Get the latest price for a token on a specific chain                |
| `realtime_get_multiple_token_prices`      | Get latest prices for multiple tokens across chains                 |
| `realtime_get_token_price_history`        | Get historical price data for a token with time-series data (OHLCV) |
| `realtime_get_token_price_stats`          | Get price statistics including 24h/1h high/low and percent changes  |
| `realtime_get_token_price_at_timestamp`   | Get token price at a specific historical timestamp                  |
| `realtime_get_wallet_balances`            | Get current token balances for a wallet address on a specific chain |
| `realtime_get_multi_chain_balances`       | Get token balances across multiple chains for the same address      |
| `realtime_get_wallet_transactions`        | Get transaction history for wallet addresses                        |
| `realtime_get_wallet_historical_balances` | Get historical token balances over a time range                     |

## Tool Usage

### Token Prices

#### Get Current Price

Get the latest price for a single token:

```json theme={null}
{
  "name": "realtime_get_token_price",
  "arguments": {
    "token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "chain": "ethereum",
    "with_liquidity_info": true
  }
}
```

#### Get Multiple Prices

Get latest prices for multiple tokens at once:

```json theme={null}
{
  "name": "realtime_get_multiple_token_prices",
  "arguments": {
    "tokens": [
      {"token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "chain": "ethereum"},
      {"token_address": "So11111111111111111111111111111111111111112", "chain": "solana"}
    ],
    "with_liquidity_info": false
  }
}
```

#### Get Price History

Get historical price data with time-series (OHLCV):

```json theme={null}
{
  "name": "realtime_get_token_price_history",
  "arguments": {
    "token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "chain": "ethereum",
    "start_timestamp": "2025-01-01T00:00:00Z",
    "end_timestamp": "2025-01-31T23:59:59Z",
    "granularity": "1h"
  }
}
```

**Granularity options:** `15s`, `1m`, `5m`, `1h`, `1d`

#### Get Price Statistics

Get price statistics including 24h/1h highs/lows and percent changes:

```json theme={null}
{
  "name": "realtime_get_token_price_stats",
  "arguments": {
    "tokens": [
      {"token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "chain": "ethereum"}
    ]
  }
}
```

#### Get Price at Timestamp

Get token price at a specific historical timestamp:

```json theme={null}
{
  "name": "realtime_get_token_price_at_timestamp",
  "arguments": {
    "tokens": [
      {"token_address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "chain": "ethereum"}
    ],
    "timestamp": "2025-01-15T12:00:00Z",
    "time_granularity": "1m"
  }
}
```

### Wallet Data

#### Get Current Balances

Get current token balances for a wallet address:

```json theme={null}
{
  "name": "realtime_get_wallet_balances",
  "arguments": {
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "chain": "ethereum",
    "with_liquidity_info": true
  }
}
```

#### Get Multi-Chain Balances

Get balances across multiple chains for the same address:

```json theme={null}
{
  "name": "realtime_get_multi_chain_balances",
  "arguments": {
    "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "chains": ["ethereum", "polygon", "base"],
    "with_liquidity_info": false
  }
}
```

#### Get Transaction History

Get transaction history for wallet addresses:

```json theme={null}
{
  "name": "realtime_get_wallet_transactions",
  "arguments": {
    "addresses": [
      {"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum"}
    ],
    "limit": 100
  }
}
```

**Note:** Maximum 20 addresses per request.

#### Get Historical Balances

Get historical token balances over a time range:

```json theme={null}
{
  "name": "realtime_get_wallet_historical_balances",
  "arguments": {
    "addresses": [
      {"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chain": "ethereum"}
    ],
    "start_timestamp": "2025-01-01T00:00:00Z",
    "end_timestamp": "2025-01-31T23:59:59Z",
    "limit": 1000
  }
}
```

## Related Resources

<CardGroup cols={2}>
  <Card title="Realtime APIs" icon="bolt" href="/api/developer/overview">
    REST API documentation for Realtime APIs
  </Card>

  <Card title="Prices API" icon="dollar-sign" href="/api/developer/prices/overview">
    Detailed prices API reference
  </Card>

  <Card title="Wallets API" icon="wallet" href="/api/developer/wallets/overview">
    Detailed wallets API reference
  </Card>
</CardGroup>
