https://github.com/r2stanton/kracked
Efficiency-first framework for pulling, storing, and aggregating Kraken data using the v2 API.
https://github.com/r2stanton/kracked
algorithmic-trading cryptocurrency kraken market-data quantitative-finance sql
Last synced: 12 days ago
JSON representation
Efficiency-first framework for pulling, storing, and aggregating Kraken data using the v2 API.
- Host: GitHub
- URL: https://github.com/r2stanton/kracked
- Owner: r2stanton
- License: gpl-3.0
- Created: 2024-09-23T04:13:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-27T23:37:39.000Z (about 2 months ago)
- Last Synced: 2026-02-28T05:00:04.676Z (about 2 months ago)
- Topics: algorithmic-trading, cryptocurrency, kraken, market-data, quantitative-finance, sql
- Language: Python
- Homepage:
- Size: 460 KB
- Stars: 31
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kracked
Efficiency-first framework for pulling, storing, and aggregating Kraken data
using the v2 API.
1. All market data is avaiable through WebSocket subscription using this package
by leveraging the Kraken v2 API (see for example [their excellent API](https://docs.kraken.com/api/docs/websocket-v2/add_order)).
2. See the code or the example files for a general overview of the type of files
that will be created for you upon subscription to the data feeds.
3. Order placement (for now) relies on the REST API. See below in the Usage
section.
## Installation
Soon I will push the published code to the PyPI, allowing for you to run
```pip install kracked```
However in the meanwhile, simply clone the repository, navigate to the folder with `setup.py` and run
```pip install -e .``` for an editable install.
## Comments
The `kracked` package is still in pre-release and should be considered highly
experimental. Do not build out any excessively time-intensive routines using
the package as many things are subject to change (in the near future). The code
is relased AS-IS and the developers are not responsible for any bugs,
misbehavior of the code, or anything of the sort. Any loss of funds resulting from
the utilization of this code is 100% the responsibilty of the user.
## Usage
Users can find a set of example scripts in the examples folder. A couple notes
about using these files.
1. Ensure that your outputs correspond (qualitatively) to those in the `ex_out/`
folder if you are using the single-threaded approaches in the `examples/` folder.
2. `kracked` supports multithreaded feeds using the `kracked/manager.py` module. If
you choose to use this approach, ensure that your outputs correspond (again
qualitatively) to those in `examples/ex_multifeed_out/`. This makes it simple to
spin up a feed subscribing to multiple Kraken v2 API endpoints using a single
core. See the `multifeed_examples.py` file.
***IMPORTANT*** See the logic in `multifeed_examples.py` for a way to have the connections automatically
reconnect to the Websocket in the event of one feed timing out.
4. Examples of how to load and parse the data are available in the
`example_data_loading.ipynb` files. These are for the older .csv formats, but shortly I'll update these
with the parquet I/O.
6. For now, order execution simply relies on the CCXT->Kraken REST API. This
will change in the near future, but keep in mind that ANY algorithmic trading
strategies are 100% subject to be rendered incompatible with EITHER changes in
CCXT, or changes associated with order placement using the Kraken REST API.
## Webapp
Check back soon for more information on the webapp. I'll be integrating features for tracking
live performance, multiple symbols and the like. For now, consider it highly experimental, but
feel free to play with the app.py files/settings. It can currently visualize the live L2 book,
price data, spread, and any entries/exits associated wtih algorithmic trading strategies. This
element is subject to potentially being moved to its own package at some point if it can be
sufficiently well generalized to different data sources.
**WARNING** The webapp is not up to date with the current feed defaults. I am in the process of transitioning this to a bokeh app.