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

Transaction XTB error #116

Closed
rubengr opened this issue Oct 6, 2024 · 50 comments · Fixed by #135 or #167
Closed

Transaction XTB error #116

rubengr opened this issue Oct 6, 2024 · 50 comments · Fixed by #135 or #167
Assignees
Labels
Bug Something isn't working XTB Related to XTB

Comments

@rubengr
Copy link

rubengr commented Oct 6, 2024

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
Copy link
Owner

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

@dickwolff
Copy link
Owner

dickwolff commented Oct 20, 2024

@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
Copy link
Owner

@rubengr Could you check my latest message? Thanks!

@dickwolff dickwolff added the XTB Related to XTB label Nov 4, 2024
@rubengr
Copy link
Author

rubengr commented Dec 7, 2024

@rubengr Could you check my latest message? Thanks!

sorry for late reply. I think is related to taxes of dividends. For example:
`

<style> </style>
ID Type Time Symbol Comment Amount
623424924 Withholding tax 26.09.2024 11:00:23 FB.US FB.US USD WHT 15% -0.33
623424923 Dividend 26.09.2024 11:00:23 FB.US FB.US USD 0.5000/ SHR 2.23
`

@dickwolff dickwolff added the Bug Something isn't working label Jan 1, 2025
@dickwolff
Copy link
Owner

Sorry for the late reply. I was busy finishing things up last year. Now I have more time for this project and I will look into this issue today!

@dickwolff
Copy link
Owner

@rubengr After looking into it, it seems the XTB converter did not have support for dividends at all. I've added this just now, and used your input as test data.

Can you test if this works for you? You can clone this branch and run it yourself, or use this Docker image to verify. Please let me know if all works as expected so I can merge this.

@dickwolff dickwolff self-assigned this Jan 1, 2025
@dickwolff dickwolff added the Waiting for input Waiting for more input to get a sense of the issue label Jan 2, 2025
@rubengr
Copy link
Author

rubengr commented Jan 2, 2025

Get this error:

PS C:\Users\Ruben\Downloads\Export-To-Ghostfolio> npm run start xtb

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

[i] Starting Export to Ghostfolio v0.20.1
[i] Restored 7 ISIN-symbol pairs and 7 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
file:///C:/Users/Ruben/Downloads/Export-To-Ghostfolio/src/converters/xtbConverter.ts:2
`);bar1.increment();continue}let feeAmount=0;if(record.type.toLocaleLowerCase()==="dividend"){const taxRecord=this.lookupDividendTaxRecord(records,idx);if(;                                                                                                                                                           ^
TypeError: Cannot read properties of undefined (reading 'toLocaleLowerCase')
    at <anonymous> (c:\Users\Ruben\Downloads\Export-To-Ghostfolio\src\converters\xtbConverter.ts:188:57)
    at Array.some (<anonymous>)
    at XtbConverter.isIgnoredRecord (c:\Users\Ruben\Downloads\Export-To-Ghostfolio\src\converters\xtbConverter.ts:188:35)
    at <anonymous> (c:\Users\Ruben\Downloads\Export-To-Ghostfolio\src\converters\xtbConverter.ts:88:26)
    at Parser.<anonymous> (file:///C:/Users/Ruben/Downloads/Export-To-Ghostfolio/node_modules/csv-parse/lib/index.js:118:7)
    at Parser.emit (node:events:518:28)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v20.11.0
PS C:\Users\Ruben\Downloads\Export-To-Ghostfolio>

@dickwolff
Copy link
Owner

That's a shame. Can you maybe provide me with the input you are trying with? That way I can better reproduce the issue myself. Thanks!

@rubengr
Copy link
Author

rubengr commented Jan 2, 2025

Transactions.csv

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

Thanks! I will look into it and get back to you!

@dickwolff
Copy link
Owner

I just took a look at the file you provided, but are you sure this ia a XTB export? It looks more like a DEGIRO file.

The file you provided has a lot more headers then the one in my XTB sample (which is just ID;Type;Time;Symbol;Comment;Amount).

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

@toffee I saw you were also looking into adding dividends to the XTB converter. Could you maybe try my fix, to verify if it all processes correctly? You can use this Docker image, or clone the branch if you want to run locally. Thanks a lot!

@toffee
Copy link

toffee commented Jan 6, 2025

I prepared a test export. Running the code from the branch on this input file give me an error (on record 9):

# npm run start xtb

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

[i] Starting Export to Ghostfolio v0.21.3
[i] Restored 0 ISIN-symbol pairs and 6 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
[i] ████████████████████░░░░░░░░░░░░░░░░░░░░ 50% | ETA 6s | Duration: 6s | 9/18/root/git/toffee/Export-To-Ghostfolio/src/converters/xtbConverter.ts:118
                let quantity = parseFloat(match[1]);
                                          ^


TypeError: Cannot read properties of null (reading '1')
    at <anonymous> (/root/git/toffee/Export-To-Ghostfolio/src/converters/xtbConverter.ts:118:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.18.1

Additionally, seems the yahoo finance did not find correctly some stock symbols (for FLOA.UK wrongly find PFLT or for CSPX.UK find CSPX.L or for SPY5.UK find SPY508E-DC179.MX). Probably this should be discussed separately if it's an issue (or is it wrong configuration on my side!?)

@dickwolff
Copy link
Owner

dickwolff commented Jan 6, 2025

Thanks for the input!

The issue seems to be with Transfer, which is not supported. I added it to the ignore list.

When I search on Yahoo Finance for FLOA.UK, I get nothing. There is a clause in the Security Service that then strips the part after the dot, so then FLOA remains. And then you find PFLT. So that makes me thinkg I that the .UK needs to be replaced with .L to be able to find the correct one.

@dickwolff
Copy link
Owner

@toffee I just pushed some changes, I also added some records of your test export. Can you verify if this works for you and all records are processed correctly?

@toffee
Copy link

toffee commented Jan 6, 2025

With the latest changes the generation of json file ends but the content is not ok.
In my input test file the first 6 rows are: tax, dividend, tax, dividend, tax, dividend. The first record is the tax for the second record. Seems that in your code for the second record (which is dividend) you consider wrongly the tax from the third record (correct is the first record).

See bellow the generated json (3 activities) for these 6 cvs records:

   "activities": [
        {
            "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
            "comment": "XRAY.US USD 0.1600/ SHR",
            "fee": 3.84,
            "quantity": 16,
            "type": "DIVIDEND",
            "unitPrice": 0.16,
            "currency": "USD",
            "dataSource": "YAHOO",
            "date": "2024-07-12T13:01:17+03:00",
            "symbol": "XRAY"
        },
        {
            "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
            "comment": "XRAY.US USD 0.1600/ SHR",
            "fee": 1.44,
            "quantity": 80,
            "type": "DIVIDEND",
            "unitPrice": 0.16,
            "currency": "USD",
            "dataSource": "YAHOO",
            "date": "2024-07-12T13:01:17+03:00",
            "symbol": "XRAY"
        },
        {
            "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
            "comment": "XRAY.US USD 0.1600/ SHR",
            "fee": 0,
            "quantity": null,
            "type": "DIVIDEND",
            "unitPrice": null,
            "currency": "USD",
            "dataSource": "YAHOO",
            "date": "2024-07-12T13:01:17+03:00",
            "symbol": "XRAY"
        },

As you can see, for the first two activities the fee is wrong and for the third activity has quantity and unitPrice null.

To change the UK to L don't think it's correct - the symbol as it's come from XTB is correct (except the ones with US). I guess the removal of ".country" should be done only for US (in case of yahoo finance).

@dickwolff
Copy link
Owner

I will look into the tax issue.

But when I remove the .UK (as previoulsy), then you don't get completely different symbols right? The symbols that XTB uses are not known in Yahoo Finance. So with this replacement of UK by L you do at least get the security you bought at XTB?

@toffee
Copy link

toffee commented Jan 6, 2025

Thank you. My previous assumption was wrong. I'm getting the correct security with your change from UK to L.

@rubengr
Copy link
Author

rubengr commented Jan 6, 2025

@dickwolff you are completely right. Sorry for my mistake.
I get same error with file
xStation5_cashOperations.csv

[i] Starting Export to Ghostfolio v0.22.1
[i] Restored 7 ISIN-symbol pairs and 13 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
[i] █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2% | ETA 609s | Duration: 16s | 17/765file:///C:/Users/Ruben/Downloads/Exp1
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\Downloads\Export-To-Ghostfolio\src\converters\xtbConverter.ts:122:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0

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

No problem @rubengr. I will investigate further and let you know what i find!

@dickwolff
Copy link
Owner

dickwolff commented Jan 10, 2025

@rubengr The tool broke on some records (I think related to CFD) that were not supported previously. I added them to the tool and your export is processed successfully! I had some issues with rate limiting, but I have since added some checks to use cache more often and that is now also solved!

The following changes have been made:

  • Records of type sec fee are added as fee.
  • Records of type profit/loss are added. For each instance the tool will check the related amount. When it's negative, the record is classified as a fee (you lost money). When the amount is positive, the record is classified as interest (you made money).
  • Records of type swap are added as fee.
  • Records of type commission are added as fee.

Please let me know if you agree with these, or if you find they need to change. Also I would appreciate if you can try to run the tool yourself and see if all works as expected!

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

toffee commented Jan 18, 2025

Sorry, yesterday I discarded my changes to include yours to test. These are the lines:

579262992;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-0.77
579262991;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;2.56
579262976;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-3.84
579262975;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;12.8
579262887;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-1.44
579262886;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;4.8

@dickwolff dickwolff mentioned this issue Jan 18, 2025
3 tasks
@dickwolff
Copy link
Owner

There was an issue with dividend for it only looking forward, so it took the tax record for the next dividend record. I changed this to look back as well, and also look for the Order ID to match (should be + 1 on the dividend record). This way it got the right tax record.

Can you verify for me with this Docker image?

@dickwolff
Copy link
Owner

@toffee Any chance you can test this today? Much appreciated!

@toffee
Copy link

toffee commented Jan 19, 2025

I've checkout the feat/Small-Fixes branch (this is the branch for #167) and there are still issues. The dividend and tax line seems to be ok now but there are other lines in csv that are not exported correctly.

I'm testing with the following csv:

ID;Type;Time;Symbol;Comment;Amount
579262992;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-0.77
579262991;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;2.56
579262976;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-3.84
579262975;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;12.8
579262887;Withholding tax;12.07.2024 13:01:17;XRAY.US;XRAY.US USD WHT 30%;-1.44
579262886;Dividend;12.07.2024 13:01:17;XRAY.US;XRAY.US USD 0.1600/ SHR;4.8
547639506;Stocks/ETF purchase;14.05.2024 17:37:48;XRAY.US;OPEN BUY 80 @ 28.26;-2260.8
547615089;Stocks/ETF purchase;14.05.2024 17:21:10;FLOA.UK;OPEN BUY 16/16.7399 @ 5.9140;-94.62
547615042;Stocks/ETF purchase;14.05.2024 17:21:09;CSPX.UK;OPEN BUY 0.1799 @ 550.30;-99
547615041;Stocks/ETF purchase;14.05.2024 17:21:09;FLOA.UK;OPEN BUY 0.7399/16.7399 @ 5.9140;-4.38
547614959;Transfer;14.05.2024 17:21:05;;Transfer from 50526908 to 50655635;200
547614956;Transfer;14.05.2024 17:21:05;;Transfer from 50526908 to 50655635;-200
543857396;Free funds interests tax;07.05.2024 09:36:50;;Free-funds Interest Tax 2024-04;-2
543604525;Free funds interests;07.05.2024 03:16:39;;Free-funds Interest 2024-04;15.17
532314365;Stocks/ETF purchase;15.04.2024 20:39:49;XRAY.US;OPEN BUY 16 @ 31.00;-496
528794162;Stocks/ETF purchase;09.04.2024 17:06:46;SPY5.UK;OPEN BUY 1 @ 520.00;-520
527642868;Stocks/ETF purchase;05.04.2024 22:15:50;XRAY.US;OPEN BUY 30 @ 32.32;-969.6
526501562;Deposit;04.04.2024 18:30:00;;JP_MORGAN deposit, JP_MORGAN provider transaction id=TXN-C-4252349-438052, JP_MORGAN merchant reference id=TXN-C-4252349-438052, id=10956543;2000

and for line 8 and 10 the quantity and unitPrice are null (maybe because the quantity is a fraction: 16/16.7399!?)

{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "OPEN BUY 16/16.7399 @ 5.9140",
    "fee": 0,
    "quantity": null,
    "type": "BUY",
    "unitPrice": null,
    "currency": "USD",
    "dataSource": "YAHOO",
    "date": "2024-05-14T17:21:10+03:00",
    "symbol": "FLOA.L"
}

@dickwolff
Copy link
Owner

dickwolff commented Jan 19, 2025

@toffee It seems that those 2 are partial order fills. When you sum them, the total becomes 16.7399. I updated the code to take the part before the /. When testing the example above, I noticed free funds interests tax which was interpreted as interest instead of tax, so I fixed that one as well.

The example above can be processed, seems to be valid and can be uploaded to my Ghostfolio instance. Can you verify as well with this Docker image, or running locally on the branch?

@toffee
Copy link

toffee commented Jan 19, 2025

Yes, now the export it's ok regarding partial order fill. Nice catch regarding free fund interest, but the implementation I'm not sure it's the best one - I think it's better to have the same approach like for dividend and dividend tax: for two csv line to create only one line in export.

Instead of

{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "Free-funds Interest Tax 2024-04",
    "fee": 2,
    "quantity": 1,
    "type": "FEE",
    "unitPrice": 0,
    "currency": "USD",
    "dataSource": "MANUAL",
    "date": "2024-05-07T09:36:50+03:00",
    "symbol": "Free-funds Interest Tax 2024-04"
},
{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "Free-funds Interest 2024-04",
    "fee": 0,
    "quantity": 1,
    "type": "INTEREST",
    "unitPrice": 15.17,
    "currency": "USD",
    "dataSource": "MANUAL",
    "date": "2024-05-07T03:16:39+03:00",
    "symbol": "Free-funds Interest 2024-04"
},

I think it's better to have (include fee, quantity and unitPrice):

{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "Free-funds Interest 2024-04",
    "fee": 2,
    "quantity": 1,
    "type": "INTEREST",
    "unitPrice": 15.17,
    "currency": "USD",
    "dataSource": "MANUAL",
    "date": "2024-05-07T03:16:39+03:00",
    "symbol": "Free-funds Interest 2024-04"
},

@dickwolff
Copy link
Owner

I would agree, however at first glance it looks a bit more difficult then with dividend as the Order ID does not seem to be ascending; there is quite a gap between them, both on ID and on date time.

@toffee
Copy link

toffee commented Jan 19, 2025

Indeed, no correlation. I've look now into my XTB account and strange is that in some months there are two entries (interest and interest tax) and in other months there is only one entry (interest - probably tax is already deducted). And I saw even correction like:

597124174;Free funds interests;09.08.2024 19:38:51;;Corr Free-funds Interest 2024-07;0.5

@dickwolff
Copy link
Owner

dickwolff commented Jan 19, 2025

@toffee I made the tax record lookup more dynamic and added a check for the comment to match. Now it combines the interest + interest tax into one, as well as the dividend ones.

Edit: should the one above be interpreted as a fee then?
Edit 2: added as fee

@dickwolff
Copy link
Owner

Updates the code. Let me know if there are more bugs to be fixed.

@toffee
Copy link

toffee commented Jan 19, 2025

I've tested during your edits and initially I got INTEREST record

{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "Corr Free-funds Interest 2024-07",
    "fee": 0,
    "quantity": 1,
    "type": "INTEREST",
    "unitPrice": 0.5,
    "currency": "USD",
    "dataSource": "MANUAL",
    "date": "2024-08-09T19:38:51+03:00",
    "symbol": "Corr Free-funds Interest 2024-07"
}

and afterwards I got FEE record as you mentioned in the second edit

{
    "accountId": "52b690dd-0133-4883-a7fb-e7464e2b92df",
    "comment": "Corr Free-funds Interest 2024-07",
    "fee": 0.5,
    "quantity": 1,
    "type": "FEE",
    "unitPrice": 0,
    "currency": "USD",
    "dataSource": "MANUAL",
    "date": "2024-08-09T19:38:51+03:00",
    "symbol": "Corr Free-funds Interest 2024-07"
}

but I'm not sure it's semantically correct - depends how XTB generates the csv export. Correction can be positive or negative (in this case it's positive) and (like for dividend) the XTB exports negative amount when it's tax. So in this case to consider a XTB csv positive value as fee I don't think it's correct. I think if the type of the csv is "Free funds interests" then the json object should have the type "INTEREST" (even if it's negative in case of correction of the interest).

@dickwolff
Copy link
Owner

dickwolff commented Jan 19, 2025

In principle I agree with above. I also agree that a positive free fund interest needs to be handled as regular interest for Ghostfolio. Then, based on what you said, a negative free fund interest would then mean you "have to pay" (because you got too much interest?).

However Ghostfolio ignores the fee part on Interest records. So the only way to get around that, is to have the fee as a separate record. Otherwise you'd lose it. This is the same for the previous one that I added, that fee also gets lost if you don't keep it as 2 activities.

See example below. I uploaded this JSON:

 {
            "accountId": "3d287178-44d6-430b-a36b-566dc43fbcfb",
            "comment": "Corr Free-funds Interest 2024-09",
            "fee": 1.5,
            "quantity": 1,
            "type": "INTEREST",
            "unitPrice": 1.5,
            "currency": "EUR",
            "dataSource": "MANUAL",
            "date": "2024-10-09T19:38:51+02:00",
            "symbol": "Corr Free-funds Interest 2024-09"
        }

Which in Ghostfolio becomes:

Image

@toffee
Copy link

toffee commented Jan 20, 2025

Ok, having this in Ghostfolio make sense to generate two json objects. Thanks for you effort you put into this project.

@rubengr
Copy link
Author

rubengr commented Jan 20, 2025

Hi @dickwolff
I continue having issues.

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

[i] Starting Export to Ghostfolio v0.22.1
[i] Restored 7 ISIN-symbol pairs and 13 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
[i] █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2% | ETA 309s | Duration: 8s | 17/765file:///C:/Users/Ruben/Downloads/Expo1var __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\Downloads\Export-To-Ghostfolio\src\converters\xtbConverter.ts:122:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.11.0
npm notice
npm notice New major version of npm available! 10.4.0 -> 11.0.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
npm notice Run npm install -g npm@11.0.0 to update!
npm notice

xStation5_cashOperations.csv

@dickwolff
Copy link
Owner

@toffee Thanks! Will do some cleanup, verify some more with your examples and then be ready for merge.

@rubengr I see you're not using the latest version. Could you pull the branch for XTB and then try again?

@rubengr
Copy link
Author

rubengr commented Jan 20, 2025

yes i'm using xtb-add-dividend branch

@dickwolff
Copy link
Owner

Sorry, that branch has been merged to main. I created a new one: feat/Small-Fixes

@rubengr
Copy link
Author

rubengr commented Jan 20, 2025


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

[i] Starting Export to Ghostfolio v0.23.0
[i] Restored 7 ISIN-symbol pairs and 36 symbols from cache..
[i] Processing file using XTB converter
[i] Read CSV file. Start processing..
[i] ████████████████████████████████████████ 100% | ETA 0s | Duration: 19s | 305/305
[i] Processing complete, writing to file..
[i] Wrote data to 'e2g-output\ghostfolio-xtb-20250120114009.json'
[i] You can now automatically validate the generated file against Ghostfolio. Set GHOSTFOLIO_VALIDATE=true in your environment variables to enable this feature.
[i] Automatic import is allowed. Start importing..
[i] THIS IS AN EXPERIMENTAL FEATURE!! Use this at your own risk!
[e] Import failed!
[e]     activities.0.quantity must not be less than 0
[e]     activities.0.quantity must be a number conforming to the specified constraints
[e]     activities.0.unitPrice must not be less than 0
[e]     activities.0.unitPrice must be a number conforming to the specified constraints
[e]     activities.1.quantity must not be less than 0
[e]     activities.1.quantity must be a number conforming to the specified constraints
[e]     activities.1.unitPrice must not be less than 0
[e]     activities.1.unitPrice must be a number conforming to the specified constraints
[e]     activities.2.quantity must not be less than 0
[e]     activities.2.quantity must be a number conforming to the specified constraints
[e]     activities.2.unitPrice must not be less than 0
[e]     activities.2.unitPrice must be a number conforming to the specified constraints
[e]     activities.3.quantity must not be less than 0
[e]     activities.3.quantity must be a number conforming to the specified constraints
[e]     activities.3.unitPrice must not be less than 0
[e]     activities.3.unitPrice must be a number conforming to the specified constraints
[e]     activities.4.quantity must not be less than 0
[e]     activities.4.quantity must be a number conforming to the specified constraints
[e]     activities.4.unitPrice must not be less than 0
[e]     activities.4.unitPrice must be a number conforming to the specified constraints
[e]     activities.5.quantity must not be less than 0
[e]     activities.5.quantity must be a number conforming to the specified constraints
[e]     activities.5.unitPrice must not be less than 0
[e]     activities.5.unitPrice must be a number conforming to the specified constraints
[e]     activities.6.quantity must not be less than 0
[e]     activities.6.quantity must be a number conforming to the specified constraints
[e]     activities.6.unitPrice must not be less than 0
[e]     activities.6.unitPrice must be a number conforming to the specified constraints
[e]     activities.7.quantity must not be less than 0
[e]     activities.7.quantity must be a number conforming to the specified constraints
[e]     activities.7.unitPrice must not be less than 0
[e]     activities.7.unitPrice must be a number conforming to the specified constraints
[e]     activities.8.quantity must not be less than 0
[e]     activities.8.quantity must be a number conforming to the specified constraints
[e]     activities.8.unitPrice must not be less than 0
[e]     activities.8.unitPrice must be a number conforming to the specified constraints
[e]     activities.9.quantity must not be less than 0
[e]     activities.9.quantity must be a number conforming to the specified constraints
[e]     activities.9.unitPrice must not be less than 0
[e]     activities.9.unitPrice must be a number conforming to the specified constraints
[e]     activities.10.quantity must not be less than 0
[e]     activities.10.quantity must be a number conforming to the specified constraints
[e]     activities.10.unitPrice must not be less than 0
[e]     activities.10.unitPrice must be a number conforming to the specified constraints
[e]     activities.11.quantity must not be less than 0
[e]     activities.11.quantity must be a number conforming to the specified constraints
[e]     activities.11.unitPrice must not be less than 0
[e]     activities.11.unitPrice must be a number conforming to the specified constraints
[e]     activities.12.quantity must not be less than 0
[e]     activities.12.quantity must be a number conforming to the specified constraints
[e]     activities.12.unitPrice must not be less than 0
[e]     activities.12.unitPrice must be a number conforming to the specified constraints
[e]     activities.13.quantity must not be less than 0
[e]     activities.13.quantity must be a number conforming to the specified constraints
[e]     activities.13.unitPrice must not be less than 0
[e]     activities.13.unitPrice must be a number conforming to the specified constraints
[e]     activities.14.quantity must not be less than 0
[e]     activities.14.quantity must be a number conforming to the specified constraints
[e]     activities.14.unitPrice must not be less than 0
[e]     activities.14.unitPrice must be a number conforming to the specified constraints
[e]     activities.15.quantity must not be less than 0
[e]     activities.15.quantity must be a number conforming to the specified constraints
[e]     activities.15.unitPrice must not be less than 0
[e]     activities.15.unitPrice must be a number conforming to the specified constraints
[e]     activities.16.quantity must not be less than 0
[e]     activities.16.quantity must be a number conforming to the specified constraints
[e]     activities.16.unitPrice must not be less than 0
[e]     activities.16.unitPrice must be a number conforming to the specified constraints
[e]     activities.17.quantity must not be less than 0
[e]     activities.17.quantity must be a number conforming to the specified constraints
[e]     activities.17.unitPrice must not be less than 0
[e]     activities.17.unitPrice must be a number conforming to the specified constraints
[e]     activities.18.quantity must not be less than 0
[e]     activities.18.quantity must be a number conforming to the specified constraints
[e]     activities.18.unitPrice must not be less than 0
[e]     activities.18.unitPrice must be a number conforming to the specified constraints
[e]     activities.19.quantity must not be less than 0
[e]     activities.19.quantity must be a number conforming to the specified constraints
[e]     activities.19.unitPrice must not be less than 0
[e]     activities.19.unitPrice must be a number conforming to the specified constraints
[e]     activities.20.quantity must not be less than 0
[e]     activities.20.quantity must be a number conforming to the specified constraints
[e]     activities.20.unitPrice must not be less than 0
[e]     activities.20.unitPrice must be a number conforming to the specified constraints
[e]     activities.21.quantity must not be less than 0
[e]     activities.21.quantity must be a number conforming to the specified constraints
[e]     activities.21.unitPrice must not be less than 0
[e]     activities.21.unitPrice must be a number conforming to the specified constraints
[e]     activities.22.quantity must not be less than 0
[e]     activities.22.quantity must be a number conforming to the specified constraints
[e]     activities.22.unitPrice must not be less than 0
[e]     activities.22.unitPrice must be a number conforming to the specified constraints
[e]     activities.23.quantity must not be less than 0
[e]     activities.23.quantity must be a number conforming to the specified constraints
[e]     activities.23.unitPrice must not be less than 0
[e]     activities.23.unitPrice must be a number conforming to the specified constraints
[e]     activities.24.quantity must not be less than 0
[e]     activities.24.quantity must be a number conforming to the specified constraints
[e]     activities.24.unitPrice must not be less than 0
[e]     activities.24.unitPrice must be a number conforming to the specified constraints
[e]     activities.25.quantity must not be less than 0
[e]     activities.25.quantity must be a number conforming to the specified constraints
[e]     activities.25.unitPrice must not be less than 0
[e]     activities.25.unitPrice must be a number conforming to the specified constraints
[e]     activities.26.quantity must not be less than 0
[e]     activities.26.quantity must be a number conforming to the specified constraints
[e]     activities.26.unitPrice must not be less than 0
[e]     activities.26.unitPrice must be a number conforming to the specified constraints
[e]     activities.27.quantity must not be less than 0
[e]     activities.27.quantity must be a number conforming to the specified constraints
[e]     activities.27.unitPrice must not be less than 0
[e]     activities.27.unitPrice must be a number conforming to the specified constraints
[e]     activities.28.quantity must not be less than 0
[e]     activities.28.quantity must be a number conforming to the specified constraints
[e]     activities.28.unitPrice must not be less than 0
[e]     activities.28.unitPrice must be a number conforming to the specified constraints
[e]     activities.29.quantity must not be less than 0
[e]     activities.29.quantity must be a number conforming to the specified constraints
[e]     activities.29.unitPrice must not be less than 0
[e]     activities.29.unitPrice must be a number conforming to the specified constraints
[e]     activities.30.quantity must not be less than 0
[e]     activities.30.quantity must be a number conforming to the specified constraints
[e]     activities.30.unitPrice must not be less than 0
[e]     activities.30.unitPrice must be a number conforming to the specified constraints
[e]     activities.31.quantity must not be less than 0
[e]     activities.31.quantity must be a number conforming to the specified constraints
[e]     activities.31.unitPrice must not be less than 0
[e]     activities.31.unitPrice must be a number conforming to the specified constraints
[e]     activities.32.quantity must not be less than 0
[e]     activities.32.quantity must be a number conforming to the specified constraints
[e]     activities.32.unitPrice must not be less than 0
[e]     activities.32.unitPrice must be a number conforming to the specified constraints
[e]     activities.33.quantity must not be less than 0
[e]     activities.33.quantity must be a number conforming to the specified constraints
[e]     activities.33.unitPrice must not be less than 0
[e]     activities.33.unitPrice must be a number conforming to the specified constraints
[e]     activities.34.quantity must not be less than 0
[e]     activities.34.quantity must be a number conforming to the specified constraints
[e]     activities.34.unitPrice must not be less than 0
[e]     activities.34.unitPrice must be a number conforming to the specified constraints
[e]     activities.35.quantity must not be less than 0
[e]     activities.35.quantity must be a number conforming to the specified constraints
[e]     activities.35.unitPrice must not be less than 0
[e]     activities.35.unitPrice must be a number conforming to the specified constraints
[e]     activities.36.quantity must not be less than 0
[e]     activities.36.quantity must be a number conforming to the specified constraints
[e]     activities.36.unitPrice must not be less than 0
[e]     activities.36.unitPrice must be a number conforming to the specified constraints
[e]     activities.37.quantity must not be less than 0
[e]     activities.37.quantity must be a number conforming to the specified constraints
[e]     activities.37.unitPrice must not be less than 0
[e]     activities.37.unitPrice must be a number conforming to the specified constraints
[e]     activities.38.quantity must not be less than 0
[e]     activities.38.quantity must be a number conforming to the specified constraints
[e]     activities.38.unitPrice must not be less than 0
[e]     activities.38.unitPrice must be a number conforming to the specified constraints
[e]     activities.39.quantity must not be less than 0
[e]     activities.39.quantity must be a number conforming to the specified constraints
[e]     activities.39.unitPrice must not be less than 0
[e]     activities.39.unitPrice must be a number conforming to the specified constraints
[e]     activities.40.quantity must not be less than 0
[e]     activities.40.quantity must be a number conforming to the specified constraints
[e]     activities.40.unitPrice must not be less than 0
[e]     activities.40.unitPrice must be a number conforming to the specified constraints
[e]     activities.41.quantity must not be less than 0
[e]     activities.41.quantity must be a number conforming to the specified constraints
[e]     activities.41.unitPrice must not be less than 0
[e]     activities.41.unitPrice must be a number conforming to the specified constraints
[e]     activities.42.quantity must not be less than 0
[e]     activities.42.quantity must be a number conforming to the specified constraints
[e]     activities.42.unitPrice must not be less than 0
[e]     activities.42.unitPrice must be a number conforming to the specified constraints
[e]     activities.43.quantity must not be less than 0
[e]     activities.43.quantity must be a number conforming to the specified constraints
[e]     activities.43.unitPrice must not be less than 0
[e]     activities.43.unitPrice must be a number conforming to the specified constraints
[e]     activities.44.quantity must not be less than 0
[e]     activities.44.quantity must be a number conforming to the specified constraints
[e]     activities.44.unitPrice must not be less than 0
[e]     activities.44.unitPrice must be a number conforming to the specified constraints
[e]     activities.45.quantity must not be less than 0
[e]     activities.45.quantity must be a number conforming to the specified constraints
[e]     activities.45.unitPrice must not be less than 0
[e]     activities.45.unitPrice must be a number conforming to the specified constraints
[e]     activities.46.quantity must not be less than 0
[e]     activities.46.quantity must be a number conforming to the specified constraints
[e]     activities.46.unitPrice must not be less than 0
[e]     activities.46.unitPrice must be a number conforming to the specified constraints
[e]     activities.47.quantity must not be less than 0
[e]     activities.47.quantity must be a number conforming to the specified constraints
[e]     activities.47.unitPrice must not be less than 0
[e]     activities.47.unitPrice must be a number conforming to the specified constraints
[e]     activities.48.quantity must not be less than 0
[e]     activities.48.quantity must be a number conforming to the specified constraints
[e]     activities.48.unitPrice must not be less than 0
[e]     activities.48.unitPrice must be a number conforming to the specified constraints
[e]     activities.49.quantity must not be less than 0
[e]     activities.49.quantity must be a number conforming to the specified constraints
[e]     activities.49.unitPrice must not be less than 0
[e]     activities.49.unitPrice must be a number conforming to the specified constraints
[e]     activities.50.quantity must not be less than 0
[e]     activities.50.quantity must be a number conforming to the specified constraints
[e]     activities.50.unitPrice must not be less than 0
[e]     activities.50.unitPrice must be a number conforming to the specified constraints
[e]     activities.51.quantity must not be less than 0
[e]     activities.51.quantity must be a number conforming to the specified constraints
[e]     activities.51.unitPrice must not be less than 0
[e]     activities.51.unitPrice must be a number conforming to the specified constraints
[e]     activities.52.quantity must not be less than 0
[e]     activities.52.quantity must be a number conforming to the specified constraints
[e]     activities.52.unitPrice must not be less than 0
[e]     activities.52.unitPrice must be a number conforming to the specified constraints
[e]     activities.53.quantity must not be less than 0
[e]     activities.53.quantity must be a number conforming to the specified constraints
[e]     activities.53.unitPrice must not be less than 0
[e]     activities.53.unitPrice must be a number conforming to the specified constraints
[e]     activities.54.quantity must not be less than 0
[e]     activities.54.quantity must be a number conforming to the specified constraints
[e]     activities.54.unitPrice must not be less than 0
[e]     activities.54.unitPrice must be a number conforming to the specified constraints
[e]     activities.55.quantity must not be less than 0
[e]     activities.55.quantity must be a number conforming to the specified constraints
[e]     activities.55.unitPrice must not be less than 0
[e]     activities.55.unitPrice must be a number conforming to the specified constraints
[e]     activities.56.quantity must not be less than 0
[e]     activities.56.quantity must be a number conforming to the specified constraints
[e]     activities.56.unitPrice must not be less than 0
[e]     activities.56.unitPrice must be a number conforming to the specified constraints
[e]     activities.57.quantity must not be less than 0
[e]     activities.57.quantity must be a number conforming to the specified constraints
[e]     activities.57.unitPrice must not be less than 0
[e]     activities.57.unitPrice must be a number conforming to the specified constraints
[e]     activities.58.quantity must not be less than 0
[e]     activities.58.quantity must be a number conforming to the specified constraints
[e]     activities.58.unitPrice must not be less than 0
[e]     activities.58.unitPrice must be a number conforming to the specified constraints
[e]     activities.59.quantity must not be less than 0
[e]     activities.59.quantity must be a number conforming to the specified constraints
[e]     activities.59.unitPrice must not be less than 0
[e]     activities.59.unitPrice must be a number conforming to the specified constraints
[e]     activities.60.quantity must not be less than 0
[e]     activities.60.quantity must be a number conforming to the specified constraints
[e]     activities.60.unitPrice must not be less than 0
[e]     activities.60.unitPrice must be a number conforming to the specified constraints
[e]     activities.61.quantity must not be less than 0
[e]     activities.61.quantity must be a number conforming to the specified constraints
[e]     activities.61.unitPrice must not be less than 0
[e]     activities.61.unitPrice must be a number conforming to the specified constraints
[e]     activities.62.quantity must not be less than 0
[e]     activities.62.quantity must be a number conforming to the specified constraints
[e]     activities.62.unitPrice must not be less than 0
[e]     activities.62.unitPrice must be a number conforming to the specified constraints
[e]     activities.63.quantity must not be less than 0
[e]     activities.63.quantity must be a number conforming to the specified constraints
[e]     activities.63.unitPrice must not be less than 0
[e]     activities.63.unitPrice must be a number conforming to the specified constraints
[e]     activities.64.quantity must not be less than 0
[e]     activities.64.quantity must be a number conforming to the specified constraints
[e]     activities.64.unitPrice must not be less than 0
[e]     activities.64.unitPrice must be a number conforming to the specified constraints
[e]     activities.65.quantity must not be less than 0
[e]     activities.65.quantity must be a number conforming to the specified constraints
[e]     activities.65.unitPrice must not be less than 0
[e]     activities.65.unitPrice must be a number conforming to the specified constraints
[e]     activities.66.quantity must not be less than 0
[e]     activities.66.quantity must be a number conforming to the specified constraints
[e]     activities.66.unitPrice must not be less than 0
[e]     activities.66.unitPrice must be a number conforming to the specified constraints
[e]     activities.67.quantity must not be less than 0
[e]     activities.67.quantity must be a number conforming to the specified constraints
[e]     activities.67.unitPrice must not be less than 0
[e]     activities.67.unitPrice must be a number conforming to the specified constraints
[e]     activities.68.quantity must not be less than 0
[e]     activities.68.quantity must be a number conforming to the specified constraints
[e]     activities.68.unitPrice must not be less than 0
[e]     activities.68.unitPrice must be a number conforming to the specified constraints
[e]     activities.69.quantity must not be less than 0
[e]     activities.69.quantity must be a number conforming to the specified constraints
[e]     activities.69.unitPrice must not be less than 0
[e]     activities.69.unitPrice must be a number conforming to the specified constraints
[e]     activities.70.quantity must not be less than 0
[e]     activities.70.quantity must be a number conforming to the specified constraints
[e]     activities.70.unitPrice must not be less than 0
[e]     activities.70.unitPrice must be a number conforming to the specified constraints
[e]     activities.71.quantity must not be less than 0
[e]     activities.71.quantity must be a number conforming to the specified constraints
[e]     activities.71.unitPrice must not be less than 0
[e]     activities.71.unitPrice must be a number conforming to the specified constraints
[e]     activities.72.quantity must not be less than 0
[e]     activities.72.quantity must be a number conforming to the specified constraints
[e]     activities.72.unitPrice must not be less than 0
[e]     activities.72.unitPrice must be a number conforming to the specified constraints
[e]     activities.73.quantity must not be less than 0
[e]     activities.73.quantity must be a number conforming to the specified constraints
[e]     activities.73.unitPrice must not be less than 0
[e]     activities.73.unitPrice must be a number conforming to the specified constraints
[e]     activities.74.quantity must not be less than 0
[e]     activities.74.quantity must be a number conforming to the specified constraints
[e]     activities.74.unitPrice must not be less than 0
[e]     activities.74.unitPrice must be a number conforming to the specified constraints
[e]     activities.75.quantity must not be less than 0
[e]     activities.75.quantity must be a number conforming to the specified constraints
[e]     activities.75.unitPrice must not be less than 0
[e]     activities.75.unitPrice must be a number conforming to the specified constraints
[e]     activities.76.quantity must not be less than 0
[e]     activities.76.quantity must be a number conforming to the specified constraints
[e]     activities.76.unitPrice must not be less than 0
[e]     activities.76.unitPrice must be a number conforming to the specified constraints
[e]     activities.77.quantity must not be less than 0
[e]     activities.77.quantity must be a number conforming to the specified constraints
[e]     activities.77.unitPrice must not be less than 0
[e]     activities.77.unitPrice must be a number conforming to the specified constraints
[e]     activities.78.quantity must not be less than 0
[e]     activities.78.quantity must be a number conforming to the specified constraints
[e]     activities.78.unitPrice must not be less than 0
[e]     activities.78.unitPrice must be a number conforming to the specified constraints
[e]     activities.79.quantity must not be less than 0
[e]     activities.79.quantity must be a number conforming to the specified constraints
[e]     activities.79.unitPrice must not be less than 0
[e]     activities.79.unitPrice must be a number conforming to the specified constraints
[e]     activities.80.quantity must not be less than 0
[e]     activities.80.quantity must be a number conforming to the specified constraints
[e]     activities.80.unitPrice must not be less than 0
[e]     activities.80.unitPrice must be a number conforming to the specified constraints
[e]     activities.81.quantity must not be less than 0
[e]     activities.81.quantity must be a number conforming to the specified constraints
[e]     activities.81.unitPrice must not be less than 0
[e]     activities.81.unitPrice must be a number conforming to the specified constraints
[e]     activities.82.quantity must not be less than 0
[e]     activities.82.quantity must be a number conforming to the specified constraints
[e]     activities.82.unitPrice must not be less than 0
[e]     activities.82.unitPrice must be a number conforming to the specified constraints
[e]     activities.83.quantity must not be less than 0
[e]     activities.83.quantity must be a number conforming to the specified constraints
[e]     activities.83.unitPrice must not be less than 0
[e]     activities.83.unitPrice must be a number conforming to the specified constraints
[e]     activities.84.quantity must not be less than 0
[e]     activities.84.quantity must be a number conforming to the specified constraints
[e]     activities.84.unitPrice must not be less than 0
[e]     activities.84.unitPrice must be a number conforming to the specified constraints
[e]     activities.85.quantity must not be less than 0
[e]     activities.85.quantity must be a number conforming to the specified constraints
[e]     activities.85.unitPrice must not be less than 0
[e]     activities.85.unitPrice must be a number conforming to the specified constraints
[e]     activities.86.quantity must not be less than 0
[e]     activities.86.quantity must be a number conforming to the specified constraints
[e]     activities.86.unitPrice must not be less than 0
[e]     activities.86.unitPrice must be a number conforming to the specified constraints
[e]     activities.87.quantity must not be less than 0
[e]     activities.87.quantity must be a number conforming to the specified constraints
[e]     activities.87.unitPrice must not be less than 0
[e]     activities.87.unitPrice must be a number conforming to the specified constraints
[e]     activities.88.quantity must not be less than 0
[e]     activities.88.quantity must be a number conforming to the specified constraints
[e]     activities.88.unitPrice must not be less than 0
[e]     activities.88.unitPrice must be a number conforming to the specified constraints
[e]     activities.89.quantity must not be less than 0
[e]     activities.89.quantity must be a number conforming to the specified constraints
[e]     activities.89.unitPrice must not be less than 0
[e]     activities.89.unitPrice must be a number conforming to the specified constraints
[e]     activities.90.quantity must not be less than 0
[e]     activities.90.quantity must be a number conforming to the specified constraints
[e]     activities.90.unitPrice must not be less than 0
[e]     activities.90.unitPrice must be a number conforming to the specified constraints
[e]     activities.91.quantity must not be less than 0
[e]     activities.91.quantity must be a number conforming to the specified constraints
[e]     activities.91.unitPrice must not be less than 0
[e]     activities.91.unitPrice must be a number conforming to the specified constraints
[e]     activities.92.quantity must not be less than 0
[e]     activities.92.quantity must be a number conforming to the specified constraints
[e]     activities.92.unitPrice must not be less than 0
[e]     activities.92.unitPrice must be a number conforming to the specified constraints
[e]     activities.93.quantity must not be less than 0
[e]     activities.93.quantity must be a number conforming to the specified constraints
[e]     activities.93.unitPrice must not be less than 0
[e]     activities.93.unitPrice must be a number conforming to the specified constraints
[e]     activities.94.quantity must not be less than 0
[e]     activities.94.quantity must be a number conforming to the specified constraints
[e]     activities.94.unitPrice must not be less than 0
[e]     activities.94.unitPrice must be a number conforming to the specified constraints
[e]     activities.95.quantity must not be less than 0
[e]     activities.95.quantity must be a number conforming to the specified constraints
[e]     activities.95.unitPrice must not be less than 0
[e]     activities.95.unitPrice must be a number conforming to the specified constraints
[e]     activities.96.quantity must not be less than 0
[e]     activities.96.quantity must be a number conforming to the specified constraints
[e]     activities.96.unitPrice must not be less than 0
[e]     activities.96.unitPrice must be a number conforming to the specified constraints
[e]     activities.97.quantity must not be less than 0
[e]     activities.97.quantity must be a number conforming to the specified constraints
[e]     activities.97.unitPrice must not be less than 0
[e]     activities.97.unitPrice must be a number conforming to the specified constraints
[e]     activities.98.quantity must not be less than 0
[e]     activities.98.quantity must be a number conforming to the specified constraints
[e]     activities.98.unitPrice must not be less than 0
[e]     activities.98.unitPrice must be a number conforming to the specified constraints
[e]     activities.99.quantity must not be less than 0
[e]     activities.99.quantity must be a number conforming to the specified constraints
[e]     activities.99.unitPrice must not be less than 0
[e]     activities.99.unitPrice must be a number conforming to the specified constraints
[e]     activities.100.quantity must not be less than 0
[e]     activities.100.quantity must be a number conforming to the specified constraints
[e]     activities.100.unitPrice must not be less than 0
[e]     activities.100.unitPrice must be a number conforming to the specified constraints
[e]     activities.101.quantity must not be less than 0
[e]     activities.101.quantity must be a number conforming to the specified constraints
[e]     activities.101.unitPrice must not be less than 0
[e]     activities.101.unitPrice must be a number conforming to the specified constraints
[e]     activities.102.quantity must not be less than 0
[e]     activities.102.quantity must be a number conforming to the specified constraints
[e]     activities.102.unitPrice must not be less than 0
[e]     activities.102.unitPrice must be a number conforming to the specified constraints
[e]     activities.103.quantity must not be less than 0
[e]     activities.103.quantity must be a number conforming to the specified constraints
[e]     activities.103.unitPrice must not be less than 0
[e]     activities.103.unitPrice must be a number conforming to the specified constraints
[e]     activities.104.quantity must not be less than 0
[e]     activities.104.quantity must be a number conforming to the specified constraints
[e]     activities.104.unitPrice must not be less than 0
[e]     activities.104.unitPrice must be a number conforming to the specified constraints
[e]     activities.105.quantity must not be less than 0
[e]     activities.105.quantity must be a number conforming to the specified constraints
[e]     activities.105.unitPrice must not be less than 0
[e]     activities.105.unitPrice must be a number conforming to the specified constraints
[e]     activities.106.quantity must not be less than 0
[e]     activities.106.quantity must be a number conforming to the specified constraints
[e]     activities.106.unitPrice must not be less than 0
[e]     activities.106.unitPrice must be a number conforming to the specified constraints
[e]     activities.107.quantity must not be less than 0
[e]     activities.107.quantity must be a number conforming to the specified constraints
[e]     activities.107.unitPrice must not be less than 0
[e]     activities.107.unitPrice must be a number conforming to the specified constraints
[e]     activities.108.quantity must not be less than 0
[e]     activities.108.quantity must be a number conforming to the specified constraints
[e]     activities.108.unitPrice must not be less than 0
[e]     activities.108.unitPrice must be a number conforming to the specified constraints
[e]     activities.109.quantity must not be less than 0
[e]     activities.109.quantity must be a number conforming to the specified constraints
[e]     activities.109.unitPrice must not be less than 0
[e]     activities.109.unitPrice must be a number conforming to the specified constraints
[e]     activities.110.quantity must not be less than 0
[e]     activities.110.quantity must be a number conforming to the specified constraints
[e]     activities.110.unitPrice must not be less than 0
[e]     activities.110.unitPrice must be a number conforming to the specified constraints
[e]     activities.111.quantity must not be less than 0
[e]     activities.111.quantity must be a number conforming to the specified constraints
[e]     activities.111.unitPrice must not be less than 0
[e]     activities.111.unitPrice must be a number conforming to the specified constraints
[e]     activities.112.quantity must not be less than 0
[e]     activities.112.quantity must be a number conforming to the specified constraints
[e]     activities.112.unitPrice must not be less than 0
[e]     activities.112.unitPrice must be a number conforming to the specified constraints
[e]     activities.113.quantity must not be less than 0
[e]     activities.113.quantity must be a number conforming to the specified constraints
[e]     activities.113.unitPrice must not be less than 0
[e]     activities.113.unitPrice must be a number conforming to the specified constraints
[e]     activities.114.quantity must not be less than 0
[e]     activities.114.quantity must be a number conforming to the specified constraints
[e]     activities.114.unitPrice must not be less than 0
[e]     activities.114.unitPrice must be a number conforming to the specified constraints
[e]     activities.115.quantity must not be less than 0
[e]     activities.115.quantity must be a number conforming to the specified constraints
[e]     activities.115.unitPrice must not be less than 0
[e]     activities.115.unitPrice must be a number conforming to the specified constraints
[e]     activities.116.quantity must not be less than 0
[e]     activities.116.quantity must be a number conforming to the specified constraints
[e]     activities.116.unitPrice must not be less than 0
[e]     activities.116.unitPrice must be a number conforming to the specified constraints
[e]     activities.117.quantity must not be less than 0
[e]     activities.117.quantity must be a number conforming to the specified constraints
[e]     activities.117.unitPrice must not be less than 0
[e]     activities.117.unitPrice must be a number conforming to the specified constraints
[e]     activities.118.quantity must not be less than 0
[e]     activities.118.quantity must be a number conforming to the specified constraints
[e]     activities.118.unitPrice must not be less than 0
[e]     activities.118.unitPrice must be a number conforming to the specified constraints
[e]     activities.119.quantity must not be less than 0
[e]     activities.119.quantity must be a number conforming to the specified constraints
[e]     activities.119.unitPrice must not be less than 0
[e]     activities.119.unitPrice must be a number conforming to the specified constraints
[e]     activities.120.quantity must not be less than 0
[e]     activities.120.quantity must be a number conforming to the specified constraints
[e]     activities.120.unitPrice must not be less than 0
[e]     activities.120.unitPrice must be a number conforming to the specified constraints
[e]     activities.121.quantity must not be less than 0
[e]     activities.121.quantity must be a number conforming to the specified constraints
[e]     activities.121.unitPrice must not be less than 0
[e]     activities.121.unitPrice must be a number conforming to the specified constraints
[e]     activities.122.quantity must not be less than 0
[e]     activities.122.quantity must be a number conforming to the specified constraints
[e]     activities.122.unitPrice must not be less than 0
[e]     activities.122.unitPrice must be a number conforming to the specified constraints
[e]     activities.123.quantity must not be less than 0
[e]     activities.123.quantity must be a number conforming to the specified constraints
[e]     activities.123.unitPrice must not be less than 0
[e]     activities.123.unitPrice must be a number conforming to the specified constraints
[e]     activities.124.quantity must not be less than 0
[e]     activities.124.quantity must be a number conforming to the specified constraints
[e]     activities.124.unitPrice must not be less than 0
[e]     activities.124.unitPrice must be a number conforming to the specified constraints
[e]     activities.125.quantity must not be less than 0
[e]     activities.125.quantity must be a number conforming to the specified constraints
[e]     activities.125.each value in type must be one of the following values: BUY, DIVIDEND, FEE, INTEREST, ITEM, LIABILITY, SELL
[e]     activities.125.unitPrice must not be less than 0
[e]     activities.125.unitPrice must be a number conforming to the specified constraints
[e]     activities.126.quantity must not be less than 0
[e]     activities.126.quantity must be a number conforming to the specified constraints
[e]     activities.126.each value in type must be one of the following values: BUY, DIVIDEND, FEE, INTEREST, ITEM, LIABILITY, SELL
[e]     activities.126.unitPrice must not be less than 0
[e]     activities.126.unitPrice must be a number conforming to the specified constraints
[e]     activities.127.quantity must not be less than 0
[e]     activities.127.quantity must be a number conforming to the specified constraints
[e]     activities.127.each value in type must be one of the following values: BUY, DIVIDEND, FEE, INTEREST, ITEM, LIABILITY, SELL
[e]     activities.127.unitPrice must not be less than 0
[e]     activities.127.unitPrice must be a number conforming to the specified constraints
[e] Did not complete automatic import & validation due to errors: Error: Automatic import failed! See the logs for more details.```

