Barchart APIbarchart.com ↗
Access Barchart market data via API: stock quotes, option chains, gamma exposure, futures prices, historical OHLCV, and put/call ratios across equities and commodities.
What is the Barchart API?
This API exposes 8 endpoints covering equity and commodity market data sourced from Barchart.com. get_options_chain returns full call and put contracts with greeks, bid/ask, volume, and open interest for the nearest expiration. Other endpoints cover real-time stock quotes for up to ~25 symbols per call, gamma exposure grouped by strike, daily and 5-minute historical OHLCV, futures contract tables, put/call volume ratios, and current session volume metrics.
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'
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, Rankings, and Volume
get_stock_quotes accepts a comma-separated list of symbols and returns per-symbol fields including lastPrice, priceChange, percentChange, symbolType, and both display strings and raw numeric values. The count and total fields let you check whether all requested symbols resolved. get_top_stocks returns the same quote shape plus weightedAlpha and percentChange1y, ranking equities by Barchart's weighted alpha metric. get_stock_volume_metrics gives the current session's consolidated volume, a Barchart-defined 20-day average_volume, previous_volume, and the raw Unix trade_time_raw timestamp alongside a formatted trade_time string.
Options Data
get_options_chain returns every call and put for the nearest expiration of a given symbol, including strikePrice, expirationDate, bidPrice, askPrice, volume, openInterest, and greeks. get_nearest_put_call_ratio narrows further to a single expiration row — the smallest non-negative DTE — and returns put_total_volume, call_total_volume, put_call_volume_ratio as a float, and a put_call_volume_ratio_display string matching Barchart's formatting. The source_status field signals ok, no_options_data, or no_valid_upcoming_expiration so callers can handle symbols without listed options cleanly.
get_gamma_exposure goes deeper: the response is an object keyed by strike price, where each key maps to an array of contracts across multiple expirations carrying gamma, delta, openInterest, and lastPrice. This structure is useful for aggregating net gamma across the full strike ladder rather than looking at a single expiration slice.
Historical Data and Futures
get_historical_data accepts a symbol, an interval of daily or 5min, and an optional max_records cap. Response objects carry OHLCV fields (open, high, low, close, volume) as strings alongside date and symbol. The symbol parameter accepts equity tickers like AAPL and continuous futures notation like GC*0 for the Gold front-month contract. get_futures_prices takes a root_symbol such as CL, GC, or ES and returns every listed contract with contractName, settlementPrice, openInterest, volume, and high/low fields, plus the cleaned rootSymbol 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?+
- Screen top equities by weighted alpha using
get_top_stocksand filter bypercentChange1y - Build an options flow dashboard by pulling
volumeandopenInterestfromget_options_chainacross a watchlist - Compute net gamma-at-strike profiles for dealer hedging models using
get_gamma_exposuredata - Monitor futures curve structure for Crude Oil or Gold by iterating over contracts from
get_futures_prices - Backtest intraday strategies with 5-minute OHLCV bars from
get_historical_datausing the5mininterval - Track put/call sentiment shifts around earnings by polling
get_nearest_put_call_ratiobefore and after announcements - Alert on unusual volume by comparing
volumetoaverage_volumefromget_stock_volume_metrics
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. 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 versus `get_gamma_exposure`?+
get_options_chain returns a flat array of option contracts for the nearest single expiration, including full greeks, bid/ask spreads, and open interest. get_gamma_exposure returns data across multiple expirations, keyed by strike price, making it suited for aggregating gamma and delta exposure across the full strike ladder rather than a single expiry slice.Does `get_historical_data` support intraday intervals beyond 5 minutes?+
daily and 5min intervals only. It does not expose 1-minute, 15-minute, or hourly bars. You can fork this API on Parse and revise it to add additional intraday intervals if your use case requires finer or coarser granularity.Is earnings calendar or fundamental data (P/E ratio, revenue, EPS) available?+
How should I handle a symbol that returns `no_options_data` from `get_nearest_put_call_ratio`?+
source_status field will be no_options_data when the symbol has no listed options, and no_valid_upcoming_expiration when options exist but no row has a non-negative DTE. In both cases put_total_volume, call_total_volume, and put_call_volume_ratio are returned as null, so callers should check source_status before using ratio fields.