Build a Trading Bot

Barchart API: 3 Data Feeds a Trading Bot Can Afford

Jay Rocco 18 min read
  • Tested on Live and Paper Accounts
  • Ranked by Score, Never by Commission
  • Fresh AI Trading News
AI Stock Trading Bots
A hand holding a tablet with a futures price chart in front of a golden wheat field at dusk with the headline "MARKET DATA YOUR BOT CAN AFFORD"
J
Jay Rocco

Jay Rocco is the Founder and Editor of FullStack Alpha. He has tested 200+ AI stock tools since 2022 and run 15+ AI trading platforms on live accounts with his own money. He reviews the software. He does not tell you what stocks to buy.

Published: Updated:

The Barchart API (Barchart OnDemand) is a commercially licensed REST market data service that returns quotes, history at tick, minute or end-of-day resolution, options, futures, news and commodity data, authenticated with a single apikey parameter. It has no public self-serve price: Barchart builds custom packages through sales, and a 2021 Barchart support reply said its OnDemand APIs started at $500 a month. That is why the three feeds most solo bot builders can actually afford are Massive (formerly Polygon.io) at $0 to $29 a month, Alpha Vantage at $0 or $49.99 a month, and Alpaca Market Data at $0 or $99 a month. Use Barchart when your bot needs futures, grains or commodity depth; use one of the three for a US stock bot on a budget.


The Short Version

  • The Barchart API catalog spans 10 categories on Barchart’s API page, from getQuote and getHistory to futures expirations, grain bids and weather, with official clients listed for Java, JavaScript, PHP, Python and MATLAB.
  • Pricing is quote-based: “we’ll create a custom package for you,” per Barchart; a 2021 support answer put the starting point at $500 a month.
  • Massive Stocks Starter is $29 a month with unlimited calls but 15-minute delayed data; real time starts on Stocks Advanced at $199 a month (Massive pricing).
  • Alpha Vantage allows 25 free requests a day; premium starts at $49.99 a month for 75 requests a minute (Alpha Vantage premium).
  • Latency is the hidden fee: a 15-minute delay on a breakout setup is not a data feed, it is a post-mortem.

Which Data Feed Fits Your Bot?

Futures and commoditiesBarchart API

The deepest retail-accessible grain, energy and metals data. Pricing is quote based.

US stocks, testing phasePolygon.io / Massive

Clean docs and SDKs. Starter is delayed, so upgrade before going live intraday.

Once a day signalsAlpha Vantage

Free 25 calls a day plus server side indicators. Fine for end of day bots.

Already trade at AlpacaAlpaca Market Data

Free IEX feed with your account. Full SIP real time on Algo Trader Plus.

More data and broker breakdowns sit on the AI Stock Trading Bots home page, including our list of Yahoo Finance API alternatives with 10 stock data APIs priced.


What Is the Barchart API and What Does It Give a Trading Bot?

The barchart api is the developer-facing layer of Barchart OnDemand, a long-running market data business. It exposes financial data as REST endpoints returning JSON (also XML and CSV), hosted at ondemand.websol.barchart.com, and authenticated with a single apikey query parameter.

For a trading bot, the practical inventory on Barchart’s API catalog looks like this:

  • Quotes: getQuote returns real-time, delayed or end-of-day prices on stocks, indexes, mutual funds, ETFs, futures, forex and crypto
  • Historical data: getHistory returns tick, minute bar or end-of-day history on the same asset classes
  • Options: getEquityOptions returns strike, close, expiration, volume and volatility; getEquityOptionsOverviewHistory adds IV rank, IV percentile and put/call ratios
  • Futures and commodities: getFuturesOptions, getFuturesSpreads, getFuturesSpecifications and getFuturesExpirations, plus grain bids and USDA grain prices, which is where Barchart’s roots run deepest
  • News and filings: getNews returns headlines and articles filtered by source, category, sub-category or keyword; getSECFilings covers regulatory filings
  • Corporate actions: getCorporateActions, getDividendData and getEarningsCalendar
  • Event-Based API: REST and Socket.IO endpoints that fire alerts when user-defined market data or news conditions occur. Barchart lists it as “contact us for access.”

