Skip to main content

Changing Sources

Some functions have the built-in capability of requesting data from multiple sources. obb.stocks.load is one example of this type feature:

obb.stocks.load(
symbol = 'SPY',
start_date = '2022-10-01',
end_date = '2022-11-11',
interval = 15,
prepost = True,
source = 'YahooFinance',
weekly = False,
monthly = False,
)
dateOpenHighLowCloseAdj CloseVolume
2022-11-15 15:00:00398.68399.4398.13398.47398.472.46198e+06
2022-11-15 15:15:00398.475399.52398.46398.913398.9132.8631e+06
2022-11-15 15:30:00398.93399.27397.82399.11399.113.03659e+06
2022-11-15 15:45:00399.114399.13397.46398.53398.536.46879e+06
2022-11-15 16:00:00398.54399.06395.01398.175398.1751.99462e+06

The choices for source within this functionality are:

  • YahooFinance (default)
  • IEXCloud
  • AlphaVantage
  • Polygon
  • EODHD

Note that for each function, the variable can have sources that are not described as above. As an example, openbb.stocks.fa.income has the following sources:

  • Polygon
  • YahooFinance
  • AlphaVantage
  • FinancialModelingPrep
  • EODHD

Also note that some sources allow you to use certain variables while other do not. For example, YahooFinance doesn't provide you with quarterly data whereas AlphaVantage does. Therefore, quarterly=True can not be used in combination with source=YahooFinance.