Market data · backtesting

candlefetch

v1.0.0 MIT Self-hosted

You sat down to backtest a trading idea and stalled on step one — grabbing the data. The tutorial snippet returns an empty frame; the exchange API has a 1000-candle limit and weight-based rate limiting; you need 1-hour candles and only get 1-minute. candlefetch is the fix: pick a symbol and a date range, click once, get clean interval-correct CSVs and a candlestick chart.

License
MIT open-source
Runtime
Python 3.11+
Sources
Binance US + Yahoo
Price
$0 free, forever

What it is

Get to the strategy, not stuck on the data.

A local web dashboard that fetches OHLCV candle data from Binance US (crypto) and Yahoo Finance (stocks), reconstructs the intervals you need, previews a live candlestick chart, and exports clean CSV. FastAPI backend, SQLite job history, a vanilla-JS frontend — it runs on your machine and talks only to the two data providers.

01

No API key needed

Binance US klines and Yahoo Finance are both public endpoints. Clone the repo, run the launcher, fetch. There is no account to create and no key to paste.

02

Interval reconstruction, done for you

Fetch 1-minute candles once; candlefetch correctly resamples them into 5m / 15m / 1h / 1d. You do not have to know how, or get the aggregation subtly wrong.

03

Clean CSVs, documented schema

Every export is timestamp,open,high,low,close,volume,source,symbol,interval — UTC-normalized, ready for pandas or Excel. No mystery columns.

How it works

A symbol to a CSV, in one click.

A button and a chart, instead of a data pipeline you have to write before you start.

Pick

Symbol, range, intervals

Autocomplete a symbol — crypto pairs route to Binance US, equities to Yahoo. Choose a date range and tick the candle intervals you want.

Watch

Live progress

A progress bar and status text stream over Server-Sent Events — contacting the provider, candles fetched, intervals being built.

Keep

Chart, CSVs, history

A candlestick chart renders; download a per-interval CSV. Every fetch is saved to SQLite — reopen a past job without fetching the same range twice.

Who it's for

If this sounds like you, it will fit.

  • You are learning to backtest and keep losing an afternoon on the data-acquisition step before you reach the actual strategy.
  • You want a button and a chart, not a scraper and a pagination handler you have to build and maintain first.
  • You need interval-correct OHLCV CSVs for pandas, Excel, or your own backtest script — and you want the schema documented.

Plainly

What it does, and what it doesn't.

What it does

  • Fetches OHLCV candles from Binance US and Yahoo Finance
  • Resamples 1-minute data into correct 5m / 15m / 1h / 1d candles
  • Renders a live candlestick chart in the dashboard
  • Exports clean, UTC-normalized, documented-schema CSVs
  • Keeps a SQLite job history so you can reopen past fetches
  • Ships a ~30-line example backtest to close the loop

What it doesn't

  • It is not production trading infrastructure — no durable queue, no auth, no SLA
  • It is not tick or sub-minute data — the finest interval is 1-minute
  • It is redundant if you already live inside vectorbt, Backtrader, or freqtrade
  • US equities are daily-only here, by deliberate design
  • It fetches data — it does not tell you what to trade

It's free and open-source. Clone it.

candlefetch is MIT-licensed — no tiers, no account, no paid version held back. Clone the repo, run the launcher for your OS, and open the dashboard on 127.0.0.1.