dickwolff / Export-To-Ghostfolio

Convert transaction history export from your favorite broker to a format that can be imported in Ghostfolio.
https://hub.docker.com/r/dickwolff/export-to-ghostfolio
Apache License 2.0
61 stars 10 forks source link

Transaction XTB error #116

Open rubengr opened 1 month ago

rubengr commented 1 month ago

Hi

I'm testing you code, but get this error:

npm run start xtb

> export-to-ghostfolio@0.18.2 start
> tsx ./src/manual.ts xtb

[i] Starting Export to Ghostfolio v0.18.2
[i] Restored 0 ISIN-symbol pairs and 0 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
{
  iD: '629854440',
  type: 'interest',
  time: '04.10.2024 11:03:40',
  symbol: '',
  comment: 'Free-funds Interest Tax 2024-09',
  amount: -0.03
}
{
  iD: '629854424',
  type: 'interest',
  time: '04.10.2024 11:03:39',
  symbol: '',
  comment: 'Free-funds Interest 2024-09',
  amount: 0.1
}
{
  iD: '624529037',
  type: 'buy',
  time: '27.09.2024 12:22:31',
  symbol: 'TXT.PL',
  comment: 'OPEN BUY 5 @ 74.10',
  amount: -87.09
}
[d]     getSecurity(): Found 0 matches by symbol TXT.PL
[d]     getSecurity(): No initial match found, trying by symbol TXT.PL
[d]     getSecurity(): No match found for TXT.PL, trying to symbol TXT
[i] ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA 2s | Duration: 1s | 2/765We expected a redirect to guce.yahoo.com/We'll try to continue anyway - you can safely ignore this if the request succeeds
[d]             getSymbolsByQuery(): Quote 'TXT' has no symbol at Yahoo Finance undefined. Skipping..
[d]             getSymbolsByQuery(): Quote 'TXT' has no symbol at Yahoo Finance undefined. Skipping..
[d]     getSecurity(): Match found for TXT.PL
[i] ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA 2s | Duration: 2s | 2/765{
  iD: '623424924',
  type: 'Withholding tax',
  time: '26.09.2024 11:00:23',
  symbol: 'FB.US',
  comment: 'FB.US USD WHT 15%',
  amount: -0.33
}
file:///C:/Users/Ruben/Documents/Ruben/Ghostfolio/Export-To-Ghostfolio/src/converters/xtbConverter.ts:1
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:true});impor.

TypeError: Cannot read properties of null (reading '1')
    at <anonymous> (c:\Users\Ruben\Documents\Ruben\Ghostfolio\Export-To-Ghostfolio\src\converters\xtbConverter.ts:114:4)
Node.js v20.11.0
dickwolff commented 1 month ago

Thanks for reporting this. I will look into it when I have time!

dickwolff commented 1 month ago

@rubengr I've just looked at the issue. The Withholding tax record is new for the tool, so it goes broke for some technical reason.

I assume this record is not standalone, but rather connected to another BUY/SELL record. Could you maybe send me both lines from your export, so I can use that to create a working solution?

dickwolff commented 2 weeks ago

@rubengr Could you check my latest message? Thanks!