Add support for Portfolio History endpoint
Documentation for this endpoint is forthcoming on the Alpaca site, but you will be able to use it to access the same data that is used to make the performance chart on the Alpaca dashboard. You can access the new method with Alpaca.prototype.getPortfolioHistory
, like so:
getPortfolioHistory({
date_start: Date,
date_end: Date,
period: '1M' | '3M' | '6M' | '1A' | 'all' | 'intraday',
timeframe: '1Min' | '5Min' | '15Min' | '1H' | '1D',
extended_hours: Boolean
}) => Promise<PortfolioHistory>