Skip to main content

No project description provided

Project description

LoCaSt

Local Candle Store - A module to download price candles from exchanges and store them in a database.

Intro

LoCaSt handles candle data in a very straight forward manner:

  • There is one underlying Candle type to hold the relevant data of a price candle.
  • A group of such Candle objects is collected into a cluster, which is simply a List[Candle].
  • These clusters are written into an sqlite database and can be updated as needed.

Cluster

A cluster is a list of candle objects, representing a time series of price data. Per exchange (e.g.: dydx v4), market (e.g.: ETH) and resolution (e.g.: One minute), there can be exactly one cluster in the database. A cluster can be interacted with in the following ways.

Currently implemented

Features

  • Create cluster
  • Retrieve cluster
  • Retrieve n newest candles of a cluster
  • Update cluster
  • Delete cluster
  • Get info about cluster
    • newest candle
    • oldest candle
    • size of cluster (amount of candles it entails)
    • wether it is up to date or not
  • ... more to come

Exchanges

  • dydx v4

Storage Technologies

  • Sqlite

Examples

In the notebooks directory there are examples of the already implemented exchanges (starting with "example_"). This is a good starting point to try out and play around.

Collaboration

Here are some ideas and guidelines for collaboration.

Goals

  • Implement additional exchanges
  • Implement additional storage technologies, if desired
  • Improve code quality and maintainability
  • Help each other out and have a great time adding features :-)

Branches

There are two branches:

  • Main:
    • Expects pull requests from collaborators.
    • Pushing will trigger a unit test workflow
  • Release:
    • Is handled by maintainer to merge main into and update version number
    • Pushing will trigger the same unit test workflow and additionally publish to pypi.org

Code

This project tries to maintain readable and simple code.

Basic principles like DRY and separation of concerns are mandatory - but following patterns dogmatically is not desired at all.

In fact this project shall be a collaborative effort in which developers interested in it, can learn from each other and discuss their ideas and solutions.

Appart from that it is a tool for anybody who needs historic and current candle data available locally, without the hassle of talking to exchange APIs.

Contribute

To contribute, just make pull requests on main.

There are COLLABORATION markers throughout the test suite to mark and explain places that are relevant for new implementations. The general idea is to not require new implementations to come up with their unit and/or integration tests, but rather include their mock and production implementations through parametrization and fixtures in the existing test suite. This has the advantage of not having to write tests again and again but also enforces the behavior of new implementations to be identical to existing ones.

For example if we implement a new candle fetcher for the 1inch API, it can be implemented in what ever way is best - but it should behave exactly the same as the existing dydx implementations, which is enforced by the typing annotations and then verified by the parametrized test suite.

Of course if new test cases arise, they most certainly should be implemented for all existing implementations as well or at least deserve their own test file per exchange implementation.

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

locast-0.1.7.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

locast-0.1.7-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file locast-0.1.7.tar.gz.

File metadata

  • Download URL: locast-0.1.7.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for locast-0.1.7.tar.gz
Algorithm Hash digest
SHA256 bfbde9a17e1d93645d17737ad03280cef3d6cd016e1a918a1aa3f50ff1eae616
MD5 0f072459d4bf1d198119a90d2a047ecc
BLAKE2b-256 1669f3cbd9a9484ad0f18d0475d1d64c32d5be78333d333b6866f14eee2e2dc8

See more details on using hashes here.

File details

Details for the file locast-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: locast-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for locast-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9344f872aac7f0baebbb86e46d03d0712cf2e8de9740b751b4b91fe68e5cfa3a
MD5 bb3d1fcb22fa89201af5b0c10748a2b2
BLAKE2b-256 cc96435ff9802d87170b8c34cdc0ac5cb3bd1de29016652b988e9d23135e9a1c

See more details on using hashes here.

Supported by

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