static-klines
v0.1.8
Published
Type-safe, auto-generated client for the **static-klines** API — historical Binance spot klines served as pre-rendered static JSON. No rate limits, infinite cache lifetime, globally CDN'd.
Maintainers
Readme
static-klines — pre-rendered historical Binance spot klines for the top 10 USDT pairs, served as plain static JSON files on GitHub Pages. Built as a zero-setup dataset for AI model training, backtesting, and other crypto data experiments where you just want candles in a fetch call without signing up, paying, or managing rate limits.
No rate limits, infinite cache lifetime, globally CDN'd. Every URL is a committed JSON file — the repo itself is the dataset.
Interactive docs: https://finom.github.io/static-klines/ OpenAPI spec: https://finom.github.io/static-klines/api ← a GET on the API root returns the full OpenAPI 3.1 document
Try it — open any of these in a browser
- https://finom.github.io/static-klines/api/klines/symbols.json — list of supported trading pairs
- https://finom.github.io/static-klines/api/klines/start-dates/1d.json — every valid
startDatefor the 1d interval - https://finom.github.io/static-klines/api/klines/1d/BTCUSDT/2018-01-01.json — 2 years of BTCUSDT daily candles starting Jan 1, 2018
- https://finom.github.io/static-klines/api/klines/1h/ETHUSDT/2024-01-01.json — January 2024 hourly candles for ETHUSDT
- https://finom.github.io/static-klines/api/klines/15m/SOLUSDT/2025-01-06.json — first full week of 2025, 15-minute SOLUSDT candles
Supported symbols
BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, XRPUSDT, ADAUSDT, DOGEUSDT, AVAXUSDT, LINKUSDT, DOTUSDT — the 10 largest USDT pairs on Binance spot.
Supported intervals
Every startDate is a real calendar boundary — you can guess the next URL in sequence without looking it up. Call getStartDates({ interval }) for the full enum.
| Interval | Window | Anchor (first window) | ≤ candles/file |
|---------:|:-------|:----------------------|:----------------|
| 15m | 1 ISO week (Mon) | 2024-12-30 | ≤ 672 |
| 30m | 2 ISO weeks (Mon) | 2024-01-01 | ≤ 672 |
| 1h | 1 month (1st) | 2022-01-01 | ≤ 744 |
| 2h | 2 months (1st) | 2017-07-01 | ≤ 732 |
| 4h | 1 quarter (Jan/Apr/Jul/Oct) | 2017-07-01 | ≤ 546 |
| 6h | 6 months (Jan/Jul) | 2017-07-01 | ≤ 732 |
| 8h | 6 months (Jan/Jul) | 2017-07-01 | ≤ 546 |
| 12h | 1 year (Jan 1) | 2017-01-01 | ≤ 732 |
| 1d | 2 years (Jan 1, even) | 2016-01-01 | ≤ 732 |
| 3d | 5 years (Jan 1) | 2015-01-01 | ≤ 609 |
| 1w | 10 years (Jan 1) | 2010-01-01 | ≤ 522 |
| 1M | 20 years (Jan 1) | 2010-01-01 | ≤ 240 |
Each file contains the fully-closed Binance spot candles that fall inside that calendar window (always ≤1000). Pre-listing windows return []; future windows are scaffolded as [] and populated daily by GitHub Actions.
⚠️ Experimental / not audit-grade. This is a community cache of Binance's public REST API, refreshed once a day. Binance occasionally restates historical candles and a daily cache can't reflect that. Don't use it for trading or compliance — fine for ML datasets, charts, backtests, and exploratory analysis.
static-klines v0.1.8

