I purchased the premium account just in case, i thought for $9 but instead it was $99. Still putting that aside for a moment I have a 20 minute delay still, alpaca is 20 minutes behind tradingview. How can I address this?
First, check that your subscription is active. While logged in, click on your user ID icon in the upper right corner of the screen. You should see “Market data subscription”. Click on it to see the status of your subscription.
Second, if it shows your subscription is active, post a code snippet to show how you are accessing the realtime data. AFAIK, the sandbox will always be delayed. I always us my LIVE keys to get EOD and intraday data.
This works for me to test timeliness:
curl -s -X GET -H “APCA-API-KEY-ID: %APCA_API_KEY_ID%” -H “APCA-API-SECRET-KEY: %APCA_API_SECRET_KEY%” “https://data.alpaca.markets/v2/stocks/bars/latest?symbols=AAPL,MSFT,TSLA,GE,GM,SPY&feed=sip” >>prices.json
Note that feed=sip is essential.
I have embedded 200 tickers in one API call to get the latest 1 minute bar for them all during market hours.
Using Windows 10, Microsoft’s curl. Have not tested it on Linux or UNIX. Note that Windows can be very weird and very very picky about double quotes at the command line.
@bubuia thank you for the reply, it does seem to be active and i added feed=sip just in case but i am using the user interface
this seems to be affecting what price Alpaca believes i am purchasing on Paper trading from what i can tel which is why it is problematic for me and my testing to have a 15 - 20 minute delay here.
The only other thing I can think of is that I have real money in my LIVE account. I think that way back then it was a requirement. Not sure with the new subscription thingie. Should not be a requirement any longer, IMO.
@bubuia much appreciated, I hope this is a solid approach do you know how much the minimum was? I’ve been searching all throughout the internet and can’t find a number. If you have it or not thank you for your help
Never saw anything published.
One thought is that you might be able to get intraday real-time and EOD data from a different broker (almost free) if you open an account and put a small amount in it. Thinking TDA, eTrade, and the like. TDA uses API key authentication that is relatively simple to code.
curl “https://api.tdameritrade.com/v1/marketdata/quotes?apikey=mykey&symbol=AAMC,AAU,ACU,ACY,ADRA” -o json_TDA101.q5q
Alphavantage? for example in Windows batch get one ticker at a time and write it all to tmp.json:
FOR /F “usebackq tokens=1 delims=,” %%G IN (“tickerlist.txt”) do (
curl -s “https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=%%G&apikey=mykey” >>tmp.json
Can’t speak to their data quality though.
Found this in my notes while looking for something else:
TDA API ONLY returns delayed data unless you log in with OAUTH
@bubuia Thanks for all of the info my guy, to be honest i think things are working as intended, the User Interface of Alpaca does have a 20 minute delay but the price is still accurate from what i can see live and paper trading. Its misleading but i’m not sure if it doesn’t work, i’m going to refund the $99 and see if the price remains accurate but wanted to thank you for your assistance