Closed mileswatson closed 1 year ago
2 examples for financials using https://polygon.io/docs/stocks/get_vx_reference_financials
company_name*string balance_sheetobject - fac:currentAssets
I'm only familiar with using the requests library to interact with REST APIs - are we all okay if I use this library?
@StefanPitur @dylan-mankin
Have you tried the official Python library @luo-simon? https://github.com/polygon-io/client-python
Ah yes, forgot about this - thanks :) @mileswatson
Having a problem with testing the API via the official Python library. Tried waiting and retrying, but always seem to get this error message:
polygon.exceptions.BadResponse: {"status":"ERROR","request_id":"045474007c9d5f095b94247afe203b04","error":"You've exceeded the maximum requests per minute, please wait or upgrade your subscription to continue. https://polygon.io/pricing"}
Can someone else try running this and let me know if they get the same error? The basic code for doing this is as follows:
from polygon import RESTClient
client = RESTClient(api_key=config.API_KEY)
news = client.list_ticker_news(ticker="AAPL")
We can discuss more on Tues or earlier time if free.
Create some python functions that can get stock news, financials, and pricing history for a given stock. Ideally specify MyPy types to make the interface easier to understand.