Alpaca Market Data
Real-time US equity quotes, charts and options chains from Alpaca's free IEX feed
Serves US-listed equities and ETFs from Alpaca Market Data ahead of Gloom Cloud: real-time IEX quotes and streaming trades, intraday and daily bars at every chart resolution, and options chains from the indicative options feed.
Install
gloom install TestRxMD/gloom-alpaca-dataRestart Gloom after installing. Requires Gloom 0.17.2 or newer.
What it adds
This plugin does not register panes, data capabilities, or a broker.
Network access
Contacts these domains while it runs:
data.alpaca.marketsstream.data.alpaca.marketspaper-api.alpaca.marketsapi.alpaca.markets
Readme
What comes from where
| Data | Source |
|---|---|
| Quotes for US equities and ETFs (price, change, bid/ask, day range) | Alpaca, real-time IEX |
| Streamed trades and quotes in watchlists, portfolios and detail panes | Alpaca, one shared IEX websocket |
Charts at every resolution (1m to 1mo), GP, history | Alpaca bars, split-adjusted |
| Options chains (strikes, bid/ask, last, open interest) | Alpaca indicative options feed plus its contract catalogue |
| Ticker search for US symbols and company names | Alpaca asset catalogue, merged with Gloom Cloud's results |
| Fundamentals, statements, profiles, earnings | Gloom Cloud |
| SEC filings, holders, analyst research, corporate actions | Gloom Cloud |
| News and article summaries | Gloom Cloud |
| Crypto, FX, indices, futures, non-US listings, OTC | Gloom Cloud |
A quote carries providerId: "alpaca" and dataSource: "live" when Alpaca answered it. gloomberb quote AAPL --json shows both.
Setup
- Create a free account at app.alpaca.markets and generate an API key pair. Paper-trading keys are fine: market data is the same for paper and live keys, and the free Market Data plan comes with either.
- Install the plugin:
gloomberb install TestRxMD/gloom-alpaca-dataor, from a checkout, gloomberb plugin link ./gloom-alpaca-data.
- In Gloomberb open the Plugins pane (
PL), select Alpaca Market Data and presss, or run the Set up Alpaca Market Data command. Enter the key ID and secret, and pick Paper or Live to match the account the pair belongs to (the asset catalogue and market clock are read from that account's trading API host).
The values are stored under pluginConfig["alpaca-data"] in Gloomberb's config.json. CLI commands such as gloomberb quote read them from there, so they work without the app running. The pair can also come from the environment as APCA_API_KEY_ID / APCA_API_SECRET_KEY (or ALPACA_API_KEY / ALPACA_SECRET_KEY, with ALPACA_PAPER=false for live keys).
Check that it loaded:
gloomberb plugin doctor gloom-alpaca-data
gloomberb quote AAPL --jsonWhat to expect from the IEX feed
- Prices are IEX prints. IEX handles a few percent of US volume, so the last trade can differ by a cent or two from the consolidated tape, and the day's volume is IEX volume only, not the consolidated total.
- After hours is thin. IEX trades 8:00 to 17:00 New York (pre-market from 8:00, a short post-market to 17:00), so a quote after 17:00 shows the regular close with the last IEX print beside it, and a pre-market quote before 8:00 is the previous close.
- Bid and ask are IEX's top of book. An empty side (a one-cent bid after the close) is dropped rather than shown.
- Charts show regular-hours bars (09:30 to 16:00) unless the chart asks for extended hours. History reaches back to 2016 at every resolution.
- Options use Alpaca's indicative feed: real-time, derived quotes. Implied volatility is shown when the feed includes it, otherwise 0: during the session roughly the strikes near the money carry it (checked 2026-10-15, AAPL weekly: 19 of 95 calls and 21 of 95 puts), deep in-the-money contracts and pre-market chains come without it. Open interest is the prior session's, dated in the chain's
openInterestAsOf. - One streaming connection. A free account holds one websocket. Another process on the same keys (a bot, a second Gloomberb) takes it over, and the plugin falls back to re-reading snapshots once a minute until it is free. Two Gloomberbs at once (the terminal app and the desktop app, or either one and
gloomberb api subscribe) are the usual case: Alpaca answers the second one406 connection limit exceeded, and whichever connected first keeps streaming. The app shows a toast and a debug-log line once when that happens and once when the connection is free again; the second instance retries every 30 seconds in between. A CLI command has no logger, so there--jsonoutput simply keeps"delivery": "poll"with a fresh seed every minute. - Sessions and holidays. The market state is derived from the New York clock, corrected by Alpaca's market clock for holidays during regular hours.
- Silent sockets. Alpaca's stream sends no heartbeat, so a websocket left half-open by a network change (sleep, Wi-Fi roaming, an IPv6 flap) looks like a quiet market. Streamed symbols are re-seeded from a snapshot once a minute anyway; when that snapshot's latest trade is more than 45 seconds newer than the stream's last message, the socket is dropped and reopened, with a "silent for Ns while trades printed" line in the debug log.