Closed provinzio closed 3 years ago
Trying to import Kraken account statements from September 2020 and before results in non-recognition of the Kraken export files.
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.
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.
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.
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).
These are .csv
files, extension is not supported for upload by GitHub, thus using artificial .txt
. Stupid rule.
Dummy Columns of old export type from September 2020 and before:
Dummy columns of new export type from 2020 up to date:
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.
I went through all my exports and found that the change of ledgers export format, by adding subtype
, occurred in October 2020.
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.