Type-safe, auto-generated client for the static-klines API — historical Binance spot klines served as pre-rendered static JSON. No rate limits, infinite cache lifetime, globally CDN'd.
License: MIT
# Install the package
npm install static-klinesKLinesAPI
KLinesAPI.getSymbols
List supported symbols
Returns the hardcoded list of Binance spot trading pairs covered by this cache. Same enum used by every symbol path parameter.
GET https://finom.github.io/static-klines/api/klines/symbols.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getSymbols({
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
"BTCUSDT",
"ETHUSDT",
"BNBUSDT",
"SOLUSDT",
"XRPUSDT",
"ADAUSDT",
"DOGEUSDT",
"AVAXUSDT",
"LINKUSDT",
"DOTUSDT"
]
*/KLinesAPI.getStartDates
List valid startDates for an interval
Returns the ordered list of startDate values accepted by the candle endpoints for a given interval. Every value is a calendar-aligned UTC date; iterate in order to walk the full history.
GET https://finom.github.io/static-klines/api/klines/start-dates/{interval}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getStartDates({
params: {
// Binance kline interval code
interval: "15m"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
"2024-01-01",
"2024-02-01",
"2024-03-01",
"2024-04-01"
]
*/KLinesAPI.getKlines15m
Get 15m klines window
Fully-closed Binance spot candles at the 15m interval. Each file covers exactly 1 week (Monday-aligned), anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/15m.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/15m/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines15m({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 15m window start date (Monday, UTC, YYYY-MM-DD). Window covers 7 days / 672 candles.
startDate: "2023-01-02"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines30m
Get 30m klines window
Fully-closed Binance spot candles at the 30m interval. Each file covers exactly 2 weeks (Monday-aligned), anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/30m.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/30m/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines30m({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 30m window start date (Monday, UTC). Window covers 14 days / 672 candles.
startDate: "2022-01-03"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines1h
Get 1h klines window
Fully-closed Binance spot candles at the 1h interval. Each file covers exactly 1 calendar month, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/1h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/1h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines1h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 1h window start date (1st of month, UTC). Window covers 1 calendar month.
startDate: "2018-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines2h
Get 2h klines window
Fully-closed Binance spot candles at the 2h interval. Each file covers exactly 2 calendar months, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/2h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/2h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines2h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 2h window start date (UTC). Window covers 2 calendar months.
startDate: "2017-07-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines4h
Get 4h klines window
Fully-closed Binance spot candles at the 4h interval. Each file covers exactly 1 calendar quarter, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/4h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/4h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines4h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 4h window start date (1st of Jan/Apr/Jul/Oct, UTC). Window covers 1 calendar quarter.
startDate: "2017-07-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines6h
Get 6h klines window
Fully-closed Binance spot candles at the 6h interval. Each file covers exactly 6 months (Jan/Jul), anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/6h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/6h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines6h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 6h window start date (1st of Jan/Jul, UTC). Window covers 6 calendar months.
startDate: "2017-07-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines8h
Get 8h klines window
Fully-closed Binance spot candles at the 8h interval. Each file covers exactly 6 months (Jan/Jul), anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/8h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/8h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines8h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 8h window start date (1st of Jan/Jul, UTC). Window covers 6 calendar months.
startDate: "2017-07-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines12h
Get 12h klines window
Fully-closed Binance spot candles at the 12h interval. Each file covers exactly 1 calendar year, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/12h.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/12h/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines12h({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 12h window start date (1st of Jan, UTC). Window covers 1 calendar year.
startDate: "2017-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines1d
Get 1d klines window
Fully-closed Binance spot candles at the 1d interval. Each file covers exactly 2 calendar years, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/1d.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/1d/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines1d({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 1d window start date (1st of Jan, even years, UTC). Window covers 2 calendar years.
startDate: "2016-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines3d
Get 3d klines window
Fully-closed Binance spot candles at the 3d interval. Each file covers exactly 5 calendar years, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/3d.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/3d/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines3d({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 3d window start date (1st of Jan, every 5 years, UTC). Window covers 5 calendar years.
startDate: "2015-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines1w
Get 1w klines window
Fully-closed Binance spot candles at the 1w interval. Each file covers exactly 10 calendar years, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/1w.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/1w/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines1w({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 1w window start date (1st of Jan, every 10 years, UTC). Window covers 10 calendar years.
startDate: "2010-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/KLinesAPI.getKlines1M
Get 1M klines window
Fully-closed Binance spot candles at the 1M interval. Each file covers exactly 10 calendar years, anchored at the calendar boundary shown by startDate. Call GET /api/klines/start-dates/1M.json for the full list of valid startDates.
GET https://finom.github.io/static-klines/api/klines/1M/{symbol}/{startDate}.json
import { KLinesAPI } from 'static-klines';
const response = await KLinesAPI.getKlines1M({
params: {
// Trading pair (Binance spot symbol, hardcoded list of 10)
symbol: "BTCUSDT",
// 1M window start date (1st of Jan, every 10 years, UTC). Window covers 10 calendar years of monthly candles.
startDate: "2010-01-01"
},
apiRoot: 'https://finom.github.io/static-klines/api',
});
console.log(response);
/*
[
[
1514764800000,
"13715.65000000",
"13818.55000000",
"12750.00000000",
"13380.00000000",
"8609.91584400",
1514851199999,
"114799747.44197057",
105595,
"3961.93894600",
"52809747.44038045",
"0"
],
[
1514851200000,
"13382.16000000",
"15473.49000000",
"12890.02000000",
"14675.11000000",
"20078.09211100",
1514937599999,
"275545340.79810440",
197229,
"9915.30471600",
"136355703.49029400",
"0"
]
]
*/OpenAPI
OpenAPI.getSpec
OpenAPI 3.1 specification
Full OpenAPI document describing this API. Served at the API root so GET /api returns the spec directly.
GET https://finom.github.io/static-klines/api
import { OpenAPI } from 'static-klines';
const response = await OpenAPI.getSpec({
apiRoot: 'https://finom.github.io/static-klines/api',
});