OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

[IMPROVE] `stocks/quote` - add `openbb.stocks.fa.info()` as a source so that no API key is required to return data.

Open deeleeramone opened this issue 2 years ago • 1 comments

The data returned by openbb.stocks.fa.info() is data which should map to stocks/quote, which currently is capable of only one source, FMP, which does not work unless you have a key. It would be an improvement to have multiple sources for the quote function.

In [3]: openbb.stocks.fa.info(symbol='aapl')
Out[3]: 
                                          Value
Currency                                    USD
Day high                                162.060
Day low                                 160.120
Exchange                                    NMS
Fifty day average                       154.059
Last price                              160.235
Last volume                            35.955 M
Market cap                              2.550 T
Open                                    161.220
Previous close                          160.940
Quote type                               EQUITY
Regular market previous close           160.800
Shares                                 15.915 B
Ten day average volume                 51.097 M
Three month average volume             65.450 M
Timezone                       America/New_York
Two hundred day average                 149.381
Year change                              -0.056
Year high                               176.150
Year low                                124.170

Additionally, the ability to get quotes for a list of tickers would be a solid improvement.

deeleeramone avatar Apr 12 '23 19:04 deeleeramone

@deeleeramone I have an idea for this:

We can modify the stocks/quote command to use an additional argument for the source. The default source will be YahooFinance, which will use the openbb.stocks.fa.info() function.

To get information for a list of tickers, we can simply parse the arguments as a list and concatenate the DataFrame horizontally.

Please let me know your thoughts on this.

dot-agi avatar Apr 15 '23 10:04 dot-agi