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 degiro error #131

Closed
rubengr opened this issue Dec 7, 2024 · 8 comments
Closed

Transaction degiro error #131

rubengr opened this issue Dec 7, 2024 · 8 comments
Assignees
Labels
Bug Something isn't working DEGIRO Related to DEGIRO

Comments

@rubengr
Copy link

rubengr commented Dec 7, 2024

Hi

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

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

[email protected] start
tsx ./src/manual.ts degiro

[i] Starting Export to Ghostfolio v0.19.1
[i] Restored 0 ISIN-symbol pairs and 1 symbols from cache..
[i] Processing file using DeGiro converter
[i] There is a new version of the DEGIRO converter available in public beta and we're looking for feedback!
[i] You can enable the new converter by setting the environment variable DEGIRO_FORCE_V3=true
[i] Read CSV file. Start processing..
[i] ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA 0s | Duration: 1s | 5/1633We expected a redirect to guce.yahoo.com/
We'll try to continue anyway - you can safely ignore this if the request succeeds
[d] getSecurity(): Found 1 match by ISIN US1912161007
[d] getSecurity(): Match found for US1912161007
[d] Retrieved symbol KO from cache!
[d] getSecurity(): Found 1 match by ISIN US0378331005
[d] getSecurity(): No initial match found, trying by symbol AAPL
[d] getSymbolsByQuery(): Quote 'AAPL' has no symbol at Yahoo Finance undefined. Skipping..
[d] getSecurity(): No match found for symbol AAPL, trying by name APPLE INC
[d] getSecurity(): Match found for US0378331005
[d] getSecurity(): Found 1 match by ISIN KYG9830T1067
[d] getSecurity(): No initial match found, trying by symbol 1810
[d] getSecurity(): Match found for KYG9830T1067
[d] getSecurity(): Found 1 match by ISIN US44951Y1029
[d] getSecurity(): Match found for US44951Y1029
[d] getSecurity(): Found 1 match by ISIN US44951Y2019
[d] getSecurity(): Match found for US44951Y2019
[d] Retrieved symbol HYZN from cache!
[d] getSecurity(): Found 2 matches by ISIN PLLVTSF00010
[d] getSecurity(): Match found for PLLVTSF00010
[d] Retrieved symbol TXT.WA from cache!
[i] █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2% | ETA 46s | Duration: 4s | 35/1633
[e] An error ocurred while trying to retrieve an empty symbol (line 44)!

[e] An error ocurred while processing.
[e] TypeError: progress.log is not a function`

`

<style> </style>

Data,Hora,Data Valor,Produto,ISIN,Descrição,T.,Mudança,,Saldo,,ID da Ordem

07-10-2024,00:41,30-09-2024,,,Flatex Interest Income,,EUR,0.00,EUR,644.02,
03-10-2024,19:46,03-10-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-5.21,EUR,644.02,
03-10-2024,19:46,03-10-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 5,21 EUR",,,,EUR,649.23,
03-10-2024,06:50,02-10-2024,,,Crédito de divisa,,EUR,5.21,EUR,644.02,
03-10-2024,06:50,02-10-2024,,,Levantamento de divisa,1.1072,USD,-5.77,USD,0.00,
02-10-2024,07:36,01-10-2024,COCA-COLA,US1912161007,Imposto sobre dividendo,,USD,-1.02,USD,5.77,
02-10-2024,07:36,01-10-2024,COCA-COLA,US1912161007,Dividendo,,USD,6.79,USD,6.79,
20-09-2024,11:15,19-09-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 406,83 EUR",,,,EUR,638.81,
20-09-2024,11:15,19-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-406.83,EUR,231.98,
19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Levantamento de divisa,1.1191,USD,-457.52,USD,0.00,711b1ad7-a370-4c88-bc86-074aada4a278
19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Crédito de divisa,,EUR,408.83,EUR,638.81,711b1ad7-a370-4c88-bc86-074aada4a278
19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Comissões de transação DEGIRO e/ou taxas de terceiros,,EUR,-2.00,EUR,229.98,711b1ad7-a370-4c88-bc86-074aada4a278
19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,"Venda 2 Apple Inc@228,76 USD (US0378331005)",,USD,457.52,USD,457.52,711b1ad7-a370-4c88-bc86-074aada4a278
18-09-2024,10:45,17-09-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 166,3 EUR",,,,EUR,231.98,
18-09-2024,10:45,17-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-166.30,EUR,65.68,
17-09-2024,20:18,17-09-2024,XIAOMI CORP,KYG9830T1067,Comissões de transação DEGIRO e/ou taxas de terceiros,,EUR,-3.90,EUR,231.98,aa6fced5-f29f-4547-92c0-600e3c4f178c
17-09-2024,20:18,17-09-2024,XIAOMI CORP,KYG9830T1067,"Venda 76 Xiaomi Corp@2,2395 EUR (KYG9830T1067)",,EUR,170.20,EUR,235.88,aa6fced5-f29f-4547-92c0-600e3c4f178c
12-09-2024,19:00,12-09-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 0,42 EUR",,,,EUR,65.68,
12-09-2024,19:00,12-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-0.42,EUR,65.26,
12-09-2024,06:56,11-09-2024,,,Crédito de divisa,,EUR,0.42,EUR,65.68,
12-09-2024,06:56,11-09-2024,,,Levantamento de divisa,1.1040,USD,-0.46,USD,0.00,
11-09-2024,16:03,11-09-2024,HYZON MOTORS INC,US44951Y1029,Corporate Action Cash Settlement Stock,,USD,0.46,USD,0.46,
11-09-2024,16:03,11-09-2024,HYZON MOTORS INC,US44951Y1029,DESLISTADO: Venda 10 Hyzon Motors Inc@0 USD (US44951Y1029),,USD,0.00,USD,0.00,
11-09-2024,15:10,11-09-2024,HYZON MOTORS INC. - CLASS A COMMON,US44951Y2019,"STOCK SPLIT: Compra 0 HYZON MOTORS INC. - CLASS A COMMON STOCK@2,705 USD (US44951Y2019)",,USD,0.00,USD,0.00,
11-09-2024,15:10,11-09-2024,HYZON MOTORS INC,US44951Y1029,"STOCK SPLIT: Compra 0 Hyzon Motors Inc@0,0541 USD (US44951Y1029)",,USD,0.00,USD,0.00,
06-09-2024,17:00,06-09-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 5,21 EUR",,,,EUR,65.26,
06-09-2024,17:00,06-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-5.21,EUR,60.05,
06-09-2024,07:02,05-09-2024,,,Crédito de divisa,,EUR,5.21,EUR,65.26,
06-09-2024,07:02,05-09-2024,,,Levantamento de divisa,4.2934,PLN,-22.36,PLN,0.00,
06-09-2024,05:25,05-09-2024,TEXT SA,PLLVTSF00010,Imposto sobre dividendo,,PLN,-5.24,PLN,22.36,
06-09-2024,05:25,05-09-2024,TEXT SA,PLLVTSF00010,Dividendo,,PLN,27.60,PLN,27.60,
05-09-2024,17:15,05-09-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 1,25 EUR",,,,EUR,60.05,
05-09-2024,17:15,05-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-1.25,EUR,58.80,
05-09-2024,06:53,04-09-2024,,,Crédito de divisa,,EUR,1.25,EUR,60.05,
05-09-2024,06:53,04-09-2024,,,Levantamento de divisa,1.1110,USD,-1.39,USD,0.00,
04-09-2024,07:19,03-09-2024,INTEL CORP,US4581401001,Imposto sobre dividendo,,USD,-0.24,USD,1.39,
04-09-2024,07:19,03-09-2024,INTEL CORP,US4581401001,Dividendo,,USD,1.63,USD,1.63,
04-09-2024,02:15,03-09-2024,,,"Levantamentos da sua Conta Caixa na flatexDEGIRO Bank AG: 2,5 EUR",,,,EUR,58.80,
04-09-2024,02:15,03-09-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,2.50,EUR,61.30,
03-09-2024,10:31,31-08-2024,,,Custo de Conectividade DEGIRO 2024 (Warsaw Stock Exchange - WSE),,EUR,-2.50,EUR,58.80,
23-08-2024,16:30,23-08-2024,FLATEX EURO BANKACCOUNT,NLFLATEXACNT,Degiro Cash Sweep Transfer,,EUR,-0.85,EUR,61.30,
23-08-2024,16:30,23-08-2024,,,"Depósitos na sua Conta Caixa na flatexDEGIRO Bank AG: 0,85 EUR",,,,EUR,62.15,
23-08-2024,12:21,23-08-2024,,,DEGIRO courtesy,,EUR,0.24,EUR,61.30,
23-08-2024,12:21,23-08-2024,,,DEGIRO courtesy,,EUR,0.61,EUR,61.06,

`
@dickwolff
Copy link
Owner

The issue is with DEGIRO courtesy, which was not supported in the tool. I have just added this, and it will be in the next release.

@dickwolff dickwolff self-assigned this Jan 3, 2025
@dickwolff dickwolff added Bug Something isn't working DEGIRO Related to DEGIRO labels Jan 3, 2025
@rubengr
Copy link
Author

rubengr commented Jan 29, 2025

In which branch are the fixes for this issue?
Thanks

@dickwolff
Copy link
Owner

Should be in latest main.

@rubengr
Copy link
Author

rubengr commented Jan 29, 2025

I continue to have errors

> tsx ./src/manual.ts degiro

[i] Starting Export to Ghostfolio v0.26.0
[i] Restored 12 ISIN-symbol pairs and 43 symbols from cache..
[i] Processing file using DeGiro converter
[i] There is a new version of the DEGIRO converter available in public beta and we're looking for feedback!
[i] You can enable the new converter by setting the environment variable DEGIRO_FORCE_V3=true
[i] Read CSV file. Start processing..
[i] ████████████████████████████████████████ 100% | ETA 0s | Duration: 0s | 92/92
[i] Processing complete, writing to file..
[i] Wrote data to 'e2g-output\ghostfolio-degiro-20250129184813.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.19.unitPrice must not be less than 0
[e]     activities.19.unitPrice 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] Did not complete automatic import & validation due to errors: Error: Automatic import failed! See the logs for more details.```

I think is related to unit price = null:

    {
        "accountId": "a712e643-c443-4802-8468-7bbf9c3e17bd",
        "comment": "",
        "fee": 0,
        "quantity": 0,
        "type": "SELL",
        "unitPrice": null,
        "currency": "USD",
        "dataSource": "YAHOO",
        "date": "2024-09-11T15:10:00+01:00",
        "symbol": "HYZN"
    },
    {
        "accountId": "a712e643-c443-4802-8468-7bbf9c3e17bd",
        "comment": "",
        "fee": 0,
        "quantity": 0,
        "type": "SELL",
        "unitPrice": null,
        "currency": "USD",
        "dataSource": "YAHOO",
        "date": "2024-09-11T15:10:00+01:00",
        "symbol": "HYZN"
    },

@dickwolff
Copy link
Owner

Are these perhaps related to #140? Because that has not been solved yet (I need to merge the code from #148 still)

@rubengr
Copy link
Author

rubengr commented Jan 29, 2025

I think that is not related.
Is related to this lines:

<style> </style>

Data,Hora,Data Valor,Produto,ISIN,Descrição,T.,Mudança,,Saldo,,ID da Ordem

11-09-2024,16:03,11-09-2024,HYZON MOTORS INC,US44951Y1029,Corporate Action Cash Settlement Stock,,USD,0.46,USD,0.46,
11-09-2024,16:03,11-09-2024,HYZON MOTORS INC,US44951Y1029,DESLISTADO: Venda 10 Hyzon Motors Inc@0 USD (US44951Y1029),,USD,0.00,USD,0.00,
11-09-2024,15:10,11-09-2024,HYZON MOTORS INC. - CLASS A COMMON,US44951Y2019,"STOCK SPLIT: Compra 0 HYZON MOTORS INC. - CLASS A COMMON STOCK@2,705 USD (US44951Y2019)",,USD,0.00,USD,0.00,
11-09-2024,15:10,11-09-2024,HYZON MOTORS INC,US44951Y1029,"STOCK SPLIT: Compra 0 Hyzon Motors Inc@0,0541 USD (US44951Y1029)",,USD,0.00,USD,0.00,

@dickwolff
Copy link
Owner

Gotcha. Will look into tomorrow.

@dickwolff
Copy link
Owner

Issue seems to be with DEGIRO V2, which I prefer not to maintain. Issue was with division by 0, which resulted in NaN. I added a isNan check and otherwise use 0 (same as DEGIRO V3). Should be in 0.26.1 (out soon).

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

No branches or pull requests

2 participants