Subscription to trades does not work (SIP)

Hello! I subscribe to trades stream (sip feed):
def OnSockOpen(ws):
ws.send(json.dumps({
“action” : “auth”,
“feed” : “sip”,
“key” : ALPACA_API_KEY,
“secret” : ALPACA_SECRET_KEY}))
ticker = ‘AAPL’
ws.send(json.dumps({
“action”: “subscribe”,
“trades”: [ticker]
}))

I get an answer:
[{“T”:“success”,“msg”:“connected”}]
[{“T”:“success”,“msg”:“authenticated”}]
[{“T”:“subscription”,“trades”:[“AAPL”],“quotes”:,“bars”:,“updatedBars”:,“dailyBars”:,“statuses”:,“lulds”:,“corrections”:[“AAPL”],“cancelErrors”:[“AAPL”]}]

Nothing comes after that.
I have a subscription for $99.
What could be the reason for this problem? Earlier (at the end of 2022) this code worked well!

@M-Fil Looking at the time of the post (2:43 ET) the markets were closed. Pre-market trading generally doesn’t start until 4:00 ET and regular market hours begin at 9:30 ET. One will only see trade data when there is data. That may have been the reason there you felt streaming data ‘wasn’t working’?

You should be seeing data for AAPL now. That stock generally trades pre-market and therefore should have data now (at 8:39 ET as of when this is being posted).

1 Like