That is a wide surface area. Most bot builders will use three or four endpoints consistently, but knowing the rest exist matters when your strategy expands into options flow or commodity spreads.

The practical takeaway: if your bot trades US equities and options, Barchart gives you everything in one place. If it trades grain futures or commodity spreads, Barchart is one of the few feeds with real depth there.


How Much Does the Barchart API Cost?

Barchart OnDemand does not publish a self-serve pricing page with monthly dollar amounts. The API page says Barchart will “create a custom package” for small, medium, large or enterprise clients, and every route leads to a contact form. This is the part that trips up solo bot builders who expect a Stripe checkout page.

What we could find in writing:

  • A 2021 Barchart support answer said OnDemand APIs “start at $500/month,” and offered an Excel add-in at $69.95 a month as a cheaper route to similar data inside Excel (Barchart help article). That answer is five years old, so treat $500 as a floor to ask about, not a current quote.
  • Barchart shut its old free APIs years ago, as developers noted on r/algotrading. There is no permanent free tier on the official platform.
  • Third-party catalogs such as APIs.io describe a limited free trial key for evaluation, a subscription and an enterprise tier, with figures they flag as unconfirmed.

A warning on scraper marketplaces: web-scraping marketplaces such as Parse.bot list “Barchart” endpoints. Parse.bot describes itself as a web scraping API that turns websites into structured data. That is scraped page data, not a licensed Barchart feed. It can break without notice and may conflict with Barchart’s terms, so do not build a live bot on it.

The two real drawbacks worth naming:

  1. No transparent self-serve pricing for the core OnDemand platform. You cannot comparison-shop without a sales call, which is friction most solo developers skip, then regret later when they hit a rate limit.
  2. Real-time exchange data carries exchange licensing fees on top of any data vendor’s bill, so the first quote is rarely the last number.

The 3 Data Feeds a Trading Bot Can Actually Afford

Most bot builders do not need Bloomberg Terminal data. They need clean, reliable, low-latency data at a price that does not eat their trading capital before the bot makes a single trade. Here are the three realistic options, with prices from each vendor’s page.

Feed 1: Massive, Formerly Polygon.io ($0 to $199/month)

Polygon.io, which rebranded as Massive, is the most developer-friendly market data api for US equities. Per Massive’s pricing:

  • Stocks Basic, $0: 5 API calls a minute, 2 years of history, end-of-day data.
  • Stocks Starter, $29: unlimited calls, 5 years of history, minute aggregates, WebSockets, but 15-minute delayed data.
  • Stocks Developer, $79: 10 years of history, still 15-minute delayed.
  • Stocks Advanced, $199: real-time data and 20+ years of history.

Documentation is clean and the SDKs are maintained. Our Polygon API breakdown covers what changed with the rebrand.

Choose this if: you trade US equities only, you want unlimited calls for development under $30 a month, and you will upgrade to Advanced before going live intraday.

Feed 2: Alpha Vantage ($0 to $249.99/month)

Alpha Vantage is the best free option for bot builders who are still in the paper-trading phase. The free tier allows 25 API requests a day, which is not enough for live trading but is enough to validate a strategy’s data requirements. Premium plans run from $49.99 a month for 75 requests a minute to $249.99 for 1,200 a minute, with no daily limits (Alpha Vantage premium). Coverage includes technical indicators calculated server-side, which reduces bot-side computation.

Choose this if: you are still testing, you want pre-computed technical indicators, or you are running a low-frequency strategy that checks signals once per day.

Feed 3: Alpaca Market Data ($0 or $99/month)

