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
66 stars 42 forks source link

Transaction Type - RECEIVE and SPEND <Kraken REST> #235

Open ps23Rick opened 7 months ago

ps23Rick commented 7 months ago

I'm trying rp2 for the first time primarily with Kraken's REST api.. it initially runs and connects to Kraken without issue but when chewing on the data it coughs up two transaction types that it can't handle:

ERROR: Unsupported transaction type: receive (skipping): {'aclass': 'currency', 'amount': '<amount>', 'asset': 'LUNA', 'balance': '<balance>', 'fee': '0.00000000', 'refid': '<refid>', 'time': '1701831465.3632329', 'type': 'receive', 'subtype': ''}. Please open an issue at https://github.com/eprbell/dali-rp2/issues ERROR: Unsupported transaction type: spend (skipping): {'aclass': 'currency', 'amount': '<amount>', 'asset': 'ZUSD', 'balance': '0.0089', 'fee': '1.1100', 'refid': '<refid>', 'time': '1701831465.3632302', 'type': 'spend', 'subtype': ''}. Please open an issue at https://github.com/eprbell/dali-rp2/issues

I have swapped a few bits of information to be things like , , -- otherwise it's what was spat out on the console.

eprbell commented 7 months ago

Thanks for reporting. It looks like there's a missing bit of implementation in the Kraken plugin. I don't have a Kraken account so I can't fix it, but I marked this as "help wanted": hopefully someone with a Kraken account can step in and help out.

ps23Rick commented 7 months ago

Thanks.. if someone can steer me I can give it a shot.. I’m not so great with python but if someone reviews any code changes, that might be do-able.

------ Original Message ------ From "eprbell" @.> To "eprbell/dali-rp2" @.> Cc "RickF" @.>; "Author" @.> Date 4/10/2024 8:44:53 PM Subject Re: [eprbell/dali-rp2] Transaction Type - RECEIVE and SPEND

(Issue #235) > >Thanks for reporting. It looks like there's a missing bit of >implementation in the Kraken plugin. I don't have a Kraken account so I >can't fix it, but I marked this as "help wanted": hopefully someone >with a Kraken account can step in and help out. > >— >Reply to this email directly, view it on GitHub >, >or unsubscribe >. >You are receiving this because you authored the thread.Message ID: >***@***.***> >
eprbell commented 7 months ago

All pointers to get started are here: https://github.com/eprbell/dali-rp2/issues/1. You can open a PR and start working there: we'll review it. Feel free to ask questions if anything is unclear.

CC: @ndopencode, who worked on the plugin.

ps23Rick commented 7 months ago

So, just to add a little background to this issue. I was able to review my transactions via the Kraken website, looking for the RECEIVE and SPEND transaction types.

I was able to find them and there's exactly 1 of each for my entire set of transaction history..

I was not able to find the API docs discussing these API responses and reached out to Kraken support. Below is what I got back from them. Maybe it will be helpful to others looking into the Kraken API...

Instant buys are represented in Ledgers export as spend and receive types. These transactions are distinguished separately from trades, and do not appear in your trades history. Instead, instant purchases can be found within your Ledger history.

These transactions can also be queried via the Ledgers API endpoint

Please see this support article, How to interpret Ledger history fields for more information on other possible parameters.