Skip to main content

Storage engine for cryptocurrency data

Project description

License Python PyPi

A storage engine for cryptocurrency market data. You supply the exchanges, data type (trade, book, etc), and trading pairs you’re interested in and Cryptostore does the rest!

Stores data to:

Requirements

Cryptostore currently requires either Kafka or Redis to be installed. The extra dependencies for your backend of choice must be installed as well (eg pip install cryptostore[redis]). Redis requires Redis Streams, which is supported in versions >= 5.0.

Running Cryptostore

Once installed with pip, an executable is placed on the path, so you can simply run cryptostore to start the collector. It requires a config.yaml file. If its not in the current working directory, you can specify the path to the config with the --config option.

An example config, with documentation inline is provided in the root of the repository. The config file is monitored by cryptostore, so you can change the options in the file and it will apply them without the need to reload the service (this is experimental. If you encounter issues with it, please raise an issue).

Backfilling Trade Data

Cryptstore can backfill trade data - but be aware not all exchanges support historical trade data, and some only provide a limited amount. Backfill fills from the earliest date in data storage until the start date specified in the config. Backfill is restartable.

Running with other consumers

Cryptostore can operate with other consumers of the exchange data (eg. a trading engine consuming updates).

For Redis

  • Disable the message removal in the Redis settings in config.yaml. The other consumer will need to be responsible for message removal (if so desired), and it must ensure messages are not removed before cryptostore has had a chance to process them.

For Kafka

  • You need only supply a different consumer group id for the other consumers to ensure all consumers receive all messages. Kafka’s configuration controls the removal of committed messages in a topic (typically by time or size).

Running in a container

You can run Cryptostore in a docker container. A Dockerfile and a docker-compose.yml are provided. It uses the config in config-docker.yaml, and its set up to use redis and store the data into Arctic/MongoDB. The port is mapped to 37017 (as opposed to 27017) so when connecting to Arctic from outside the container make sure you specify the port. Additionally, a volume should be configured in the docker-compose so that the mongoDB data will persist across restarts.

Planned features

  • ☐ Missing data detection and correction (for exchanges that support historical data, typically only trade data)

  • ☐ Storing data to MongoDB

  • ☐ Support for enabling computation and storage of diverse metrics in parallel with data collection (eg. configurable OHLCV)

  • ☐ Support for forwarding data to another service/sink (eg. to a trading engine).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cryptostore-0.0.8-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file cryptostore-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: cryptostore-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for cryptostore-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0393e5c474e32cdadf268c8823ba800edf98e496d26385c054f92e2ae00e589
MD5 a79b4eef4c85a19f6c16b691da27c2cd
BLAKE2b-256 e4670323d7b6f913c98cb6c5460c9bd860ef09a145b2ba22da1e0043096c952a

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