If you already trade at Alpaca, its data comes with the account. Per Alpaca’s data page, the Free plan uses the IEX exchange feed with real-time WebSockets limited to 30 symbols, and full-market SIP data is delayed 15 minutes through the API. Algo Trader Plus at $99 a month adds all US exchanges, unlimited WebSocket symbols and real-time OPRA options data. Our Alpaca API pricing guide explains when the upgrade pays for itself.

Choose this if: your bot already places orders at Alpaca and trades 30 or fewer symbols at a time.

The honest ranking: Massive wins on developer experience for US stock bots. Alpaca wins on cost if you already trade there. Alpha Vantage wins for low-frequency strategies. Barchart wins on asset class breadth when futures and commodities are part of the plan. Pick based on what your bot actually trades, not on which one has the best landing page.


How Many API Calls Does Your Bot Actually Need?

Do this math before you pick a plan. It decides the tier for you.

Example: a bot that polls 20 symbols once a minute through a 6.5-hour session makes 20 x 390 = 7,800 calls a day.

  • Alpha Vantage free (25 a day): exhausted in the first two minutes. The $49.99 plan (75 a minute) handles 20 a minute with room to spare.
  • Massive Basic (5 a minute): too slow, since you need 20 a minute. Starter (unlimited) handles the volume but the data is 15 minutes old; Advanced at $199 is the first real-time tier.
  • Alpaca Free: stream the 20 symbols over the IEX WebSocket instead of polling, inside the 30-symbol limit, for $0.
  • Barchart OnDemand: volume is part of the custom package, so bring this exact number to the sales call.

Decision rule: if your strategy needs real-time data on more than 30 symbols, budget at least $99 to $199 a month for data before you count anything else. Our trading bot cost breakdown adds the rest of the monthly bill.


What Free Market Data Really Costs You in Latency

Barchart API data pipeline diagram from REST request to trading bot decision

Free data is not free. It is a 15-minute delay with a $0 invoice.

A 15-minute delayed feed means your bot sees a breakout that happened 15 minutes ago. By the time the signal fires, the stock is overextended, the early buyers are already taking profits, and your bot is catching a falling knife or buying a bull trap at the worst possible entry. That is not a data problem. That is a risk-management problem caused by a data problem.

The math is simple. If your bot averages 10 trades per month and even two of those entries are 15 minutes stale, the slippage and bad fills on those two trades can cost more than a real-time data subscription in a single quarter.

Where latency actually matters:

  • Intraday momentum strategies: price action moves in seconds. A 15-minute delay makes the entire strategy non-functional.
  • Gap fill plays at the open: the gap fills or it does not within the first 30 minutes of the session. A delayed feed misses the entire setup.
  • Earnings season: a stock can move 20% in the first minute after a report. Delayed data is useless here.
  • Free alert services: most free alert apps use delayed data. If you are relying on a free alert service to trigger your bot, check the data source before assuming it is real-time.

Where latency matters less:

  • End-of-day swing setups where the entry is placed after market close
  • Weekly options strategies where the decision window is days, not minutes
  • Fundamental screening where you are looking at earnings, not ticks

The practical takeaway: match your data tier to your strategy’s time frame. A swing trader running a basing pattern scan does not need sub-second data. A scalper running a low-float momentum strategy absolutely does. Paying for real-time data you do not need is waste. Using delayed data for a strategy that requires real-time is worse.


Barchart API vs Other Data Providers

The barchart api is not the only market data api in the room. Here is how it stacks up against the three most common alternatives a bot builder will consider.

ProviderFree TierPaid EntryLatencyBest For
Barchart APINo public free tier; trial key by requestCustom package via sales ($500/mo floor in a 2021 support reply)Real-time on paid plansFutures, commodities, broad coverage
Polygon.io / MassiveBasic $0, 5 calls/min, end-of-day$29/mo Starter15-min delay on Starter and Developer; real time on Advanced ($199)US equities, bot development
Alpha Vantage25 requests/day$49.99/mo (75 requests/min)Delayed free; real-time paidLow-frequency, technical indicators
IntrinioFree trial$150/mo Individual (personal use)Real-time on paid plansFundamentals, institutional-quality data

