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 for Cointracking.info import #158

Closed
jameskitt616 opened this issue Jan 10, 2025 · 20 comments · Fixed by #166
Closed

Support for Cointracking.info import #158

jameskitt616 opened this issue Jan 10, 2025 · 20 comments · Fixed by #166
Assignees
Labels
CoinTracking.info Related to CoinTracking.info New broker Request support for a new broker

Comments

@jameskitt616
Copy link

Enabling support for https://cointracking.info/ would be a great option for people who wrote down their trades for years there.

@dickwolff
Copy link
Owner

Thanks for the request! Do you have a sample export that I can use to build this?

@dickwolff dickwolff added the New broker Request support for a new broker label Jan 10, 2025
@jameskitt616
Copy link
Author

jameskitt616 commented Jan 11, 2025

CoinTracking_Trade_Table_export_example.csv
I created some Test account there and added a few random Trades/Deposits/Withdrawals, since there are so many different types, i only did some few basic ones. If needed i could go through everyone and create an entry for every of these if wished
image

@dickwolff dickwolff added the CoinTracking.info Related to CoinTracking.info label Jan 18, 2025
@dickwolff
Copy link
Owner

I created an initial version of the converter based on the example you provided. This now supports buy and sell records. I think staking rewards can also be added (like dividends). Can you create staking reward transaction and send it to me, so I can add it? Thanks!

Also, here is a version of the converter. Can you test it for me?

Finally, can you provide me with instructions on how to make a CSV export, so I can add this to the README?

@dickwolff dickwolff added the Waiting for input Waiting for more input to get a sense of the issue label Jan 18, 2025
@jameskitt616
Copy link
Author

CoinTracking Trade Table Test.csv

Here is a new export, i added an Income -> Staking example.

Further will follow shortly.
I can setup some Test environment for Ghost and the importer later and see if everything works as i would expect it.
Also send instructions on how to Make an export.

@jameskitt616
Copy link
Author

jameskitt616 commented Jan 18, 2025

How to make an export

  1. Go to the Transactions section.

Image

  1. Click the Export -> CSV (Full Export) Button to Download the Export.

Image

@dickwolff
Copy link
Owner

Thanks, I will add the staking tonight, as well as updating the README. I'm looking forward to your test results!

@dickwolff dickwolff removed the Waiting for input Waiting for more input to get a sense of the issue label Jan 18, 2025
@jameskitt616
Copy link
Author

So for the first file i posted, the import seemed to work fine, but the second file i posted today throws an exception when converting.

export-to-ghostfolio  | [i] Found Test_new.csv!
export-to-ghostfolio  | [i] Determined the file type to be of kind 'cointracking'.
export-to-ghostfolio  | [i] Starting Export to Ghostfolio v0.23.0
export-to-ghostfolio  | [i] Restored 0 ISIN-symbol pairs and 1 symbols from cache..
export-to-ghostfolio  | [i] Processing file using CoinTracking converter
export-to-ghostfolio  | [e] An error ocurred while processing.
export-to-ghostfolio  | [e] Error: An error ocurred while parsing! Details: Invalid Record Length: columns length is 12, got 11 on line 2
export-to-ghostfolio  | [e] Moving file to output..

@dickwolff
Copy link
Owner

This means your second file has more columns then currently expected. Can you send me a part of this new file so I can check?

@jameskitt616
Copy link
Author

CoinTracking Trade Table Test.csv

Here is a new export, i added an Income -> Staking example.

Further will follow shortly. I can setup some Test environment for Ghost and the importer later and see if everything works as i would expect it. Also send instructions on how to Make an export.

i used the file posted here

@dickwolff
Copy link
Owner

I see, that one doesn't seem to have a "Tx-ID" colum, which the initial one had.

@dickwolff
Copy link
Owner

@jameskitt616 For some reason the date format also changed from "2025-01-01 10:12:27" to "18.01.2025 15:18:55". Did you change anything while exporting that could cause these differences?

@dickwolff dickwolff added the Waiting for input Waiting for more input to get a sense of the issue label Jan 18, 2025
@jameskitt616
Copy link
Author

Hm, there is CSV and CSV (full export), seems like those two are different. Here is the Full export version.
I will also update my "How to export" message from earlier to use the correct export.

CoinTracking_Trade_Table Test.csv

@dickwolff
Copy link
Owner

Thanks. I will continue today and let you know when it's ready to test!

@dickwolff
Copy link
Owner

I just added the Tx-ID back, and updated the instructions in the README.

Can you verify if you can use it now using this Docker image? Thanks!

@jameskitt616
Copy link
Author

Seems to work, i only noticed that the Staking doesnt have any Unit Price, thus no Value after importing.
But the rest seems to work 👍🏻

@dickwolff
Copy link
Owner

dickwolff commented Jan 19, 2025

This is due to there being no value to compare with. I can set it to 1, maybe that will work? You can check with this Docker image.

@dickwolff dickwolff self-assigned this Jan 20, 2025
@dickwolff
Copy link
Owner

@jameskitt616 Did you by chance take a look?

@jameskitt616
Copy link
Author

I tried it and i am actually a bit more confused with ghostfolio right now, i dont understand why dividend counts towards the Overview or total amount for an Account.

@dickwolff
Copy link
Owner

dickwolff commented Jan 26, 2025

Any update on this? Is this a ghostfolio thing, or should there be done more on this tool? Otherwise I’d like to merge the change. Thanks!

@jameskitt616
Copy link
Author

The behavior seems to be the exact same if i add a dividend manually. So from my understanding i think this MR should be fine and does what it's supposed to do.

@dickwolff dickwolff removed the Waiting for input Waiting for more input to get a sense of the issue label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CoinTracking.info Related to CoinTracking.info New broker Request support for a new broker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants