Streaming
Real-time streaming of market data and account events over HTTP or WebSocket. Use this section to push live quotes, trades, and account activity to your application instead of polling the REST endpoints.
This section covers two independent stream types, each requiring its own session:
- Market data streaming — real-time quotes, trades, and summary events for symbols you subscribe to. Requires a session from Create Market Session.
- Account event streaming — real-time order and account activity for one or more of your accounts. Requires a session from Create Account Session.
Both stream types support HTTP streaming (chunked JSON over a long-lived connection) and WebSocket streaming (bidirectional, supports live symbol changes without reconnecting).
Connection Lifecycle
- Reusing a session across reconnects: As long as your
sessionidhas not expired, you can close and reopen the WebSocket connection and resend the same request payload with the samesessionidto resume streaming — a simple reconnect does not require requesting a brand new session. - When a new session is required: Streaming session identifiers are short-lived (see Streaming Sessions above), and HTTP streaming connections close automatically after 15 minutes of inactivity. If your
sessionidhas expired, you must call the appropriate session-creation endpoint to obtain a newsessionidbefore reconnecting. - Detecting disconnection: Because both HTTP and WebSocket connections can drop without a clean close event, it’s recommended that you implement your own client-side heartbeat/timeout check. Account event streams send periodic
heartbeatevents to confirm the connection is still active; if your client stops receiving heartbeat or data events within your expected interval, treat the connection as dropped and trigger your reconnection logic.
Limits
While we do not publish the symbol limits for these APIs, we do monitor for abuse to make sure people aren’t doing anything egregious (like asking for an entire exchange’s worth of symbols). Essentially, ask for what you need. Don’t abuse the APIs, and you should be fine. It is not permitted to open more than one session at a time, meaning you can have one market data stream and one account stream open at a time, not multiples of either type.
Market Data Streaming
When streaming market data, you can stream as few as a single symbol or in excess of several hundred symbols, with the limiting factor being your system’s ability to receive updates promptly. A few high-activity symbols will take up more bandwidth than many lower-activity symbols. You can send updated payloads to add or remove symbols from your stream without closing the stream or obtaining a new sessionid. Filters for market data include: trade, quote, summary, timesale, or tradex. You can include one or more of these filters when you create the stream initially, but once the stream is started, you cannot update the filter.
Account Streaming
Account event streaming is presently in Beta. It is only available to Tradier Brokerage account holders and should only be used in production applications with caution.
Account streaming can include one or more of your Tradier accounts but is limited to live or sandbox, not both together. For example, if you have an individual cash account, an IRA, and a separate margin account, you can have a running stream to check for orders from one or more of those accounts in a single stream — by default the stream covers all accounts tied to the session’s token, and you can exclude specific ones (see WebSocket Account Data Streaming). Currently, order events are the primary data point sent via account streaming.
Endpoints
v1/markets/events/session
v1/accounts/events/session