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

Support old Kraken statement files #18

Closed
provinzio opened this issue Mar 5, 2021 · 3 comments · Fixed by #22
Closed

Support old Kraken statement files #18

provinzio opened this issue Mar 5, 2021 · 3 comments · Fixed by #22
Assignees
Labels
Book help wanted Extra attention is needed Kraken

Comments

@provinzio
Copy link
Owner

provinzio commented Mar 5, 2021

The Kraken ledger file changed over the years. While current Kraken users may be able to generate a fresh statement (in the supported format), we could adjust our code, to support old files.

@provinzio provinzio added help wanted Extra attention is needed Kraken Book labels Mar 5, 2021
@wearymanateevedaknotstabooresisting
Copy link
Contributor

wearymanateevedaknotstabooresisting commented Mar 6, 2021

Experienced Behavior

Trying to import Kraken account statements from September 2020 and before results in non-recognition of the Kraken export files.

Desired Behavior

Kraken account statements should be processable, regardless if they are in October 2020 format or September 2020 format. The files should be recognized for import and include all ledger entries and trades.

Possible Reason for Bug

Kraken changed the columns on their account statement export files, adding one additional column in ledger.csv as well as trades.csv. The additional columns are already respected by src/book.py through column names "" and "subtype". However, they are regarded as required by the code. Therefore, if no all required columns are present, the account statement type is not regarded as valid Kraken file.

Actually, "" is a bug in the implementation since this empty column is not present in real exports.

Possible Solution

  • Determine, what columns are mandatory for tax calculation of various tax laws.
  • Determine, if there are additional, non-mandatory fields in exported account statements of exchanges.
  • Minimize imported account statement information to the absolutely required fields for tax calculation.

Another quick fix would be neglecting the "" and "subtype" columns by removing them from src/book.py since they are not used anyway, expect for a processing line without functionality with respect to the subtype column.

Hint

When importing without those columns, Kraken exchange has another issue finding prices of certain times for certain pairs, see #17.

Valid importing also works by just using a fresh Kraken export. However, users who do not have access to their account anymore can not use their old statements. A work around by inserting new columns may lead to invalid datatypes if not done properly (correct Excel DE/EN configurations, CSV importing and exporting or Python fiddling which may be non-trivial for the common user).

Attachements

These are .csv files, extension is not supported for upload by GitHub, thus using artificial .txt. Stupid rule.

Repository owner deleted a comment from wearymanateevedaknotstabooresisting Mar 6, 2021
@wearymanateevedaknotstabooresisting
Copy link
Contributor

wearymanateevedaknotstabooresisting commented Mar 6, 2021

Recognized, that kraken_trades actually had a bug in the implementation, since the empty column "" is not present in todays exports. So only ledgers is affected, with the added "subtype" by Kraken.

Above comment with detailed explanation has been adjusted.

@wearymanateevedaknotstabooresisting
Copy link
Contributor

I went through all my exports and found that the change of ledgers export format, by adding subtype, occurred in October 2020.

provinzio added a commit that referenced this issue Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Book help wanted Extra attention is needed Kraken
Projects
None yet
2 participants