The honest call: Barchart wins on asset class breadth, especially for anyone trading futures or commodities alongside equities. Massive wins on price transparency and developer experience for pure equity bots. Alpha Vantage wins on cost for strategies that run once a day. Intrinio’s pricing page starts at $150 a month for personal use and $333 for commercial startups, which is more than most solo bot budgets want to spend.

One thing worth noting: Barchart’s Event-Based API with Socket.IO support puts it ahead of Alpha Vantage for trigger-based workflows. If your bot needs to fire on a news event or a price threshold crossing, that Socket.IO layer matters. Alpha Vantage does not have an equivalent.

For more context on how AI tools layer on top of market data feeds, the AI trading software active traders use breakdown covers the full stack beyond just the data layer.


Is the Barchart API Worth It for a Trading Bot in 2026?

The barchart api is worth it for a specific type of bot builder: one who needs multi-asset coverage across equities, options, futures, and commodities, and who is willing to work through a commercial agreement to get institutional-grade data.

For a pure US equity day-trading bot on a tight budget, Massive or your broker’s own feed is the cleaner choice. The pricing is transparent and the documentation is excellent.

For a bot that trades grain futures alongside tech stocks, or needs commodity price data that most competitors do not carry well, OnDemand is hard to replace. Barchart’s roots in commodity markets show in endpoints such as getGrainBids, getUSDAGrainPrices and getCmdtyStats that most startup API providers simply do not offer.

The Event-Based API is the most interesting piece for 2026. Trigger-based workflows, where the bot fires on a condition rather than polling on a schedule, reduce API call volume and latency simultaneously. That is a real architectural advantage for bots running signal or alert logic.

The setup that makes sense: prototype on a free tier from Massive, Alpha Vantage or Alpaca, measure your real call volume, then decide whether your asset class mix justifies a Barchart sales call. Do not pay for real-time futures data if your bot only trades SPY.

If you are still deciding whether your bot’s strategy holds up before spending anything on data, do AI trading bots actually make money is worth reading first. And for the broader question of what tools belong in a day-trading stack, the day trading tools directory covers the full field.


Getting Started: Barchart API Authentication and Documentation

Barchart API authentication steps from account registration to going live

Authentication on OnDemand is simple: every request appends ?apikey=YOUR_KEY to the endpoint URL. No OAuth, no token refresh cycles. One parameter, every call.

The base URL for OnDemand is ondemand.websol.barchart.com. A basic quote request looks like:

GET https://ondemand.websol.barchart.com/getQuote.json?apikey=YOUR_KEY&symbols=AAPL,MSFT

The response comes back as JSON with fields for last price, change, volume, bid, ask, and extended session data.

For Python users: Barchart’s API page lists an official Python client alongside Java, JavaScript, PHP and MATLAB clients, and the REST interface also works cleanly with the requests library. A basic polling loop is 10 lines of code. Our Python algorithmic trading roadmap covers the surrounding stack.

For JavaScript users: the Socket.IO Event-Based API is the natural fit for Node.js bots. The WebSocket layer eliminates polling and fires callbacks when conditions are met.

Documentation: the official docs live at barchart.com/ondemand. The getHistory endpoint handles historical data at tick, minute or end-of-day resolution; the getQuote endpoint handles real-time, delayed and end-of-day quotes; getNews handles the news feed with source, category and keyword filtering.

How far back does historical data go? Barchart’s getHistory endpoint supports long daily histories for major US equities and futures. Intraday depth depends on the package you negotiate. For backtesting a strategy that needs 10 years of daily data, OnDemand is well-equipped. For tick-level backtesting, confirm coverage with the OnDemand team directly.

For a comparison of how charting and scanning tools use similar data pipelines, the TrendSpider vs TradingView AI charting comparison shows how front-end tools layer on top of feeds like this one.


Common Barchart API Errors and How to Fix Them

A few errors show up repeatedly in developer forums and the algotrading subreddit:

401 with “API key is missing or not valid.”: That is the exact response the OnDemand host returned when we sent a request with an invalid key. Double-check the key in your request parameter and confirm it came from Barchart, not from a third-party marketplace.

429 Too Many Requests: You have hit the rate limit for your package. Solutions: reduce polling frequency, cache responses for symbols you check repeatedly, switch alert logic to the Event-Based API, or renegotiate the volume in your package.

Empty or null response on a valid symbol: Some symbols, particularly OTC names and thin futures contracts, are not in Barchart’s coverage universe. Test with a liquid symbol like AAPL or ES futures before assuming the endpoint is broken.

Stale data on a “real-time” endpoint: If your package delivers delayed data, the timestamp in the response will reflect the delay. Check the tradeTime field in the JSON response against the current timestamp to confirm you are getting the latency you paid for.

Symbol format issues for futures: Barchart uses its own futures symbology (e.g., ZCZ26 for December 2026 corn). If you are pulling from a different data source for symbol lookup, the formats may not match. Use Barchart’s getInstrumentDefinition or getFuturesSpecifications endpoints to resolve symbols and contract details before querying prices.


Our Take

The data layer is where most bot builders make their first expensive mistake. They spend weeks on strategy logic, pick a broker API, and then bolt on whatever free data feed they found first. Then they wonder why the bot’s signals do not match what they see on their charts.

The barchart api is a serious market data api with real depth in futures, commodities, and multi-asset coverage, sold by sales conversation rather than checkout page. For US equity bots in development, Massive is the sharper choice. For low-frequency strategies still in development, Alpha Vantage’s free tier is enough to validate the logic. If you want an open-source research terminal instead, see why traders move to OpenBB.

The decision rule is simple: match the data tier to the strategy’s time frame, confirm the latency before going live, and do not pay for real-time futures data if your bot only trades SPY options.

Three actions to take now:

  1. Map your bot’s call volume: how many symbols, how many times per day, what asset classes. That number determines which tier you actually need.
  2. Test with Massive’s, Alpha Vantage’s or Alpaca’s free tier before paying anything. Validate that the data format matches what your bot expects.
  3. Check the timestamp on every response in your test runs. Confirm the latency matches the tier you signed up for before going live.

Systems over hacks. The bot is only as good as the data it runs on.

For a broader look at AI tools that sit on top of market data feeds, check out honest AI stock tool reviews from real users in 2026 and the Capitalise.ai review for an example of how automation layers on top of data providers. If you are building a scanner rather than a bot, 7 swing trade scanners that find setups before they break out covers the front-end tools that use similar data pipelines.

Related: if Alpaca ends up as both your data feed and your broker, our hands-on Alpaca review at AI Stock Picker App covers its order routing and data plans in one place.


Final Verdict

The barchart api earns its place in a bot builder’s stack when multi-asset coverage and futures data are requirements, not nice-to-haves. For pure US equity bots, Massive, Alpaca or your broker’s own feed is the more practical starting point. The lack of transparent self-serve pricing on the core OnDemand platform is a real friction point for solo developers. That said, few market data APIs match Barchart’s commodity and futures depth. Choose based on what your bot trades, not on brand recognition.


The FullStack Alpha directory catalogues 200+ AI stock tools by category and price, filterable by what you actually need. Browse the directory at aistockpickerapps.com

FullStack Alpha may earn a commission from affiliate links in this article. This does not affect editorial scores or recommendations.


