Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pytr/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class PPEventType(EventType):
"TRADING_ORDER_EXPIRED",
"TRADING_ORDER_REJECTED",
"TRADING_SAVINGSPLAN_EXECUTION_FAILED",
"TRADING_SAVINGSPLAN_EXECUTION_PENDING",
"VERIFICATION_TRANSFER_ACCEPTED",
"YEAR_END_TAX_REPORT",
]
Expand Down Expand Up @@ -506,7 +507,7 @@ def from_dict(cls, event_dict: Dict[Any, Any]):
break

# If still no event type, try to deduce it from the overview section
if event_type is None and uebersicht_dict:
if event_type is None and uebersicht_dict and eventTypeStr not in events_known_ignored:
for item in uebersicht_dict.get("data", []):
ititle = item.get("title")
if ititle in ["Kartenzahlung", "Zahlung"]:
Expand All @@ -527,7 +528,7 @@ def from_dict(cls, event_dict: Dict[Any, Any]):
event_type = PPEventType.DIVIDEND

# If still no event type, try to deduce it from the sections
if event_type is None and sections:
if event_type is None and sections and eventTypeStr not in events_known_ignored:
for item in sections:
ititle = item.get("title")
if ititle is None:
Expand Down
143 changes: 143 additions & 0 deletions tests/events/trading_savingsplan_execution_pending.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"id": "be638bf9-7bd9-400a-b401-548571f72f23",
"timestamp": "2026-09-16T01:05:56.903+0000",
"title": "Enovix",
"icon": "logos/US2935941078/v2",
"avatar": {
"asset": "logos/US2935941078/v2",
"badge": null
},
"badge": null,
"subtitle": "Sparplan ausstehend",
"amount": {
"currency": "EUR",
"value": -20.0,
"fractionDigits": 2
},
"subAmount": null,
"status": "EXECUTED",
"action": {
"type": "timelineDetail",
"payload": "be638bf9-7bd9-400a-b401-548571f72f23"
},
"cashAccountNumber": "123456789",
"hidden": false,
"deleted": false,
"eventType": "TRADING_SAVINGSPLAN_EXECUTION_PENDING",
"presentation": null,
"source": "timelineTransaction",
"details": {
"id": "be638bf9-7bd9-400a-b401-548571f72f23",
"sections": [
{
"title": "Du sparst 20,00€",
"data": {
"icon": {
"asset": "logos/US2935941078/v2",
"badge": null
},
"subtitleText": "16 Sept. · 01:05",
"status": "executed"
},
"action": {
"payload": "US2935941078",
"type": "instrumentDetail"
},
"type": "header"
},
{
"title": "Für heute geplant",
"description": "Dein Sparplan ist derzeit in Bearbeitung und soll heute abgeschlossen werden. Bitte warte bis zum Ende des Tages.",
"type": "banner"
},
{
"title": "Übersicht",
"data": [
{
"title": "Sparplan",
"detail": {
"text": "Ausstehend",
"functionalStyle": "PENDING",
"type": "status"
},
"style": "plain"
},
{
"title": "Zahlung",
"detail": {
"text": "Cash",
"icon": "logos/bank_traderepublic/v2",
"type": "iconWithText"
},
"style": "plain"
},
{
"title": "Asset",
"detail": {
"text": "Enovix",
"displayValue": {
"text": "Enovix",
"textDataSensitivity": "PUBLIC"
},
"type": "text"
},
"style": "plain"
},
{
"title": "Gebühr",
"detail": {
"text": "Kostenlos",
"displayValue": {
"text": "Kostenlos",
"textDataSensitivity": "PUBLIC"
},
"type": "text"
},
"style": "plain"
},
{
"title": "Summe",
"detail": {
"text": "20,00€",
"displayValue": {
"text": "20,00€",
"textDataSensitivity": "PUBLIC"
},
"type": "text"
},
"style": "plain"
}
],
"type": "table"
},
{
"title": "Sparplan",
"data": [
{
"title": "",
"detail": {
"title": "Enovix",
"timestamp": "2026-09-16T01:05:56.903723487Z",
"amount": "20,00€",
"icon": {
"asset": "logos/US2935941078/v2",
"badge": null
},
"status": "executed",
"action": {
"payload": {
"savingsPlanId": "fcb4bfbb-6159-4a74-b73f-b0282a86d567"
},
"type": "openSavingsPlanOverview"
},
"subtitle": "Wöchentlich",
"type": "embeddedTimelineItem"
},
"style": "plain"
}
],
"type": "table"
}
]
}
}
4 changes: 4 additions & 0 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2662,6 +2662,10 @@
}
],
},
{
"filename": "trading_savingsplan_execution_pending.json",
"event_type": None,
},
{
"filename": "vorabpauschale_negative.json",
"event_type": PPEventType.TAXES,
Expand Down