========
Lake API
========
.. image:: https://img.shields.io/pypi/v/lakeapi.svg
:target: https://pypi.python.org/pypi/lakeapi
:alt: Pypi package status
.. image:: https://readthedocs.org/projects/lake-api/badge/?version=latest
:target: https://lake-api.readthedocs.io/en/latest/?version=latest
:alt: Documentation status
.. image:: https://github.com/crypto-lake/lake-api/actions/workflows/dev.yml/badge.svg
:target: https://github.com/crypto-lake/lake-api/actions/workflows/dev.yml
:alt: Build status
API for accessing Lake crypto market data.
Lake is a service providing `historical cryptocurrency market data <https://crypto-lake.com/>`_ in high detail, including `order book data <https://crypto-lake.com/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.
* Web: https://crypto-lake.com/
* 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:
.. code-block:: python
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:
.. code-block:: python
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.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.
Raw data
{
"_id": null,
"home_page": "https://github.com/crypto-lake/lake-api",
"name": "lakeapi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "lakeapi",
"author": "Jan Skoda",
"author_email": "skoda@jskoda.cz",
"download_url": "https://files.pythonhosted.org/packages/0a/47/ee9cda2093b78928987d79dcb4a1122cc0503b681b0537b4580526048c65/lakeapi-0.19.1.tar.gz",
"platform": null,
"description": "========\nLake API\n========\n\n\n.. image:: https://img.shields.io/pypi/v/lakeapi.svg\n :target: https://pypi.python.org/pypi/lakeapi\n :alt: Pypi package status\n\n.. image:: https://readthedocs.org/projects/lake-api/badge/?version=latest\n :target: https://lake-api.readthedocs.io/en/latest/?version=latest\n :alt: Documentation status\n\n.. image:: https://github.com/crypto-lake/lake-api/actions/workflows/dev.yml/badge.svg\n :target: https://github.com/crypto-lake/lake-api/actions/workflows/dev.yml\n :alt: Build status\n\n\nAPI for accessing Lake crypto market data.\n\nLake is a service providing `historical cryptocurrency market data <https://crypto-lake.com/>`_ in high detail, including `order book data <https://crypto-lake.com/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.\n\n\n* Web: https://crypto-lake.com/\n* Documentation: https://lake-api.readthedocs.io.\n* Online example -- executable collab notebook: https://colab.research.google.com/drive/1E7MSUT8xqYTMVLiq_rMBLNcZmI_KusK3\n\n\nUsage\n-----\n\nIf you don't have a paid plan with AWS credentials, you can access sample data:\n\n.. code-block:: python\n\n import lakeapi\n\n lakeapi.use_sample_data(anonymous_access = True)\n\n df = lakeapi.load_data(\n table=\"book\",\n start=None,\n end=None,\n symbols=[\"BTC-USDT\"],\n exchanges=[\"BINANCE\"],\n )\n\n\nWith paid access, you can query any data:\n\n.. code-block:: python\n\n import lakeapi\n\n # Downloads SOL-USDT depth snapshots for last 2 days from Kucoin exchange\n df = lakeapi.load_data(\n table=\"trades\",\n start=datetime.datetime.now() - datetime.timedelta(days=2),\n end=None,\n symbols=[\"SOL-USDT\"],\n exchanges=[\"KUCOIN\"],\n )\n\nWe recommend putting .lake_cache directory into .gitignore, because Lake API stores cache into this directory in the\nworking directory.\n\n\n=======\nHistory\n=======\n\n0.19.1 (2024-12-16)\n-------------------\n\n* fix typing issues\n\n0.19.0 (2024-09-09)\n-------------------\n\n* fix possible KeyError: 'dt' with list_data\n\n0.18.0 (2024-08-21)\n-------------------\n\n* fix KeyError: 'dt' with s3 method\n\n0.17.0 (2024-08-09)\n-------------------\n\n* orderbook class performance improvements\n\n0.16.0 (2024-08-06)\n-------------------\n\n* improve data loading performance, especially for the first time\n\n0.15.0 (2024-07-24)\n-------------------\n\n* fix conflict of new numpy 2 and older pyarrow\n* improve tox tests\n* add missing numba dependency needed by orderbook class (the rest works without numba)\n\n0.14.0 (2023-05-02)\n-------------------\n\n* order book helper class\n\n0.13.0 (2023-03-15)\n-------------------\n\n* fix old funding rates\n\n0.12.1 (2023-11-22)\n-------------------\n\n* fix issue !6 with lowercase symbol names\n* better error when aws clients use free data sample (!7)\n\n0.12.0 (2023-11-18)\n-------------------\n\n* option to disable cache\n* improved warnings handling\n\n0.11.2 (2023-11-09)\n-------------------\n\n* fix order book data loading (KeyError: side)\n\n0.11.1 (2023-11-06)\n-------------------\n\n* minor optimizations and fixes in cloudfront transfer\n\n0.10.0 (2023-11-06)\n-------------------\n\n* more efficient optional data transfer implemented via aws cloudfront\n\n0.9.1 (2023-11-03)\n------------------\n\n* awswrangler dependency removed, pandas 2 support added\n* python3.12 support\n\n0.8.0 (2023-09-18)\n------------------\n\n* grow default cache size limit\n* nicer error messages when data are missing\n* pass and print warning when file is corrupted\n\n0.7.0 (2023-09-18)\n------------------\n\n* let user specify max cache size via `lakeapi.set_cache_size_limit()`\n\n0.6.4 (2023-08-05)\n------------------\n\n* too many open files bugfix\n\n0.6.3 (2023-08-03)\n------------------\n\n* logging fixes\n\n0.6.2 (2023-08-18)\n------------------\n\n* fix dependency constraints causing `TypeError: _path2list() got an unexpected keyword argument 'boto3_session'`\n\n0.6.1 (2023-08-15)\n------------------\n\n* fix path2list bug\n* fix type hints\n\n0.6.0 (2023-08-14)\n------------------\n\n* support for python3.11\n\n0.5.0 (2023-05-21)\n------------------\n\n* support for funding, open_interest and liquidations list_data\n* improve data type typing\n\n0.4.5 (2023-01-09)\n------------------\n\n* grow default cache size limit from 3 GB to 10 GB\n\n0.4.3 (2022-12-09)\n------------------\n\n* small documentation improvements\n\n0.4.2 (2022-12-09)\n------------------\n\n* fix trades_mpid issue\n\n0.4.1 (2022-12-05)\n------------------\n\n* fix warning messages in anonymous mode\n\n0.4.0 (2022-11-19)\n------------------\n\n* level_1 data added to typing\n* s3 user agent set to lakeapi\n\n0.3.0 (2022-11-04)\n------------------\n\n* Typing bugfix\n* Last modified filters for list_data\n\n0.2.0 (2022-10-26)\n------------------\n\n* New feature for listing available data.\n\n0.1.3 (2022-10-13)\n------------------\n\n* Corrupted cache bugfix\n\n0.1.2 (2022-10-10)\n------------------\n\n* Caching and requirements improvements.\n\n0.1.1 (2022-10-09)\n------------------\n\n* Python2.7 support and documentation improvements.\n\n0.1.0 (2022-10-08)\n------------------\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "Apache 2 license",
"summary": "API for accessing Lake crypto market data",
"version": "0.19.1",
"project_urls": {
"Homepage": "https://github.com/crypto-lake/lake-api"
},
"split_keywords": [
"lakeapi"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ebd2a5bc57bd82a0315b5729f4bed10dd6ce1a44c2ed980bd968bbe20dd1f96c",
"md5": "f4f22edbc5525f04a68423adb248c180",
"sha256": "c6725ab9c48914be08a96507a53e79359ce7171e427d9cdb3561d6f1e4525cb9"
},
"downloads": -1,
"filename": "lakeapi-0.19.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f4f22edbc5525f04a68423adb248c180",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 51967,
"upload_time": "2024-12-16T08:51:02",
"upload_time_iso_8601": "2024-12-16T08:51:02.206918Z",
"url": "https://files.pythonhosted.org/packages/eb/d2/a5bc57bd82a0315b5729f4bed10dd6ce1a44c2ed980bd968bbe20dd1f96c/lakeapi-0.19.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a47ee9cda2093b78928987d79dcb4a1122cc0503b681b0537b4580526048c65",
"md5": "90952a030fd9a0844bad68e78335bdbc",
"sha256": "dd5b739a856a6ffd75a3a49a87925adba8f3c0759b8972f5732979d0d04396e4"
},
"downloads": -1,
"filename": "lakeapi-0.19.1.tar.gz",
"has_sig": false,
"md5_digest": "90952a030fd9a0844bad68e78335bdbc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 55780,
"upload_time": "2024-12-16T08:51:05",
"upload_time_iso_8601": "2024-12-16T08:51:05.108831Z",
"url": "https://files.pythonhosted.org/packages/0a/47/ee9cda2093b78928987d79dcb4a1122cc0503b681b0537b4580526048c65/lakeapi-0.19.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 08:51:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "crypto-lake",
"github_project": "lake-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "bump2version",
"specs": [
[
"==",
"0.5.11"
]
]
},
{
"name": "flake8",
"specs": [
[
"==",
"3.7.8"
]
]
},
{
"name": "tox",
"specs": [
[
"==",
"3.26.0"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"4.5.4"
]
]
},
{
"name": "Sphinx",
"specs": [
[
"==",
"5.2.3"
]
]
},
{
"name": "twine",
"specs": [
[
"==",
"5.1.1"
]
]
},
{
"name": "twine",
"specs": [
[
"==",
"4.0.2"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"7.1.3"
]
]
},
{
"name": "pytest-benchmark",
"specs": [
[
"==",
"4.0.0"
]
]
},
{
"name": "numba",
"specs": []
},
{
"name": "numba",
"specs": [
[
"==",
"0.60.0"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.4.0"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"2.0.3"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"2.1.4"
]
]
},
{
"name": "boto3",
"specs": [
[
"==",
"1.24.89"
]
]
},
{
"name": "cachetools_ext",
"specs": [
[
"==",
"0.0.8"
]
]
},
{
"name": "botocache",
"specs": [
[
"==",
"0.0.4"
]
]
},
{
"name": "joblib",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.64.1"
]
]
},
{
"name": "pyarrow",
"specs": [
[
"==",
"12.0.0"
]
]
},
{
"name": "pyarrow",
"specs": [
[
"==",
"14.0.0"
]
]
},
{
"name": "aws-requests-auth",
"specs": [
[
"==",
"0.4.3"
]
]
},
{
"name": "setuptools",
"specs": []
}
],
"tox": true,
"lcname": "lakeapi"
}