Skip to content

[degiro] Error processing STOCK DIVIDEND #280

@64knl

Description

@64knl

Describe the bug
Transactions result in an incorrect number of stocks because 'STOCK DIVIDENT' is processed as 'SELL'.

Version
main branch on GIT with docker

Expected behavior
After import the resulting number of stock should be 90.

Provide error input

12-06-2025,10:24,06-06-2025,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0015002H05,Verrekening van Aandelen,,EUR,"14,19",EUR,"416,59",
11-06-2025,14:10,06-06-2025,PHILIPS KONINKLIJKE,NL0000009538,STOCK DIVIDEND: Koop 3 @ 0 EUR,,EUR,"0,00",EUR,"371,84",
11-06-2025,14:10,06-06-2025,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0015002H05,STOCK DIVIDEND: Verkoop 87 @ 0 EUR,,EUR,"0,00",EUR,"371,84",
10-06-2025,09:59,06-06-2025,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0015002H05,DELISTING: Koop 87 @ 0 EUR,,EUR,"0,00",EUR,"374,16",
09-06-2025,11:24,06-06-2025,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0015002H05,DELISTING: Verkoop 87 @ 0 EUR,,EUR,"0,00",EUR,"374,16",
12-05-2025,15:29,12-05-2025,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0015002H05,CLAIMEMISSIE: Koop 87 @ 0 EUR,,EUR,"0,00",EUR,"265,91",
16-05-2024,17:10,16-05-2024,PHILIPS KONINKLIJKE,NL0000009538,Verrekening van Aandelen,,EUR,"23,10",EUR,"237,98",
16-05-2024,14:59,09-05-2024,PHILIPS KONINKLIJKE,NL0000009538,STOCK DIVIDEND: Koop 2 @ 0 EUR,,EUR,"0,00",EUR,"214,88",
23-05-2023,15:18,23-05-2023,PHILIPS KONINKLIJKE,NL0000009538,Verrekening van Aandelen,,EUR,"12,38",EUR,"895,56",
22-05-2023,09:30,22-05-2023,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0000009538,WIJZIGING ISIN: Verkoop 3 @ 0 EUR,,EUR,"0,00",EUR,"869,97",
22-05-2023,09:30,22-05-2023,PHILIPS KONINKLIJKE,NL0000009538,WIJZIGING ISIN: Koop 3 @ 0 EUR,,EUR,"0,00",EUR,"869,97",
18-05-2023,10:53,11-05-2023,PHILIPS KONINKLIJKE - NON TRADEABLE,NL0000009538,STOCK DIVIDEND: Koop 3 @ 0 EUR,,EUR,"0,00",EUR,"869,97",
27-07-2022,16:47,27-07-2022,PHILIPS KONINKLIJKE,NL0000009538,DEGIRO Transactiekosten en/of kosten van derden,,EUR,"-2,50",EUR,"218,40",4906c360-2ced-4b7a-aca9-92de76238b22
27-07-2022,16:47,27-07-2022,PHILIPS KONINKLIJKE,NL0000009538,"Koop 62 @ 20,745 EUR",,EUR,"-1286,19",EUR,"220,90",4906c360-2ced-4b7a-aca9-92de76238b22
09-06-2022,09:37,08-06-2022,PHILIPS KONINKLIJKE,NL0000009538,Dividend,,EUR,"17,00",EUR,"1414,30",
09-06-2022,09:37,08-06-2022,PHILIPS KONINKLIJKE,NL0000009538,Dividendbelasting,,EUR,"-2,55",EUR,"1397,30",
10-03-2022,09:21,10-03-2022,PHILIPS KONINKLIJKE,NL0000009538,DEGIRO Transactiekosten en/of kosten van derden,,EUR,"-2,50",EUR,"1961,36",29d4202d-a248-4932-a908-3b754b4caca3
10-03-2022,09:21,10-03-2022,PHILIPS KONINKLIJKE,NL0000009538,"Koop 20 @ 28,9 EUR",,EUR,"-578,00",EUR,"1963,86",29d4202d-a248-4932-a908-3b754b4caca3

The resulting JSON is:

[
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 0,
      "quantity": 3,
      "type": "SELL",
      "unitPrice": 0,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2025-06-11T14:10:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 0,
      "quantity": 2,
      "type": "SELL",
      "unitPrice": 0,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2024-05-16T14:59:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 0,
      "quantity": 3,
      "type": "SELL",
      "unitPrice": 0,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2023-05-22T09:30:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 0,
      "quantity": 3,
      "type": "SELL",
      "unitPrice": 0,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2023-05-22T09:30:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 2.5,
      "quantity": 3,
      "type": "SELL",
      "unitPrice": 0,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2023-05-18T10:53:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 0,
      "quantity": 62,
      "type": "BUY",
      "unitPrice": 20.745,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2022-07-27T16:47:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 2.55,
      "quantity": 1,
      "type": "DIVIDEND",
      "unitPrice": 17,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2022-06-09T09:37:00+02:00",
      "symbol": "PHIA.AS"
    },
    {
      "accountId": "account-id",
      "comment": null,
      "fee": 2.5,
      "quantity": 20,
      "type": "BUY",
      "unitPrice": 28.9,
      "currency": "EUR",
      "dataSource": "YAHOO",
      "date": "2022-03-10T09:21:00+01:00",
      "symbol": "PHIA.AS"
    }
  ]

Additional context
Bad idea to invest in PHILIPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions