Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kraken REST plugin bugs #219

Open
orientalperil opened this issue Jan 2, 2024 · 3 comments
Open

Kraken REST plugin bugs #219

orientalperil opened this issue Jan 2, 2024 · 3 comments

Comments

@orientalperil
Copy link

orientalperil commented Jan 2, 2024

  1. When I run dali with --read-spot-price-from-web it finds a deposit of USD as an intra transaction from USD to USD so it tries to find the spot price which will fail. This happens because the transactions do not have unique IDs. The Kraken unique IDs are being put in the notes column so maybe moving them to the Unique Id column can stop this from happening.

  2. In Kraken fees can be paid in fiat or in crypto. When they are paid in crypto the code in the plugin works correctly i.e. the trade cost field includes the fee. When the fee is paid in fiat it is the opposite: the value in the fiat_in_with_fee column is actually the value that should be in the fiat_in_no_fee column. The plugin is reading from the trade cost field as fiat_in_with_fee when in reality it should be fiat_in_no_fee (and actually you should use the ledger data not the trade data). The fee is then subtracted from the cost producing a value for fiat_in_no_fee which is TOTALLY WRONG.

  3. The plugin is using the trade history to make transactions. The Kraken trade history is not the actual data that is applied to balances. That would be the ledger data. The trade cost field for fiat for example has 5 decimal places while the corresponding ledger entry has 4 decimal places. This throws off the values when compared to the Kraken ledger.

@eprbell
Copy link
Owner

eprbell commented Jan 3, 2024

CC: @ndopencode, who worked on the plugin. Also, feel free to submit PRs, if you're so inclined.

@ndopencode
Copy link
Contributor

@orientalperil Thanks for bringing this to my attention. I think the proposed fixes are doable. I'll make time to fix though I'm currently managing IRL obligations. These are all good points and I appreciate the time you took to review the code.

@ndopencode
Copy link
Contributor

@orientalperil For points 2 and 3, are you suggesting to drop from 5 decimal points of precision down to 4?

Additionally, about the fee calculation in fiat transactions and the potential mix-up between fiat_in_with_fee and fiat_in_no_fee, your observation is intriguing. Are there specific instances where this issue becomes more apparent? I'm also interested in understanding how Kraken fills these fields in different contexts, as the approach I used might be influenced by the data I had access to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants