You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [9]: api.iex.Stock(['AAPL', 'MSFT']).get_price()
Out[9]: {'AAPL': 129.71, 'MSFT': 243.79}
In contrast, here's what actually happens:
In [10]: api.iex.Stock(['AAPL', 'MSFT']).get_market_cap()
---------------------------------------------------------------------------KeyErrorTraceback (mostrecentcalllast)
<ipython-input-10-a10133b42a85>in<module>---->1api.iex.Stock(['AAPL', 'MSFT']).get_market_cap()
~/rh/.venv/lib/python3.9/site-packages/iexfinance/stocks/base.pyinget_market_cap(self)
867868defget_market_cap(self):
-->869returnself._get_field("quote", "marketCap")
870871defget_beta(self):
~/rh/.venv/lib/python3.9/site-packages/iexfinance/stocks/base.pyin_get_field(self, endpoint, field)
91raiseNotImplementedError("Endpoint %s not implemented."%endpoint)
92iffieldnotindata:
--->93raiseKeyError("Field %s not found in %s."% (field, endpoint))
94ifself.output_format=="json":
95ifself.single_symbol:
KeyError: 'Field marketCap not found in quote.'
The text was updated successfully, but these errors were encountered:
Here's how it's expected to work:
In contrast, here's what actually happens:
The text was updated successfully, but these errors were encountered: