eprbell / dali-rp2

DaLI (Data Loader Interface) is a data loader and input generator for RP2 (https://pypi.org/project/rp2), the privacy-focused, free, open-source cryptocurrency tax calculator: DaLI removes the need to manually prepare RP2 input files. Just like RP2, DaLI is also free, open-source and it prioritizes user privacy.
https://pypi.org/project/dali-rp2/
Apache License 2.0
65 stars 42 forks source link

Implement Kraken REST API data loader plugin #1

Open eprbell opened 2 years ago

eprbell commented 2 years ago

Writing a DaLI data loader plugin has high impact on the functionality and usefulness of both DaLI and RP2. Data loader plugins are well-defined, encapsulated modules that translate native exchange REST API-based data into DaLI's standard format. As such they are good first issues for newcomers to the the project.

Before starting, please read the contributing guidelines.

Plugin development is described in the developer documentation, in particular read the Dali Internals and Plugin Development sections, which contain all the information needed to build a new data loader plugin.

Kraken REST API is documented here: https://docs.kraken.com/rest/

The Coinbase plugin can be used as an example.

Before submitting a PR for the new plugin, make sure to go through the DaLI Plugin Laundry List.

nitrocode commented 2 years ago

I noticed that the coinbase plugin doesn't use a client library like these

https://developers.coinbase.com/docs/wallet/client-libraries

For Kraken, could we use something like https://github.com/veox/python3-krakenex ?

macanudo527 commented 2 years ago

@nitrocode issue #22 deals with implementing an abstract CCXT plugin that can be used to leverage the CCXT library that has support for numerous exchanges. I've already started work making use of the CCXT plugin for the Binance plugin #4 . I think @eprbell wants to avoid a lot of dependencies, so krakenex is probably out, but CCXT probably has enough functionality for you.

eprbell commented 2 years ago

I second what @macanudo527 said. We are experimenting with CCXT, which hopefully has all the functionality we need both in the abstract class and in subclasses like Kraken and Binance. If we were to discover some bad limitation in CCXT then we'll need to revisit this decision and perhaps we will have to go back to using libraries like python3-krakenex, but hopefully CCXT works well and we won't have to. Coinbase and Coinbase Pro were the first plugins I wrote and they started off as proof of concept: I wanted to use the raw API to understand fully the flow. But if CCXT works well even CB and CB Pro should probably be rewritten with that API at some point (not urgent).

eprbell commented 2 years ago

BTW, @nitrocode a Kraken plugin would be very impactful: let me know if you would like to take on this issue.

ndopencode commented 1 year ago

Not sure, am I allowed (have permission) to push my branch up to this repo? What name should I give the branch? Thanks!

eprbell commented 1 year ago

You'll need to create a PR. You can fork dali-rp2 and then follow these instructions: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

ndopencode commented 1 year ago

aye - didn't mean to ask twice, I thought there was no response on this thread. I didn't see a notification... my mistake

eprbell commented 1 year ago

It's all good, no worries.