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

# Hummingbot Hyperliquid historical candles

> Feed Hummingbot's Hyperliquid candles and V2 backtests past the 5,000-candle limit: one small candle feed override reads history through your Ironflow key.

Hyperliquid's API only returns about the last 5,000 candles per interval, so a Hummingbot backtest on `1m` candles stops at about 3.5 days. Override the Hyperliquid candle feed and it reads your plan's full history from Ironflow.

Tested with Hummingbot 20260922.

```python ironflow_candles.py theme={null}
import os

from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory
from hummingbot.data_feed.candles_feed.hyperliquid_perpetual_candles import constants
from hummingbot.data_feed.candles_feed.hyperliquid_perpetual_candles.hyperliquid_perpetual_candles import (
    HyperliquidPerpetualCandles,
)

KEY = os.environ["IRONFLOW_KEY"]


class IronflowCandles(HyperliquidPerpetualCandles):
    """Hyperliquid's candle feed, reading REST history through your Ironflow key."""

    @property
    def rest_url(self):
        return f"https://api.ironflow.sh/rpc/{KEY}/info"

    @property
    def _rest_throttler_limit_id(self):
        return constants.REST_URL


CandlesFactory._candles_map["hyperliquid_perpetual"] = IronflowCandles
```

Import it once before anything builds a `hyperliquid_perpetual` feed. Backtests through `BacktestingDataProvider` then read history through your key:

```python backtest.py theme={null}
import asyncio
import time

import ironflow_candles  # patches CandlesFactory
from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory, CandlesConfig
from hummingbot.data_feed.candles_feed.data_types import HistoricalCandlesConfig


async def main():
    feed = CandlesFactory.get_candle(CandlesConfig(connector="hyperliquid_perpetual", trading_pair="BTC-USD", interval="1m"))
    end = int(time.time()) // 60 * 60
    df = await feed.get_historical_candles(HistoricalCandlesConfig(
        connector_name="hyperliquid_perpetual", trading_pair="BTC-USD", interval="1m",
        start_time=end - 7 * 86_400, end_time=end,
    ))
    print(len(df), "candles")


asyncio.run(main())
```

```bash theme={null}
pip install hummingbot
IRONFLOW_KEY=if_your_key python backtest.py
```

## How it works

Hummingbot's feed asks for at most 500 candles per call and pages backward, which fits the [Hyperliquid RPC](https://docs.ironflow.sh/guides/hyperliquid-rpc.md) (1,000 per call). Perpetuals only.

Only REST candle history changes. Hummingbot's live candle stream stays on Hyperliquid's WebSocket, and orders go straight to Hyperliquid, since the RPC has no WebSocket and no order path.

## Plan limits

| Plan | Candle history | Requests |
| - | - | - |
| Free key | 14 days | 60 a minute |
| Explorer | 90 days | 100 a minute |
| Builder | 1 year | 1,000 a minute |
| Enterprise | Everything stored | 10,000 a minute |

A free key's 14 days is 20,160 `1m` candles. Keep to your plan's rate limit on long pulls. The RPC has no keyless access: [get a free key](https://ironflow.sh/key).

Candles are built from every fill, so high, low and trade count can differ from Hyperliquid's own candles in heavy liquidation hours.

Next: [paper trade on Hyperliquid](https://ironflow.sh/guides/hyperliquid-paper-trading) with the official SDK, \$10,000 and live prices.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.