Do you know how I have this errors?

[xStation5_cashOperations_1668234_31-12-2006--27-09-2024 (2).csv](https://github.com/user-attachments/files/18476830/xStation5_cashOperations_1668234_31-12-2006--27-09-2024.2.csv)

@dickwolff
Copy link
Owner

I will check!

@dickwolff
Copy link
Owner

dickwolff commented Jan 20, 2025

I see some issues with dividend without tax. That is fixed.

@rubengr I also see type spin off. How should this be handled? A sell action?

Edit: the data scheme looks most similar to a dividend action, so I added it as such.

@rubengr
Copy link
Author

rubengr commented Jan 20, 2025

No, it's when a new company is created. I think should be a buy with 0.00€ or sell if is a sell action. But in this case i just export the dividends and don't see the spinoff. Which line is this spinoff? Could be dividends related to the spinoff company.
Edit: I see now, yes its dividends

@dickwolff
Copy link
Owner

dickwolff commented Jan 20, 2025

Your original file (2 back, called xStation5_cashOperations.csv) contained records like these:

244234503;Spin off;13.04.2022 14:50:01;T.US;T.US USD 5.8970/ SHR;21.68
244233183;Spin off;13.04.2022 14:50:01;T.US;T.US USD 5.8970/ SHR;21.68

I am familiar with spin offs. However there are no buy records associated to this. So in this case I think you got paid in cash instead of stocks?

@rubengr
Copy link
Author

rubengr commented Jan 20, 2025

Yes it is. I have checked again and you are right.

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

rubengr commented Jan 29, 2025

Hi, have you fixed spin off?
Thanks

@dickwolff
Copy link
Owner

Should be in 0.23.1 and forwards. So latest main should have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working XTB Related to XTB
Projects
None yet
3 participants