Metadata-Version: 2.4
Name: static_klines
Version: 0.1.8
Summary: 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.
Project-URL: Homepage, https://finom.github.io/static-klines/
Project-URL: Source, https://github.com/finom/static-klines.git
Project-URL: Issues, https://github.com/finom/static-klines/issues
Author: Andrey Gubanov
License: MIT
Keywords: binance,candles,crypto,klines,ohlcv,vovk
Requires-Python: >=3.8
Requires-Dist: jsonschema
Requires-Dist: requests
Requires-Dist: rfc3987
Requires-Dist: urllib3==1.26.15
Provides-Extra: dev
Requires-Dist: types-jsonschema; extra == 'dev'
Requires-Dist: types-requests; extra == 'dev'
Description-Content-Type: text/markdown

<!-- Generated by vovk-cli v0.1.2 at 2026-04-21T19:27:26.526Z -->
# static_klines v0.1.8 [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![Vovk.ts](https://badgen.net/badge/Built%20with/Vovk.ts/333333?icon=https://vovk.dev/icon-white.svg)](https://vovk.dev)


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**

```bash
# Install the package
pip install static_klines
```



## KLinesAPI
        
### KLinesAPI.get_symbols
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_symbols(
    api_root="https://finom.github.io/static-klines/api",
)

print(response)
[
    "BTCUSDT",
    "ETHUSDT",
    "BNBUSDT",
    "SOLUSDT",
    "XRPUSDT",
    "ADAUSDT",
    "DOGEUSDT",
    "AVAXUSDT",
    "LINKUSDT",
    "DOTUSDT"
]
```
        
### KLinesAPI.get_start_dates
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_start_dates(
    params={
        # Binance kline interval code
        "interval": "15m"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(response)
[
    "2024-01-01",
    "2024-02-01",
    "2024-03-01",
    "2024-04-01"
]
```
        
### KLinesAPI.get_klines_15_m
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines15m(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_30_m
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines30m(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_1_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines1h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_2_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines2h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_4_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines4h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_6_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines6h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_8_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines8h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_12_h
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines12h(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_1_d
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines1d(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_3_d
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines3d(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_1_w
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines1w(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_klines_1_m
> 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`

```py
from static_klines import KLinesAPI

response = KLinesAPI.get_klines1_m(
    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"
    },
    api_root="https://finom.github.io/static-klines/api",
)

print(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.get_spec
> 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`

```py
from static_klines import OpenAPI

response = OpenAPI.get_spec(
    api_root="https://finom.github.io/static-klines/api",
)
```
        
    

