Lake API
API for accessing Lake crypto market data.
Lake is a service providing historical cryptocurrency market data in high detail, including order book data, tick trades and 1m trade candles. It is tuned for convenient quant and machine-learning purposes and so offers high performance, caching and parallelization.
Documentation: https://lake-api.readthedocs.io.
Online example – executable collab notebook: https://colab.research.google.com/drive/1E7MSUT8xqYTMVLiq_rMBLNcZmI_KusK3
Usage
If you don’t have a paid plan with AWS credentials, you can access sample data:
import lakeapi
lakeapi.use_sample_data(anonymous_access = True)
df = lakeapi.load_data(
table="book",
start=None,
end=None,
symbols=["BTC-USDT"],
exchanges=["BINANCE"],
)
With paid access, you can query any data:
import lakeapi
# Downloads SOL-USDT depth snapshots for last 2 days from Kucoin exchange
df = lakeapi.load_data(
table="trades",
start=datetime.datetime.now() - datetime.timedelta(days=2),
end=None,
symbols=["SOL-USDT"],
exchanges=["KUCOIN"],
)
We recommend putting .lake_cache directory into .gitignore, because Lake API stores cache into this directory in the working directory.
History
0.22.3 (2025-11-02)
fix joblib issue with unexpected keyword argument ‘bytes_limit’
0.22.1 (2025-05-15)
fix list_data bug in last_modified_begin parameter
check for crossed bests in orderbook.py on day boundaries
0.22.0 (2025-05-08)
support multiple days in orderbook.py
0.21.0 (2025-05-04)
fix joblib issue with unexpected keyword argument ‘bytes_limit’
0.20.1 (2025-04-28)
fix UnboundLocalError in _get_table_contents_cache_key when non-existing table is passed
0.20.0 (2025-03-28)
new used_data function
clear cache on 404 to read new contents
0.19.1 (2024-12-16)
fix typing issues
0.19.0 (2024-09-09)
fix possible KeyError: ‘dt’ with list_data
0.18.0 (2024-08-21)
fix KeyError: ‘dt’ with s3 method
0.17.0 (2024-08-09)
orderbook class performance improvements
0.16.0 (2024-08-06)
improve data loading performance, especially for the first time
0.15.0 (2024-07-24)
fix conflict of new numpy 2 and older pyarrow
improve tox tests
add missing numba dependency needed by orderbook class (the rest works without numba)
0.14.0 (2023-05-02)
order book helper class
0.13.0 (2023-03-15)
fix old funding rates
0.12.1 (2023-11-22)
fix issue !6 with lowercase symbol names
better error when aws clients use free data sample (!7)
0.12.0 (2023-11-18)
option to disable cache
improved warnings handling
0.11.2 (2023-11-09)
fix order book data loading (KeyError: side)
0.11.1 (2023-11-06)
minor optimizations and fixes in cloudfront transfer
0.10.0 (2023-11-06)
more efficient optional data transfer implemented via aws cloudfront
0.9.1 (2023-11-03)
awswrangler dependency removed, pandas 2 support added
python3.12 support
0.8.0 (2023-09-18)
grow default cache size limit
nicer error messages when data are missing
pass and print warning when file is corrupted
0.7.0 (2023-09-18)
let user specify max cache size via lakeapi.set_cache_size_limit()
0.6.4 (2023-08-05)
too many open files bugfix
0.6.3 (2023-08-03)
logging fixes
0.6.2 (2023-08-18)
fix dependency constraints causing TypeError: _path2list() got an unexpected keyword argument ‘boto3_session’
0.6.1 (2023-08-15)
fix path2list bug
fix type hints
0.6.0 (2023-08-14)
support for python3.11
0.5.0 (2023-05-21)
support for funding, open_interest and liquidations list_data
improve data type typing
0.4.5 (2023-01-09)
grow default cache size limit from 3 GB to 10 GB
0.4.3 (2022-12-09)
small documentation improvements
0.4.2 (2022-12-09)
fix trades_mpid issue
0.4.1 (2022-12-05)
fix warning messages in anonymous mode
0.4.0 (2022-11-19)
level_1 data added to typing
s3 user agent set to lakeapi
0.3.0 (2022-11-04)
Typing bugfix
Last modified filters for list_data
0.2.0 (2022-10-26)
New feature for listing available data.
0.1.3 (2022-10-13)
Corrupted cache bugfix
0.1.2 (2022-10-10)
Caching and requirements improvements.
0.1.1 (2022-10-09)
Python2.7 support and documentation improvements.
0.1.0 (2022-10-08)
First release on PyPI.
Metadata
Release files for lakeapi 0.22.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lakeapi-0.22.3.tar.gz | 56.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lakeapi-0.22.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 109.6 kB
Release files / lakeapi-0.22.3.tar.gz
| Download URL | lakeapi-0.22.3.tar.gz |
|---|---|
| Size | 56.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8447aeee34321ab54b559ea3148877c1a712dfd03e350e043a14eee671133419
|
|
BLAKE2b-256 checksum How to use checksums |
13fedce861358d8f3a2936c9d63e976d79b5bd0bbe2b85e1933bbd8a1640a906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.14
|
Release files / lakeapi-0.22.3-py2.py3-none-any.whl
| Download URL | lakeapi-0.22.3-py2.py3-none-any.whl |
|---|---|
| Size | 52.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9cbb4c9f23c62a4a9831c920db6667d884117d1dbbaf1fcbbc0673b2641abf0b
|
|
BLAKE2b-256 checksum How to use checksums |
40ae700a45eec0e71bedb56f58c455f6bf7fbb7402a98fbb60e134dadc26d8cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.14
|
Security for lakeapi 0.22.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.