added optional support for dictionary in get_historical_prices