I’m using StockBarsRequest
to download 1-year, 1-minute historical stock OHLCV data for a few tickers. Each requires about 150k to 250k rows, and surprisingly, each ticker requires about 3-5 minutes to download. I’m not sure why it’s this slow. It’s not my internet speed.
@Mysterious_Shadow A time of 3-5 minutes for a years worth of minute bars seems slow. A typical time is about 9-10 seconds.
Below is a sample test I did fetching 1 year of SPY minute bars. The time was 9.15 seconds.
I did a similar test fetching a year of 1min bars for 10 random symbols. The time was 76 seconds (1 minute 16 seconds).
This wasn’t a scientific test but does align with my experience.
The speed is very dependent upon where your server is. This test was run on a server in South Carolina
{
"ip": "34.74.92.136",
"hostname": "136.92.74.34.bc.googleusercontent.com",
"city": "North Charleston",
"region": "South Carolina",
"country": "US",
"loc": "32.8546,-79.9748",
"org": "AS396982 Google LLC",
"postal": "29415",
"timezone": "America/New_York",
"readme": "https://ipinfo.io/missingauth"
}
The Alpaca servers are hosted by Google in their us-east4 data center located in Ashburn, Virginia. Placing your server as close to that generally reduces latency. It’s not the distance but rather the number of ‘hops’ which is the issue.
Hope that helps.