References

  1. Ondemand, https://www.barchart.com/ondemand
  2. Fyi Barchart Discontinuing Free Apis, https://www.reddit.com/r/algotrading/comments/kbk0y9/fyi_barchart_discontinuing_free_apis/
  3. Barchart Plans Pricing, https://apis.io/plans/barchart/barchart-plans-pricing/
  4. 252001 Api Inquiry Response, https://help.barchart.com/support/solutions/articles/252001-api-inquiry-response
  5. Pricing, https://www.saasworthy.com/product/barchart-ondemand/pricing
  6. Case Study CIH, https://www.barchart.com/cmdty/resources/case-studies/cih
  7. Market Data APIs Barchart OnDemand, https://www.barchart.com/ondemand/api
  8. GetNews endpoint documentation, https://www.barchart.com/ondemand/api/getNews
  9. Massive Pricing, https://massive.com/pricing
  10. Alpha Vantage Premium, https://www.alphavantage.co/premium/
  11. Alpaca Market Data, https://alpaca.markets/data
  12. Intrinio Pricing, https://intrinio.com/pricing

By Jay Rocco, Founder and Editor, FullStack Alpha.

Stay alpha.

Tags: barchart api market data api futures data trading bot data

Frequently Asked Questions

What is the barchart api pricing in 2026?

Barchart OnDemand does not publish self-serve pricing publicly. The platform targets institutional subscribers and requires a commercial agreement for direct access. Via the Parse.bot marketplace, a free tier offers 200 credits/month, with paid tiers scaling to 100,000 credits/month. For a solo bot builder, the Parse.bot entry point is the most accessible starting point before committing to a direct OnDemand contract.

Is there a free stock data API that works for a trading bot?

Yes, with caveats. Polygon.io's free tier gives unlimited API calls with 15-minute delayed data. Alpha Vantage's free tier gives 25 calls per day with delayed data. The barchart api via Parse.bot gives 200 credits/month. None of these free tiers support real-time intraday trading. They are suitable for strategy validation, backtesting, and end-of-day swing setups, not for intraday momentum bots.

Can I use the barchart api with Python?

Yes. The REST interface works with Python's `requests` library without an official SDK. Append your `apikey` to each request URL, parse the JSON response, and you are operational in under 20 lines of code. For Socket.IO-based real-time alerts, use the `python-socketio` library.

What are the barchart api rate limits?

Rate limits depend on the plan tier and access route. The Parse.bot marketplace uses a credit system (200 free credits/month up to 100,000/month at the Company tier). Direct OnDemand plans have call-per-minute and monthly limits defined in the commercial agreement. There is no single public number because limits are tier-specific.

What is the best market data API for an intraday trading bot?

For US equities on a budget, Polygon.io Starter (~$29/month) is the strongest combination of price, latency, and documentation. For multi-asset bots covering futures and commodities, the barchart api via a direct OnDemand agreement is harder to replace. For low-frequency strategies, Alpha Vantage's paid tiers are cost-effective.

Do free trade alerts apps use real-time data?

Most best stock alert app free services use delayed data, typically 15 minutes. Before connecting any free alert service to a bot, check the data source and timestamp in the alert payload. If the alert is 15 minutes stale, the setup your bot is reacting to may no longer exist.

How do I get AI stock signals from the barchart api?

The barchart api does not generate ai stock signals natively. It provides the raw data (quotes, news, options flow) that a signal layer sits on top of. The Event-Based API lets you define conditions (price thresholds, news events) and receive alerts when they trigger, which is the closest the platform gets to a signal service. Building a signal layer on top of that data is the bot builder's job.

Does the barchart api cover options and futures?

Yes. Options chains with Greeks, futures contracts across commodities and financials, and commodity spot prices are all available. This is one of Barchart's strongest differentiators versus competitors that focus primarily on US equities.

J
Written by Jay Rocco

Jay Rocco is the Founder and Editor of FullStack Alpha. He has tested 200+ AI stock tools since 2022 and run 15+ AI trading platforms on live accounts with his own money. He reviews the software. He does not tell you what stocks to buy.

AI Stock Trading Bots

Ready to Connect?

Get in touch — we'd love to hear from you.

The FullStack Alpha network

Three sites, one standard: tested tools, no paid rankings.