Skip to content

Sometimes error getting positions #12

@danielaird27

Description

@danielaird27

I obtain my positions every 5 minutes or so and everything works most of the time but after a random amount of time, I get this error:

Traceback (most recent call last):
File "/home/danm/Documents/Trade/trade.py", line 427, in getCurrentPositions
positions = ws.get_positions(account_ids[0])
File "/home/danm/.local/lib/python3.9/site-packages/wealthsimple/wealthsimple.py", line 283, in get_positions
return response["results"]
KeyError: 'results'

What could cause this issue? What are your opinions on how to fix this problem?

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