Skip to content
Open
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
6 changes: 6 additions & 0 deletions comdirect_api/comdirect_client.py
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify that this fix works for the refresh workflow.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def __init__(
self.session = pickle.load(input)
self.auth_service = pickle.load(input)

# Es gibt im session-Objekt ein auth-Objekt
# Es gibt im auth_service-Objekt ein session-Objekt
# Alle sind nach pickle.load verschieden!
self.auth_service.session = self.session
self.session.auth = self.auth_service.auth

def session_export(self, filename: str = "session.pkl"):
with open(filename, "wb") as output:
pickle.dump(self.session, output, pickle.HIGHEST_PROTOCOL)
Expand Down
7 changes: 4 additions & 3 deletions comdirect_api/service/order_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def get_dimensions(self, **kwargs) -> Any:
"""
kwargs_mapping = {
"instrument_id": "instrumentId",
"wkn": "WKN",
"isin": "ISIN",
"wkn": "wkn", # Dokumentation ist falsch, wkn muss klein geschrieben werden!
"isin": "isin",
"mneomic": "mneomic",
"venue_id": "venueId",
"side": "side",
Expand All @@ -45,7 +45,8 @@ def get_dimensions(self, **kwargs) -> Any:
raise ValueError("Keyword argument {} is invalid".format(arg))
else:
params[api_arg] = val
response = self.session.get(url, json=params).json()

response = self.session.get(url, params=params).json()
return response

def get_all_orders(
Expand Down