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

fix: ticker events returns composite_figi #423

Merged

Conversation

shooit
Copy link
Contributor

@shooit shooit commented Apr 12, 2023

fixes #422

@shooit
Copy link
Contributor Author

shooit commented Apr 12, 2023

Here's the interactive docs showing the expected response shape:
image

@justinpolygon
Copy link
Contributor

justinpolygon commented Apr 12, 2023

LGTM - this fixes an issue where the client library was throwing an error when getting ticket events.

Before:

Traceback (most recent call last):
  File "/Users/jw/work/client-python/examples/rest/stocks-ticker_events.py", line 11, in <module>
    print(events)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/dataclasses.py", line 370, in wrapper
    result = user_function(self)
  File "<string>", line 3, in __repr__
AttributeError: 'TickerChangeResults' object has no attribute 'figi'

After:

TickerChangeResults(name='Meta Platforms, Inc. Class A Common Stock', composite_figi='BBG000MM2P62', cik='0001326801', events=[{'ticker_change': {'ticker': 'META'}, 'type': 'ticker_change', 'date': '2022-06-09'}, {'ticker_change': {'ticker': 'FB'}, 'type': 'ticker_change', 'date': '2012-05-18'}])

@justinpolygon justinpolygon self-requested a review as a code owner August 3, 2023 21:54
Copy link
Contributor

@justinpolygon justinpolygon left a comment

Choose a reason for hiding this comment

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

LGTM

@justinpolygon justinpolygon merged commit 15aa8bc into polygon-io:master Aug 3, 2023
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

Successfully merging this pull request may close these issues.

ticker events needs composite_figi
2 participants