VibeNL / GhostfolioSidekick

A continuous running Docker container (a sidecar) to automatically import files from several brokers & crypto exchanges. And more.... See the readme.md for more information
MIT License
12 stars 4 forks source link

Trading212 - Wrong ticker being used #176

Closed pvieira84 closed 6 months ago

pvieira84 commented 6 months ago

So I have bought some shares of ISIN IE00B4L5Y983 which has different tickers depending for example on the Exchange/Currency.

In my t212 file, I have this: image

The ticker is EUNL. But sidekick is using a different ticker: image

I tried to used the config file to change this but none of the below additions worked for me image image

Can you shed some light on how can I get these activities imported with ticker EUNL.DE?

VibeNL commented 6 months ago

I suspect we have a 'cache' issue, or a previously matched issue. Your first mapping (IE00B4L5Y983) should be the correct one. ISIN is used as the identifier in Trading212.

Did you restart the container after setting the mapping and did you correctly configure the config file to be used?

Otherwise, could you please try the following:

Could you let met know if the issue is resolved 😄 , otherwise i'll have to investigate further.

VibeNL commented 6 months ago

To help I have added some logging in the latest version of the container

pvieira84 commented 6 months ago

So I've followed the steps and what happened was that the app updated the comment to what it was again i.e. "Known Identifiers: [IE00B4L5Y983]"

Then I tried a different approach and the result was different as well.

It now created the activities associated with ticker IWDA.L - this is what I have in the logs: image image image

This is my current config: image

VibeNL commented 6 months ago

I can see from the first screenshot that your config file is not being read 'mappings #0'

Could you check the path to the config is being set correctly?

pvieira84 commented 6 months ago

This is what I have set. It's in the same folder of the import files image

VibeNL commented 6 months ago

That looks correct 👍🏻. just to rule it out (if you are running Linux), is the casing correct?

pvieira84 commented 6 months ago

it is: image

VibeNL commented 6 months ago

I was afraid of that. Will add some extra logging in the coming weeks to try to explain what is going wrong 😅

VibeNL commented 6 months ago

Created a pull request for the logging, the first statement I added should at least confirm that the default config is used. Could you install that version and share the log?

pvieira84 commented 6 months ago

Well, your PR helped me find the issue.

Logs: 2024-03-08T08:55:41.190483278Z warn: GhostfolioSidekick.Configuration.ApplicationSettings[0] 2024-03-08T08:55:41.190523769Z No (valid) configuration file found at /import/config.json. Using default configuration.. Error was '"' is invalid after a value. Expected either ',', '}', or ']'. Path: $.settings | LineNumber: 6 | BytePositionInLine: 2.

It happens that my json was not valid :S A comma was missing image

After fixing the JSON: image and image

There's still an issue though - before testing I deleted the activities pointing to the wrong ticker but now even though the mapping is correctly identified, the activities are not getting imported at all (for my mapped EUNL ticker) . I have a couple of these fails in the logs, don't know if it means something image

VibeNL commented 6 months ago

Glad to hear you have found the issue.

Regarding the other issue, I may have broken something with the last refactoring. Hopefully the new master it is fixed. If not, could you please open a new ticket :)?