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

Dividend removed on exDate #62

Open
claha opened this issue Jul 4, 2023 · 0 comments
Open

Dividend removed on exDate #62

claha opened this issue Jul 4, 2023 · 0 comments

Comments

@claha
Copy link
Owner

claha commented Jul 4, 2023

The current api endpoint "removes" the dividend on the exDate, I think it should be on paymentDate. To work around this there is an additional endpoint (for stocks and etfs at least) that could be defined and used.

AVANZA_API_STOCK_DETAILS_URL = AVANZA_API_STOCK_URL + "/details
AVANZA_API_ETF_DETAILS_URL = AVANZA_API_ETF_URL + "/details

Which could be used like this to check all events, if exDate has passed they seem to be in the pastEvents.

details = get_stock_details(id)
for dividend in details["dividends"]["events"] + details["dividends"]["pastEvents"]:
   ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant