Skip to main content

API for accessing Lake crypto market data

Project description

Lake API

Pypi package status Documentation status Build status

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lakeapi-0.14.0.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

lakeapi-0.14.0-py2.py3-none-any.whl (51.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lakeapi-0.14.0.tar.gz.

File metadata

  • Download URL: lakeapi-0.14.0.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lakeapi-0.14.0.tar.gz
Algorithm Hash digest
SHA256 a63f9eab6470bd56715f34c6ecb262c361690d6d28013884cacfc3ef536766c3
MD5 c86fb571f90ed15b0cf499138e05bb99
BLAKE2b-256 e671fa0212d234fd3674c568ab6abf317f91a271d270f21fdeab2d47a0e3ae57

See more details on using hashes here.

File details

Details for the file lakeapi-0.14.0-py2.py3-none-any.whl.

File metadata

  • Download URL: lakeapi-0.14.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lakeapi-0.14.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e4986a2c5553a6caad0626e6881625556ff78e01a39afa71b346566fa43b36b5
MD5 6563e092d02f5c2bd9fec3fef7c3e24c
BLAKE2b-256 b619c5222d83bc7626345d30394c172df39b0faba12e6c036cbd2f33bd31e51f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page