Hi Alpaca Team,
I love your API however I’m having some issue with it. I’m seeing that some tickers are not real time. They are in fact delayed. Most likely i’m implementing the StockHistoricalDataClient or OptionHistoricalDataClient wrong.
I implemented two above clients like this:
from alpaca.data.historical import StockHistoricalDataClient
from alpaca.data.historical import OptionHistoricalDataClient
stock_client = StockHistoricalDataClient(api_key=config[‘alpaca’][‘key’], secret_key=config[‘alpaca’][‘secret’])
latest_snapshot_request = StockSnapshotRequest(symbol_or_symbols = tickers_for_snapshot,feed=DataFeed.SIP)
#Rest of the workflow
option_client = OptionHistoricalDataClient(api_key=config[‘alpaca’][‘key’], secret_key=config[‘alpaca’][‘secret’])
#Rest of the workflow
In my test box the configuration has API KEY/SECRET generated under the Paper Trading account and in my Live box I have it pointing to a config where API KEY/SECRET is generated under the live account.
I’m not using the sandbox: bool = False explicitly in either of the handlers above but it seems like it’s working seamlessly between test and live account. This is where I got the idea of the sandbox parameter
Question: Is the right approach or do I need to explicitly change sandbox = False or True based on the test vs live machine to get real time data?
The ticker in question is : VTI
Thanks
