alpacahq / Alpaca-API

The Alpaca API is a developer interface for trading operations and market data reception through the Alpaca platform.
https://alpaca.markets/
141 stars 13 forks source link

V2 API Adjusted Historical Bars #175

Closed rommladera closed 2 years ago

rommladera commented 3 years ago

Calls to the API /v2/stocks/{symbol}/bars are not adjusted. There should be a parameter to retrieve adjusted or unadjusted OHLC.

cnaccio commented 3 years ago

I second this; was using this feature when data was coming from Polygon, but now need to migrate my code and this is a problem.

lvca commented 3 years ago

+100. This feature is fundamental even to render a basic chart.

tifolson commented 3 years ago

+1 for adjusted data parameter. For both stock splits and dividends.

tlk3 commented 3 years ago

How could have possibly been overlooked? Historical data is virtually useless otherwise.

k- commented 3 years ago

Can we get an update, acknowledgement, or estimate on this? As stated above, lacking this feature makes any data outside of the current trading day meaningless (or dangerous for those who aren't aware).

haron4igg commented 2 years ago

Bought Unlimited plan just to get data adjusted... what a surprise it is still raw...

gnvk commented 2 years ago

You can set the adjustment parameter to

https://alpaca.markets/docs/api-documentation/api-v2/market-data/alpaca-data-api-v2/historical/#bars

ovresko commented 2 years ago

You can set the adjustment parameter to

  • split: to adjust the bars after stock splits
  • dividend: to adjust the bars after dividends
  • both: to adjust the bars both after stock splits and dividends
  • raw: to not adjust the bars

https://alpaca.markets/docs/api-documentation/api-v2/market-data/alpaca-data-api-v2/historical/#bars

adjustment both returns "message": "invalid adjustment"

ovresko commented 2 years ago

toke a guess and found adjustement : "all" working

highmtn commented 2 years ago

The adjustment param sort of work nows. Tested on TSLA, split, dividend, and raw work. dividend does not. (Using the node Alpaca package).

FWIW - if you're considering Alpaca, I'd avoid. The API has a bunch of headaches like this. There's no mention of this split param in their docs right now. The docs are out of date. Their support forum threads go unresponded to. They switched off of nice Polygon data sometime in 2021 and folks seem to have more complaints.