Title: Dividend objects returned by list_dividends() don't have a "currency" attribute · Issue #494 · massive-com/client-python · GitHub
Open Graph Title: Dividend objects returned by list_dividends() don't have a "currency" attribute · Issue #494 · massive-com/client-python
X Title: Dividend objects returned by list_dividends() don't have a "currency" attribute · Issue #494 · massive-com/client-python
Description: When fetching dividends using the python client (v1.12.2), the resulting objects are missing the "currency" field that the API documentation suggests should be there. Fetching from the Documentation page (or https://api.polygon.io/v3/ref...
Open Graph Description: When fetching dividends using the python client (v1.12.2), the resulting objects are missing the "currency" field that the API documentation suggests should be there. Fetching from the Documentatio...
X Description: When fetching dividends using the python client (v1.12.2), the resulting objects are missing the "currency" field that the API documentation suggests should be there. Fetching from the Do...
Opengraph URL: https://github.com/massive-com/client-python/issues/494
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dividend objects returned by list_dividends() don't have a \"currency\" attribute","articleBody":"When fetching dividends using the python client (v1.12.2), the resulting objects are missing the \"currency\" field that the API documentation suggests should be there. \r\n\r\nFetching from the Documentation page (or https://api.polygon.io/v3/reference/dividends?ticker=ENB\u0026apiKey=) yields:\r\n```\r\n{\r\n \"results\": [\r\n {\r\n \"cash_amount\": 0.8875,\r\n \"currency\": \"CAD\",\r\n \"declaration_date\": \"2023-08-01\",\r\n \"dividend_type\": \"CD\",\r\n \"ex_dividend_date\": \"2023-08-14\",\r\n \"frequency\": 4,\r\n \"pay_date\": \"2023-09-01\",\r\n \"record_date\": \"2023-08-15\",\r\n \"ticker\": \"ENB\"\r\n },\r\n ...\r\n```\r\n\r\nHowever, using the python client yields:\r\n```\r\nfrom polygon import RESTClient\r\nclient = RESTClient(key)\r\ndividends = list(client.list_dividends('ENB'))\r\nprint(dividends[0])\r\nprint(dividends[0].cash_amount)\r\nprint(dividends[0].currency)\r\n\r\nDividend(cash_amount=0.8875, declaration_date='2023-08-01', dividend_type='CD', ex_dividend_date='2023-08-14', frequency=4, pay_date='2023-09-01', record_date='2023-08-15', ticker='ENB')\r\n0.8875\r\nTraceback (most recent call last):\r\n File \"...\", line 12, in \u003cmodule\u003e\r\n print(dividends[0].currency)\r\n ^^^^^^^^^^^^^^^^^^^^^\r\nAttributeError: 'Dividend' object has no attribute 'currency'\r\n```\r\n","author":{"url":"https://github.com/bfoz","@type":"Person","name":"bfoz"},"datePublished":"2023-08-07T23:15:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/494/client-python/issues/494"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b15670ed-d100-430d-9aed-e22d232c6b31 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A0D2:8AE8C:52737E9:742F794:6A4FA543 |
| html-safe-nonce | b54009fe971177564658891ce38f34a0335badf10d059ea8a661fe25bc5ed9df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEQyOjhBRThDOjUyNzM3RTk6NzQyRjc5NDo2QTRGQTU0MyIsInZpc2l0b3JfaWQiOiI0OTQ2NDYwNTQ4OTI3NTYzMDc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6579c5241a7e54a0f241146efca4bf2a1bb8f567867a6789b37b35462d504416 |
| hovercard-subject-tag | issue:1840326624 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/massive-com/client-python/494/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cec41d225d354d2e452caea8c5ab23bba13414bd11b304ac08c65558f46102e0/massive-com/client-python/issues/494 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cec41d225d354d2e452caea8c5ab23bba13414bd11b304ac08c65558f46102e0/massive-com/client-python/issues/494 |
| og:image:alt | When fetching dividends using the python client (v1.12.2), the resulting objects are missing the "currency" field that the API documentation suggests should be there. Fetching from the Documentatio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bfoz |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/massive-com/client-python git https://github.com/massive-com/client-python.git |
| octolytics-dimension-user_id | 191946194 |
| octolytics-dimension-user_login | massive-com |
| octolytics-dimension-repository_id | 216660192 |
| octolytics-dimension-repository_nwo | massive-com/client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 216660192 |
| octolytics-dimension-repository_network_root_nwo | massive-com/client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width