Barchart APIbarchart.com ↗
Access Barchart market data via API: stock quotes, options chains with Greeks, gamma exposure, historical OHLCV, top stocks by weighted alpha, and futures prices.
What is the Barchart API?
The Barchart API exposes 6 endpoints covering equities, options, and futures market data from Barchart.com. You can retrieve real-time stock quotes with price change and percent change fields, full options chains including Greeks and open interest via get_options_chain, gamma exposure grouped by strike price, daily and 5-minute OHLCV history, ranked top stocks by weighted alpha, and full futures contract ladders for roots like CL, GC, and ES.
curl -X GET 'https://api.parse.bot/scraper/1cda4487-4915-4e6a-b0de-627d66a03c5a/get_stock_quotes?symbols=AAPL%2CMSFT' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace barchart-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Barchart Market Data SDK — bounded, re-runnable; every call capped."""
from parse_apis.barchart_market_data_api import Barchart, Interval, SymbolNotFound
client = Barchart()
# Fetch real-time quotes for a basket of symbols.
for quote in client.quotes.list(symbols="AAPL,MSFT,SPY", limit=5):
print(quote.symbol, quote.symbol_name, quote.last_price, quote.price_change)
# Top-performing stocks ranked by weighted alpha.
top = client.quotes.top(limit=3).first()
if top:
print(top.symbol, top.symbol_name, top.weighted_alpha, top.percent_change_1y)
# Drill into a single stock: options chain and price history.
aapl = client.stock("AAPL")
for option in aapl.options(limit=3):
print(option.symbol, option.strike_price, option.delta, option.volume)
for candle in aapl.history(interval=Interval.DAILY, max_records=5, limit=5):
print(candle.date, candle.open, candle.high, candle.low, candle.close)
# Gamma exposure — non-paginated, returns a single structured object.
gamma = aapl.gamma_exposure()
print(gamma.count, gamma.total)
# Futures contracts for a commodity root symbol.
try:
gold = client.futures.get(root_symbol="GC")
print(gold.root_symbol, gold.total_contracts)
for contract in gold.contracts[:3]:
print(contract.symbol, contract.contract_name, contract.last_price)
except SymbolNotFound as exc:
print(f"symbol not found: {exc.symbol}")
print("exercised: quotes.list / quotes.top / stock.options / stock.history / stock.gamma_exposure / futures.get")
Get current quotes for a list of stock symbols. Returns real-time price data including last price, price change, percent change, and symbol metadata. Accepts up to ~25 symbols per call. Each quote includes both formatted display strings and raw numeric values.
| Param | Type | Description |
|---|---|---|
| symbolsrequired | string | Comma-separated list of stock or ETF symbols (e.g. 'AAPL,MSFT,SPY') |
{
"type": "object",
"fields": {
"data": "array of quote objects with symbol, symbolName, lastPrice, priceChange, percentChange, symbolCode, symbolType, and raw numeric values",
"count": "integer total items returned",
"total": "integer total items available"
},
"sample": {
"data": {
"data": [
{
"raw": {
"symbol": "AAPL",
"lastPrice": 291.58,
"symbolCode": "STK",
"symbolName": "Apple Inc",
"symbolType": 1,
"priceChange": 1.03,
"percentChange": 0.0035
},
"symbol": "AAPL",
"lastPrice": "291.58",
"symbolCode": "STK",
"symbolName": "Apple Inc",
"symbolType": 1,
"priceChange": "+1.03",
"percentChange": "+0.35%"
},
{
"raw": {
"symbol": "MSFT",
"lastPrice": 397.36,
"symbolCode": "STK",
"symbolName": "Microsoft Corp",
"symbolType": 1,
"priceChange": -6.05,
"percentChange": -0.015
},
"symbol": "MSFT",
"lastPrice": "397.36",
"symbolCode": "STK",
"symbolName": "Microsoft Corp",
"symbolType": 1,
"priceChange": "-6.05",
"percentChange": "-1.50%"
}
],
"count": 2,
"total": 2
},
"status": "success"
}
}About the Barchart API
Quotes, Options, and Greeks
The get_stock_quotes endpoint accepts a comma-separated symbols parameter (e.g. AAPL,MSFT,SPY) and returns per-symbol objects containing lastPrice, priceChange, percentChange, symbolName, symbolCode, and symbolType. The response also includes count and total integers for pagination awareness. The get_options_chain endpoint takes a required symbol and an optional expiration date in YYYY-MM-DD format; omitting the date defaults to the nearest available expiration. Each contract in the returned array includes strikePrice, expirationDate, bidPrice, askPrice, volume, openInterest, and symbolType distinguishing calls from puts.
Gamma Exposure and Historical Data
get_gamma_exposure returns a nested structure keyed by strike price, where each key maps to an array of option contracts carrying gamma, delta, openInterest, lastPrice, and symbolType. This layout makes it straightforward to aggregate net gamma across strikes. The get_historical_data endpoint supports both daily and 5min intervals via the interval parameter and a max_records cap. Each OHLCV candle object includes date, open, high, low, close, and volume as strings. The symbol field accepts standard equity tickers as well as futures notation like GC*0 for front-month Gold.
Top Stocks and Futures
get_top_stocks requires no input and returns a ranked list of equities sorted by weightedAlpha, alongside percentChange1y for year-over-year context. The get_futures_prices endpoint takes a required root_symbol (e.g. CL, GC, ES) and an optional timeframe. Each contract in the contracts array includes contractName, lastPrice, priceChange, percentChange, settlementPrice, volume, openInterest, and high/low prices. The response also returns the cleaned rootSymbol string and a totalContracts count.
The Barchart API is a managed, monitored endpoint for barchart.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when barchart.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official barchart.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a multi-symbol watchlist dashboard using
get_stock_quoteswith livelastPriceandpercentChangefields - Construct options flow scanners by pulling full chains via
get_options_chainand filtering byvolumeoropenInterest - Visualize net gamma exposure by strike for SPY or AAPL using
get_gamma_exposuredelta and gamma fields - Backtest trading strategies by loading daily or 5-minute OHLCV series from
get_historical_datawith amax_recordslimit - Screen for momentum stocks by ranking
weightedAlphaandpercentChange1ydata fromget_top_stocks - Track full futures contract ladders for crude oil or gold using
get_futures_priceswith roots like CL or GC - Monitor settlement prices and open interest shifts across futures expirations using the
settlementPriceandopenInterestfields
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Barchart have an official developer API?+
What does `get_options_chain` return, and how do I target a specific expiration?+
strikePrice, expirationDate, bidPrice, askPrice, volume, openInterest, and symbolType (call or put). Pass a date string in YYYY-MM-DD format as the expiration parameter to target a specific expiration. Omitting it defaults to the nearest available date.Does the historical data endpoint support intraday intervals other than 5 minutes?+
get_historical_data supports daily and 5min as the two available interval values. Other intraday resolutions such as 1-minute or hourly bars are not exposed. You can fork this API on Parse and revise it to add endpoints for additional intervals if your use case requires them.Does the API cover earnings estimates, analyst ratings, or fundamental data for stocks?+
How fresh is the quote data returned by `get_stock_quotes`?+
get_stock_quotes endpoint returns current quote data reflecting Barchart's live feed, but Barchart's own display rules apply delays (typically 15–20 minutes for non-subscribers on US equities). Real-time values depend on the data entitlements associated with the underlying source. The response fields lastPrice, priceChange, and percentChange reflect whatever the current feed provides.