AutomationΒ·

A Free Economic Calendar API for Trading Bots

Where a trading robot can get the economic calendar: the sources people use, what breaks with each, and a free API with no key built for polling from Expert Advisors, cBots, Python and JavaScript.

Every automated strategy eventually asks the same question: is there news in the next half hour? Answering it needs a machine-readable economic calendar, and that turns out to be harder to find than the calendar itself. Most are web pages. The few feeds that exist are rate-limited, paid, or disappear without notice.

This guide is the short version of that search, and the endpoint we ended up building and opening to everyone.

πŸ—ΊοΈ Where Bots Get the Calendar Today

SourceCostWhat you getWhat breaks
Forex Factory weekly file (ff_calendar_thisweek.json, also XML and CSV)FreeThe current week, impact and forecastTwo downloads every five minutes per IP address: a VPS with many terminals hits the limit; no actual values in the file
Broker's MT5 calendar (MQL5 Calendar* functions)FreeFull calendar inside the terminalMT5 only; some brokers do not relay it
Scraping a calendar websiteFree until it is notWhatever the page showsLayout changes, bot protection, terms of use
Paid market-data APIsFrom tens of dollars a monthLong history, many countriesOverkill and overpriced for "is there news in 30 minutes"
Small private APIsFree tiers with a keyOften goodOne person behind them; keys and limits change

None of these is wrong. Each one just fails in a way that a robot running unattended on a VPS does not notice until it has traded through a rate decision.

🎯 What a Bot Actually Needs

Strip the question down and the requirements are few:

  1. The next day or two, not the next year. A filter looks hours ahead.
  2. Filtered on the server: only the currencies the bot trades, only the impact it cares about. A few kilobytes, not a megabyte.
  3. Unix timestamps in UTC. Every platform can compare two integers; nobody enjoys parsing dates in MQL.
  4. Built for polling. Hundreds of robots asking every 15 minutes should be normal traffic, not abuse.
  5. No key, no account. A key is one more thing to leak, rotate and support.
  6. Reachable from every platform, including the ones that restrict network access.

πŸ”“ The Endpoint

GET https://showmytrades.com/api/public/calendar/v1?currency=EUR,USD&impact=high&days=1
ParameterValuesDefault
currencyAny of USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF, CNY, comma-separatedAll nine
impacthigh, medium, low, holiday, comma-separated, or allhigh
days1 to 30 days ahead; the window always starts 6 hours in the past1
formatjson or csvjson

Each event has ts (Unix seconds, UTC), time (ISO 8601), currency, impact, title, forecast, previous and actual. Responses are cached 15 minutes and carry an ETag; the limit is 600 requests per minute per IP address. Everything is on the reference page, including a CSV layout designed so that MQL's StringSplit() cannot get it wrong.

Three calls, in three languages:

curl "https://showmytrades.com/api/public/calendar/v1?currency=USD&impact=high,medium&days=7&format=csv"

πŸ”Œ Per Platform

PlatformHowCode
MetaTrader 4WebRequest() with https://showmytrades.com in the allow listOne include file, SMT_NewsFilter.mqh
MetaTrader 5The same include file, or the built-in calendarBuilt-in or API, with both snippets
cTrader (desktop and cloud)A WebSocket on port 25345, because cTrader Cloud blocks HTTP from cBotsA complete cBot in C#
Python, Node, anything with HTTPThe endpoint aboveThe snippets in this page
An AI assistant (Claude, ChatGPT)The get_economic_calendar tool of the MCP server, no keyAsk "what high-impact USD news is out this week?"

The cTrader case is the one that justifies the WebSocket: a cBot in the cloud cannot make an HTTP request at all, and most cTrader users run in the cloud. The socket speaks the same four parameters and returns the same CSV.

🧭 Designing the Filter Itself

The API answers when. The strategy decides what to do, and the usual choices are:

  • Window. 30 minutes before and after a high-impact release is the common default. Scalpers go wider after; swing systems sometimes only block entries in the minute of the release.
  • Which currencies. Both sides of the traded pair. Gold and indices usually watch USD alone.
  • Open positions. Blocking new entries is the easy half. Closing or tightening stops before a release is a strategy decision, with its own costs.
  • Failure mode. If the download fails and the bot has no calendar, should it trade or wait? Decide explicitly; the sample code trades, and says so.

βš–οΈ What the API Is Not

It is a schedule, assembled from public calendar sources and served as-is. Releases are sometimes moved or cancelled, surprise announcements are by definition not on it, and the impact level is a classification, not a prediction of the move. It is information to build a filter with, not a signal.

❓ FAQ

Is it really free, for commercial robots too? Yes. No key, no account, no tier. A credit, Economic calendar by ShowMyTrades linked to the calendar page, is appreciated and never required.

How often should a bot call it? Every 15 minutes. That is the cache lifetime, and the calendar does not change faster. With If-None-Match an unchanged calendar costs nothing.

What time zone are the times in? UTC, always. ts is Unix time in seconds; time is the same instant in ISO 8601 with a Z.

Can I get history, to backtest a news filter? Not from this endpoint: the window reaches back six hours and ahead up to 30 days. Historical calendars for backtesting are a different product with different terms.

Where does the data come from? Public economic calendar sources, merged and normalised by ShowMyTrades. The same data drives the calendar page on this site.


A robot that knows when to stay out is a robot whose track record you can show. Connect it free, and the quiet half hours around the news will be visible on the drawdown chart.