Skip to main content

Cryptostore

License Python PyPi Codacy Badge

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!

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 only applies to changes made to data within the exchanges block. Other changes will be ignored.

Storing data

Stores data to:

  • Arctic

  • InfluxDB

  • Elasticsearch

  • Parquet, either on your local drive, or in the cloud using:

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

With a pass through

  • Cryptostore supports forwarding realtime data using ZeroMQ. To enable, use the pass_through option in the config. Data will be sent in real time (not subject to aggregation in redis/kafka). This can be used with or without data aggregation and storage.

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

  • ☐ More data types (eg. open interest)

  • ☐ Postgres support

  • ☐ 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)

Contributing

Issues and PRs are welcomed. If you’d like to discuss ongoing development please join the slack (use the #cryptostore channel).

Metadata

Release files for cryptostore 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cryptostore 0.4.0
File Interpreter ABI Platform
cryptostore-0.4.0-py3.9.egg Legacy Egg format - - Details
cryptostore-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 108.2 kB

Release files / cryptostore-0.4.0-py3.9.egg

Download URL cryptostore-0.4.0-py3.9.egg
Size 73.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
d8091f27a95e0ca7485da13f324afbfe0b7cfe33f461f704a995b95872247e5f
BLAKE2b-256 checksum
How to use checksums
3d9e29b55fea295ca9e66eb23bd623f5935c6d97f8d292221de14e9e0612d20f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / cryptostore-0.4.0-py3-none-any.whl

Download URL cryptostore-0.4.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f39bfdea8bbaef12d95367739e94c85331dde01936578076c7be012e021ec8d2
BLAKE2b-256 checksum
How to use checksums
66b004909739a656d47c1324a859c9194451fa89a3cb9fada98298c78a5da8dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page