Skip to content

Add support for Portfolio History endpoint

Compare
Choose a tag to compare
@ttt733 ttt733 released this 02 Mar 06:00
· 214 commits to master since this release

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>