Economic Calendar API

The FCS economic calendar API turns the global schedule of macroeconomic releases into JSON your code can read. Each row describes one release, such as a CPI print, a payrolls report or a central bank rate decision, with its UTC time, country, currency, impact grade and the actual, forecast and previous figures. A single endpoint answers three questions: what is due next, what came out today, and how an indicator has moved over the years.

Try it now click Open and the JSON appears in a new tab
https://api-v4.fcsapi.com/forex/economy_cal?importance=2&from=2026-10-30&to=2026-11-06&access_key=API_KEY
Open
Runs with the public demo key: 5 sample events per call, 10 calls an hour. Log in and your own key fills in here.

Economic Calendar API at a Glance

Endpointhttps://api-v4.fcsapi.com/forex/economy_cal, GET or POST
ContentInflation, labour, GDP, PMI, trade, housing and consumer data, rate decisions, central bank speeches, bond auctions and public holidays
ReachAbout 150 countries and 120 currencies, archive from 2018 (coverage)
FreshnessChecked for new figures every 5 minutes
ClockUTC for every timestamp
FiltersCurrency or pair, country, event code, impact grade, time window
AccessCorporate plan and above, billed by the number of events returned (credits)

Who Uses an Economic Calendar API

Algorithmic traders wire it into MT4 and MT5 robots that stand aside during high-impact news. Product teams put a forex economic calendar into apps, broker portals and websites, analysts line up years of releases with price data for backtests, and bot builders announce upcoming events in chat groups. When you need quotes next to the news, combine it with the Forex API.

Plan Required: Corporate+

Quick Start: Pull Your First Economic Events

Three steps from zero to a live economic news feed: get a key, open one link, read the JSON. A browser is enough to try it, and the same link works from a terminal, a Python script or an MT5 robot.

1
Get your API key the calendar needs the Corporate plan
Sign up or log in
Just testing? Skip this step: every link on this page already runs with the public demo key API_KEY.
2
Open this link any browser works
https://api-v4.fcsapi.com/forex/economy_cal?importance=2&from=2026-10-30&to=2026-11-06&access_key=API_KEY
Open
forex/economy_cal is the endpoint, access_key is your key, importance=2 keeps the market movers, and from / to set the window in UTC.
3
Read the JSON one block per event
{
  "status": true,
  "response": [
    {
      "title": "Core PCE Price Index MoM",
      "country": "US",
      "importance": "2",
      "date": "2026-10-29 12:30:00",
      "actual": "0.3",
      "forecast": "0.3",
      "previous": "0.3"
    }
  ]
}
Trimmed to 7 of the 19 fields of an event. importance 2 means high impact, date is UTC, and actual stays empty until the figure is published.
No account yet? Try the demo key

The public key API_KEY is for testing: at most 5 events per call, taken from the end of your window, each cut to its first 15 fields (so date, category, reference_date and source_url are left out) and tagged with a note. The reply still shows status true and code 200, but its msg reads "LIMITED RESPONSE IN DEMO API". One IP address may send 10 demo calls per 60 minutes; the next one is refused with code 213. Never ship the demo key in a live product.

More Links to Click

Everything todayOpen
https://api-v4.fcsapi.com/forex/economy_cal?access_key=API_KEY
The default window is the current UTC day: a busy day returns 100 to 150 events (2 to 3 credits), and a day with nothing scheduled answers code 112.
US dollar news this weekOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=USD&importance=1,2&from=2026-10-30&to=2026-11-06&access_key=API_KEY
Medium and high impact only, which keeps the reply short.
One release: US ISM Manufacturing PMIOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USBCOI&from=2026-10-01&to=2026-10-01&access_key=API_KEY
Event code USBCOI plus one date returns exactly one event, shown in the panel on the right.
History of one indicatorOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USNFP&access_key=API_KEY
Non Farm Payrolls: an event code without dates returns the last six months.

Words You Will See

WordMeaning here
UTCThe world reference clock. Every time in a reply, and every from and to you send, uses it. Riyadh is UTC+3, London in winter is UTC+0.
JSONThe plain-text layout of the reply. Each block in curly braces is one event.
CreditWhat a call spends from your plan. One credit pays for up to 50 events.
Event codeA short name for one indicator, for example USNFP for US payrolls.
ImportanceThe expected market effect: 0 low, 1 medium, 2 high.

Economic Calendar API Parameters

Eight fields shape a request. Put them in the query string of a GET call, or send them as form data or a JSON body with POST. Only access_key is mandatory, and a field that takes several values expects commas between them.

ParameterTypeDescription
access_key*requiredstringYour private FCS key, the only mandatory field
It is shown in your dashboard once the account is active. Calls that come from a server IP saved in your dashboard profile are accepted without it; a call with neither gets code 101.
symboloptionalstringCurrencies or forex pairs, separated by commas
Example: symbol=GBPUSD,AUDNZD. How pairs, prefixes and metals are read: news by currency, pair or country.
countryoptionalstringTwo-letter ISO country codes, separated by commas
Example: country=CA,AU,NZ. Which field wins when symbol is present too: currency or country.
eventoptionalstringEvent codes; switches the call to release history
Example: event=USNFP,CNIRYY. Code list: event codes. Default window and matching rules: history by event.
fromoptionalstringStart of the time window, read as UTC
Example: from=2026-09-01. Formats and the start used when it is missing: dates and windows.
tooptionalstringWhere the window closes, also in UTC
Example: to=1789702200 (unix seconds). It takes the same formats as from.
importanceoptionalstringImpact grade 0, 1 or 2, or a list such as 1,2
Example: importance=2. What the grades mean and how common each one is: importance levels.
outputoptionalstringReply encoding, json when not set
jsonp wraps the reply in apijsoncallback(...); the function name is fixed and a callback field is ignored. serialize returns a PHP serialize() string, array returns PHP print_r() text meant for debugging, and object is JSON in which response is a map keyed "0", "1" and so on instead of a list. Any other value, such as csv, falls back to json. Every format is sent with the content type application/json. JSONP puts your key in a page address, so use it only with a key you accept exposing.

Economic Calendar API Endpoint and JSON Response

Call forex/economy_cal with GET or POST. The answer is an economic calendar in JSON: response holds one object per event, ordered from the earliest release to the latest, and info echoes the effective time window and the credits charged. The request fields are described in the parameter table.

API Credit Usage: One credit for each started block of 50 events in response; worked examples are under pricing and credits.
POST/forex/economy_cal
Plan Required: Forex Corporate+ or All Corporate+

Calendar Endpoint Requests

Whole schedule of the current UTC dayOpen
https://api-v4.fcsapi.com/forex/economy_cal?access_key=API_KEY
The US CPI release shown belowOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USIRYY&from=2026-10-14&to=2026-10-14&access_key=API_KEY

Response Format

Response Fields

  • id - Row identifier (string)
  • event - Event code such as ECONOMICS:USIRYY; send it back in event to get earlier releases
  • title - Release name, e.g. Inflation Rate YoY
  • indicator - Indicator family the release belongs to, e.g. Inflation Rate
  • comment - Background text on what the number measures, often several sentences long
  • country - ISO code of the economy, EU for the euro area
  • currency - Currency most exposed to the release
  • importance - Impact grade "0", "1" or "2" (low, medium, high)
  • period - Period the reading covers, e.g. Sep; blank for meetings
  • actual - Published reading; "" before the release and for events that never carry a number
  • forecast - Forecast published ahead of the release; "" if there is none
  • previous - Reading of the prior period
  • source - Institution that publishes the figure
  • scale - Multiplier such as K (thousands), otherwise ""
  • unit - Unit sign such as %, otherwise ""
  • date - Scheduled release time in UTC, YYYY-MM-DD HH:MM:SS
  • category - Topic code such as prce, listed in the category table; "" if none
  • reference_date - Day the reading refers to, YYYY-MM-DD: the month end for monthly data and the meeting day for decisions
  • source_url - Web address of the publisher; "" if none

Mini Sample Response

{
    "id": "399075",
    "event": "ECONOMICS:USIRYY",
    "title": "Inflation Rate YoY",
    "indicator": "Inflation Rate",
    "comment": "In the United States, unadjusted Consumer Price Index for All Urban Consumers is based on the prices of a market basket of ...",
    "country": "US",
    "currency": "USD",
    "importance": "2",
    "period": "Sep",
    "actual": "3.7",
    "forecast": "3.6",
    "previous": "3.4",
    "source": "Bureau of Labour Statistics",
    "scale": "",
    "unit": "%",
    "date": "2026-10-14 12:30:00",
    "category": "prce",
    "reference_date": "2026-09-30",
    "source_url": "http://www.bls.gov/"
}
Reading the Values:
  • All 19 values arrive as strings, numbers included, so convert actual, forecast and previous before comparing them.
  • A missing value is an empty string and never null.
  • Read a number together with scale and unit: the CPI row above means 3.7%, and a reading with scale K is counted in thousands.
  • period never holds a year. It is a month name, a quarter, a weekly date or empty, and reference_date gives the full day.
  • An empty actual on a past event means no figure was published; it is not zero. Speeches, minutes and press conferences never get one.
  • A new actual replaces the old one when the publisher revises a figure, and no revision history is kept. Store your own snapshots when you need the first print.
  • A date that ends in 00:00:00 marks an all-day item such as a public holiday, so show it as "All day" instead of converting the time. Holiday rows carry a numeric event code, and id is the only value that is unique per row.
  • info repeats the effective from and to, the requested codes on event calls (other calls list support_params instead), the server time and credit_count. It may also carry a debug object with timing figures; that object is not part of the contract, so ignore it.

Upcoming and Historical Economic Events by Date

The fields from and to set the time window, and every value you send is read as UTC. Leave both out and you get the current UTC day, 00:00:00 to 23:59:00, while a date-only to reaches 23:59:59. A window that lies ahead lists scheduled releases whose actual is still empty; a window in the past reads the archive described under coverage.

Date and Time Formats

FormatExampleInterpreted as
Date2026-09-18Midnight when used in from; in to the whole day up to 23:59:59
Date and time2026-09-18 02:30That minute; an added :SS part is accepted but rounded down to the minute
Unix seconds17897004002026-09-18 03:00:00 UTC

Sending only to keeps the default start, so a to one week ahead lists everything from the beginning of today until then. Text that is not a date is refused with code 112, quoted under errors and fixes.

Converting to Local Time

The API never changes the zone, so convert in your own code. A date that ends in 00:00:00 is an all-day item and should stay a plain date. In JavaScript add a Z before parsing, otherwise the browser reads the text as local time:

const when = new Date(e.date.replace(" ", "T") + "Z");

In Python attach UTC first, then convert to the zone you need:

from datetime import datetime, timezone
from zoneinfo import ZoneInfo

utc = datetime.strptime(e["date"], "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)
print(utc.astimezone(ZoneInfo("Asia/Riyadh")))

Date Window Examples

Next seven days, high impactOpen
https://api-v4.fcsapi.com/forex/economy_cal?from=2026-10-30&to=2026-11-06&importance=2&access_key=API_KEY
End date onlyOpen
https://api-v4.fcsapi.com/forex/economy_cal?to=2026-11-06&access_key=API_KEY
No from here, so the window opens at the start of today.
September 2026 in fullOpen
https://api-v4.fcsapi.com/forex/economy_cal?from=2026-09-01&to=2026-09-30&access_key=API_KEY
One hour around the BoJ decisionOpen
https://api-v4.fcsapi.com/forex/economy_cal?country=JP&importance=2&from=2026-09-18%2002:30&to=2026-09-18%2003:30&access_key=API_KEY
Same hour as unix secondsOpen
https://api-v4.fcsapi.com/forex/economy_cal?country=JP&importance=2&from=1789698600&to=1789702200&access_key=API_KEY
Handy for robots, which can add or subtract seconds from the current time.

Forex News by Currency, Pair or Country

symbol follows currencies and country follows economies. Used as a forex news API inside a trading tool, symbol takes the chart name as it is: a six-letter pair is cut into its two currencies, and news for either side comes back.

How symbol Values Are Read

Value sentCurrencies matched
symbol=CHFCHF
symbol=USD,JPY,CADUSD, JPY, CAD
EURUSD, EUR/USD, FX:EURUSDEUR and USD, after the prefix and slash are removed
XAUUSDXAU and USD, so a gold chart receives the US calendar
GBPJPY,AUDCADGBP, JPY, AUD, CAD
COPPERLeft whole, because a split happens only when both halves are currency codes; nothing matches, so the reply is code 112

Currency or Country?

The difference matters for the euro. symbol=EUR collects every euro-area release, from the EU aggregate to Germany, France, Italy, Spain and the other members, whereas country=DE returns German releases only. If a request contains both fields, country is applied and symbol is ignored.

Currency and Country Filters

Chart pair, medium and high impactOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=EURUSD&importance=1,2&from=2026-10-26&to=2026-10-26&access_key=API_KEY
The right panel shows rows from this reply: Ifo for EUR and two regional Fed surveys for USD.
Gold chartOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=XAUUSD&importance=2&from=2026-10-30&to=2026-11-06&access_key=API_KEY
Gold is matched through its USD side, so only US releases come back. Add other economies with symbol=XAUUSD,EUR,CNY or country=US,CN,EU.
Commodity currenciesOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=AUD,NZD,CAD&access_key=API_KEY
Germany onlyOpen
https://api-v4.fcsapi.com/forex/economy_cal?country=DE&access_key=API_KEY
Whole euro areaOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=EUR&access_key=API_KEY

High-Impact News and Importance Levels

Every event carries a grade for its usual market effect: 0 low, 1 medium, 2 high. Send one grade or a comma list such as importance=1,2. Values outside 0 to 2 are dropped, and when nothing valid is left the call returns all grades. In a URL write the list with commas; a bracketed list such as [1,2] is not understood and also returns all grades.

Share of Each Grade

GradeShare of eventsTypical releases
2 high3%, about 14 per week and over 30 in the busiest central-bank weeksInflation Rate YoY (CPI), Non Farm Payrolls, Unemployment Rate, ISM Manufacturing and Services PMI, Retail Sales MoM, JOLTs Job Openings, GDP, central bank rate decisions
1 medium16%Initial Jobless Claims, EIA Crude Oil Stocks Change, S&P Global flash PMIs, speeches by ECB Lagarde, BoE Bailey and Fed members, Industrial Production MoM, Consumer Confidence in most economies
0 low81%3-month and 6-month bill auctions, final PMI readings, Current Account, PPI YoY of smaller economies, public holidays

The shares come from the eight-week sample measured for the coverage tables.

Grades Are Set per Country

Identical titles can carry different grades. Inflation Rate YoY is a 2 for the United States and the United Kingdom, yet a 0 for many small economies, so filter on importance instead of matching titles.

Importance Filter Examples

High impact onlyOpen
https://api-v4.fcsapi.com/forex/economy_cal?importance=2&access_key=API_KEY
Medium plus highOpen
https://api-v4.fcsapi.com/forex/economy_cal?importance=1,2&access_key=API_KEY
GBPUSD market moversOpen
https://api-v4.fcsapi.com/forex/economy_cal?symbol=GBPUSD&importance=2&access_key=API_KEY
Low grade onlyOpen
https://api-v4.fcsapi.com/forex/economy_cal?importance=0&access_key=API_KEY
Useful when you list auctions and bank holidays.

Event Codes for NFP, CPI and Rate Decisions

An event code identifies one indicator of one economy, for example ECONOMICS:USNFP for US payrolls. The table lists high-impact codes we have checked for eight major economies, written without the ECONOMICS: prefix. Codes for anything else can be copied from the event field of any calendar row.

Verified High-Impact Codes

EconomyCode and release
United StatesUSNFP Non Farm Payrolls
USUR Unemployment Rate
USIRYY Inflation Rate YoY
USCIR Core Inflation Rate YoY
USIRMM Inflation Rate MoM
USPPIMM PPI MoM
USCPCEPIMM Core PCE Price Index MoM
USINTR Fed Interest Rate Decision
USGDPQQ GDP Growth Rate QoQ
USRSMM Retail Sales MoM
USBCOI ISM Manufacturing PMI
USNMPMI ISM Services PMI
USJO JOLTs Job Openings
USCCI Michigan Consumer Sentiment
USDGO Durable Goods Orders MoM
USHST Housing Starts
USBP Building Permits
USEHS Existing Home Sales
USPI Personal Income MoM
USPSP Personal Spending MoM
Euro AreaEUINTR ECB Interest Rate Decision
EUDIR Deposit Facility Rate
EUIRYY Inflation Rate YoY Flash
GermanyDEBCOI Ifo Business Climate
DEESI ZEW Economic Sentiment Index
DEIRYY Inflation Rate YoY Prel
DECCI GfK Consumer Confidence
DEBOT Balance of Trade
United KingdomGBINTR BoE Interest Rate Decision
GBIRYY Inflation Rate YoY
GBUR Unemployment Rate
GBMGDPMM GDP MoM
GBRSMM Retail Sales MoM
JapanJPINTR BoJ Interest Rate Decision
JPIRYY Inflation Rate YoY
JPBCOI Tankan Large Manufacturers Index
JPBOT Balance of Trade
JPCCI Consumer Confidence
CanadaCAINTR BoC Interest Rate Decision
CAIRYY Inflation Rate YoY
CAUR Unemployment Rate
CABCOI Ivey PMI s.a
AustraliaAUINTR RBA Interest Rate Decision
AUGDPQQ GDP Growth Rate QoQ
AUBCOI NAB Business Confidence
AUBOT Balance of Trade
ChinaCNIRYY Inflation Rate YoY
CNGDPYY GDP Growth Rate YoY
CNBCOI NBS Manufacturing PMI
CNRSYY Retail Sales YoY
CNIPYY Industrial Production YoY
CNBOT Balance of Trade

One Code, a Family of Events

Rate-decision codes also gather the events around a meeting. ECONOMICS:USINTR brings the Fed Interest Rate Decision together with the Fed press conference, FOMC minutes, FOMC economic projections and speeches by Fed officials. ECONOMICS:GBINTR adds MPC votes, MPC minutes and BoE speeches to the BoE decision, ECONOMICS:EUINTR adds the ECB press conference and Lagarde speeches, and ECONOMICS:AUINTR includes the RBA meeting minutes. When only the decision matters, keep the rows whose title ends in "Interest Rate Decision". Adding importance=2 shrinks the family too: for USINTR over 13 months it cuts about 400 rows (9 credits) to 38 (1 credit), namely the nine decisions with their press conferences and minutes, the projections and a few chair speeches. USNFP also holds the annual payroll revision, so keep the rows titled "Non Farm Payrolls" for the monthly prints.

Event Code Requests

Fed meeting family, recent monthsOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USINTR&access_key=API_KEY
Inflation in four economies this yearOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USIRYY,GBIRYY,JPIRYY,CNIRYY&from=2026-01-01&to=2026-10-31&access_key=API_KEY
Euro area and German sentimentOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=EUIRYY,DEBCOI,DEESI&access_key=API_KEY

Historical Economic Calendar Data for One Event

With event in the request, the endpoint returns the release history of the listed codes instead of a daily schedule. symbol and country are ignored in this mode, and the default window changes: without dates it runs from the first day of the month six months back to the last day of the current month, which often includes the next scheduled release.

Writing Codes in a Request

  • Prefix optional.event=USNFP and event=ECONOMICS:USNFP return the same series: older rows were stored with the short code, and the API looks for both forms.
  • Not case-sensitive.usnfp works too, and spaces next to the commas of a list are ignored.
  • Numeric codes. Holidays and some speeches have no official code, so their event value is a number; send that number like any other code.
  • Long ranges. Add from and to to reach further back; a longer window returns more rows and costs more, as the credit table shows.

Release History Requests

NFP, January 2025Open
https://api-v4.fcsapi.com/forex/economy_cal?event=USNFP&from=2025-01-01&to=2025-01-31&access_key=API_KEY
Payrolls and CPI, default windowOpen
https://api-v4.fcsapi.com/forex/economy_cal?event=USNFP,USIRYY&access_key=API_KEY
Bank of Canada since 2018Open
https://api-v4.fcsapi.com/forex/economy_cal?event=CAINTR&from=2018-01-01&access_key=API_KEY
With only from given, the window still closes at the end of the current month.

Category, Reference Date and Source URL of Each Event

Every event ends with three descriptive fields after date: category, reference_date and source_url. They are part of every reply and need no request field. The 16 values before them keep their names, order and meaning. A value that is not known comes back as an empty string. The three fields are defined in the field reference.

Category Codes and Their Share

CodeTopicShare
prcePrices and inflation21%
mnyMoney and central banks12%
bsnssBusiness12%
govGovernment11%
trdTrade9%
cnsmConsumer7%
bndBonds6%
lbrLabour5%
hseHousing5%
gdpGDP4%
enrgEnergy3%
mrktMarkets1%
""No category given5%

Percentages refer to the same eight weeks of data as the importance shares. For the ECB decision in the right panel, the three values are:

"category": "mny",
"reference_date": "2026-09-10",
"source_url": "https://www.ecb.europa.eu"

Requests Returning the Descriptive Fields

ECB decision of 10 September 2026Open
https://api-v4.fcsapi.com/forex/economy_cal?event=EUINTR&from=2026-09-10%2012:15&to=2026-09-10%2012:15&access_key=API_KEY
Today, high impact onlyOpen
https://api-v4.fcsapi.com/forex/economy_cal?importance=2&access_key=API_KEY

Countries Covered and Calendar Data Volume

The calendar spans about 150 countries and roughly 120 currencies, and its archive starts in 2018. New figures are picked up every 5 minutes, so an actual value normally appears within about 5 minutes of publication. The numbers below were measured over eight weeks, 1 September to 26 October 2026, and show how much data a request can return.

Typical Data Volume

MeasureValue
Events per week, all countriesabout 400 to 500
Events on an average weekdayabout 97
Busiest single day252 events
Past events that carry an actual valueabout 84%

Speeches, public holidays, minutes and press conferences never receive an actual value. Auction rows do: their result is published in actual like any other figure.

Busiest Country Calendars

EconomyCodeEvents in 8 weeksHigh impact
United StatesUS61941
Euro areaEU1857
United KingdomGB18113
JapanJP1588
GermanyDE11510
South AfricaZA1080
CanadaCA1077
FranceFR971
AustraliaAU959
SwedenSE810
New ZealandNZ710
BrazilBR680
ItalyIT672
ChinaCN6516
IndiaIN650

Gulf Calendars

The six Gulf economies SA, AE, KW, QA, BH and OM have thin calendars: together they listed 24 events in the five weeks from 29 October 2026, and 23 of them were grade 0. A call with importance=2 for them therefore returns code 112, so request them with country=SA,AE,KW,QA,BH,OM and no importance filter. Text is English only, every time is UTC (Riyadh is UTC+3 all year), and the API has no language or time zone field: names such as lang or timezone are ignored without an error.

Event count and market weight are different things: China published fewer events than Sweden in this period, yet the second-highest number of high-impact releases.


MT4 / MT5 News Filter for Expert Advisors

The MQL5 code below stops an Expert Advisor from opening trades while high-impact news for its chart pair is near. A timer asks the economic calendar API every 5 minutes for grade-2 events between 15 minutes ago and 30 minutes ahead; while any are found, OnTick skips the entry logic. It is useful when the rules of an account, for example a prop-firm challenge, forbid trading around news.

input string InpApiKey     = "API_KEY";   // your own Corporate+ key; the demo key allows 10 calls an hour
input string InpCurrencies = "";        // e.g. "USD" for GOLD, US30 or BTCUSD; empty = first 6 letters of the chart symbol
input int    InpMinsBefore = 30;   // pause this many minutes before high-impact news
input int    InpMinsAfter  = 15;   // and this many minutes after it (45 or more around FOMC, ECB and BoE decisions)

bool newsBlock = false;

// true when a high-impact event for this chart's pair is inside the window
bool HighImpactNewsNow()
{
   long   now  = (long)TimeGMT();
   string pair = (InpCurrencies != "") ? InpCurrencies : StringSubstr(_Symbol, 0, 6);   // "EURUSD.m" -> "EURUSD"
   string url  = "https://api-v4.fcsapi.com/forex/economy_cal?symbol=" + pair
               + "&importance=2"
               + "&from=" + IntegerToString(now - InpMinsAfter * 60)
               + "&to="   + IntegerToString(now + InpMinsBefore * 60)
               + "&access_key=" + InpApiKey;

   char   data[], result[];
   string resHeaders;
   int code = WebRequest("GET", url, "", 5000, data, result, resHeaders);
   if(code == -1)
   {
      // URL not allowed in the terminal, no internet or a timeout: stay safe and block
      Print("WebRequest error ", GetLastError(), " - allow https://api-v4.fcsapi.com/ under Tools > Options > Expert Advisors");
      return true;
   }
   string body = CharArrayToString(result, 0, WHOLE_ARRAY, CP_UTF8);
   // HTTP 200 + status true = at least one event (the demo key's reply is pretty-printed, so both spellings are checked)
   if(code == 200 && (StringFind(body, "\"status\":true") >= 0 || StringFind(body, "\"status\": true") >= 0))
      return true;
   // no event in the window = code 112 (0 credits)
   if(StringFind(body, "\"code\":112") >= 0)
      return false;
   // any other reply (bad key, plan, credits) is logged and blocks new entries to stay safe
   Print("News API error: ", body);
   return true;
}

int OnInit()
{
   EventSetTimer(300);                  // data refreshes every 5 minutes
   newsBlock = HighImpactNewsNow();
   return(INIT_SUCCEEDED);
}

void OnTimer()                  { newsBlock = HighImpactNewsNow(); }
void OnDeinit(const int reason) { EventKillTimer(); }

void OnTick()
{
   if(newsBlock) return;                // no new entries around high-impact news
   // ... your entry logic ...
}
Setting It Up:
  • Allow the API host in MetaTrader: Tools → Options → Expert Advisors → "Allow WebRequest for listed URL", then add https://api-v4.fcsapi.com. Until you do, WebRequest() returns -1.
  • The window is built from TimeGMT() as unix seconds, so the time zone of the broker server has no effect on it.
  • Adjust InpMinsBefore and InpMinsAfter to the news rule of your account.
  • A quiet window is answered with code 112, which is not charged, so most timer checks are free.
  • Any other answer, such as a wrong key or a plan without calendar access, and a failed WebRequest() are printed in the Experts log and treated as news, so no new trade opens until a later check succeeds.
  • The filter reads the symbol of the chart as two currency codes. Names that are not a pair, such as GOLD or US30, return code 112, which the filter takes for "no news"; type the currencies into InpCurrencies for metals, indices and crypto.
  • The Fed press conference starts 30 minutes after the decision, so set InpMinsAfter to at least 45 on FOMC, ECB and BoE days.
  • Every check that finds news costs 1 credit, so a 5-minute timer can spend up to 9 credits around one event on each chart. To cut that to one call per hour, fetch the day's grade-2 events once, keep their times and compare them with TimeGMT() in OnTick; skip rows whose event is a number, because those are holidays and elections.
  • The Strategy Tester never executes WebRequest(); run the filter on a demo or live chart.
  • MQL4 has WebRequest() as well, so the same request and logic carry over to an MT4 EA.

Economic Calendar API Examples in Python, JavaScript and PHP

Each snippet requests the high-impact EURUSD news of the current day and prints the UTC time, currency, title, actual and forecast of every row. Run them on a server or from a script where the key stays hidden; a key placed in browser JavaScript or an app bundle can be read by anyone.

import requests

params = {
    "symbol": "EURUSD",
    "importance": "2",
    "access_key": "API_KEY",
}
data = requests.get("https://api-v4.fcsapi.com/forex/economy_cal",
                    params=params, timeout=10).json()

if data["status"]:
    for e in data["response"]:
        print(e["date"], "UTC", e["currency"], e["title"],
              "actual:", e["actual"] or "-", "forecast:", e["forecast"] or "-")
else:
    print(data["msg"])

Projects Built on an Economic Events API

Most projects reuse one of a handful of request patterns. Find yours in the table.

ProjectRequest pattern
EA news filterChart pair in symbol, importance=2 and a short unix window, checked on a timer. Full code: the MT4 / MT5 guide.
Telegram or Discord alertsOne morning call for the grade-2 events of the day, then another shortly after each release time to post actual against forecast.
Calendar widget on a websiteYour server fetches the day once per refresh cycle and serves its cached copy, so visitor traffic never reaches the API. Replies carry Cache-Control: no-store and the API accepts requests from any origin, so a call from browser JavaScript works but shows your key to every visitor.
Backtests and researchLong histories per code with event, from and to, joined to price candles by UTC time. See event history.
Trading journalThe releases within an hour of each trade, to explain unusual fills and slippage.
AI market briefingsA week of high-impact rows handed to a language model that writes the preview.
Mobile appThe currencies each user follows in symbol, with a push message before grade-2 events.

Economic Calendar API Pricing and Credits

Calendar access starts with the Corporate plan and is included in every higher plan; keys on smaller plans receive code 105. The charge for a call depends only on the number of events it returns and is reported in info.credit_count. A call that fails or finds nothing is free.

Credits by Reply Size

Events in the replyCredits
0 (error or empty)0
1 to 501
51 to 1002
101 to 1503
More than 150events divided by 50, rounded up

There is no row limit and no paging: one call returns every matching event, and no limit, offset or page field exists.

What Real Requests Cost

RequestEvents returnedCredits
All countries, one average weekdayabout 972
All countries, the busiest day of the sample2526
All countries, one full weekabout 400 to 5008 to 10
All countries, two weeksabout 90018
One week with importance=2about 141
News filter check with nothing due00
Spending Fewer Credits:
  • Leave out grade 0 with importance=1,2; that removes about four rows in five.
  • List only the currencies you trade in symbol rather than pulling the whole world.
  • Keep one cached copy per refresh cycle on your server; polling faster than every 5 minutes returns the same rows. If one cached refresh costs 3 credits, refreshing every 5 minutes uses 864 credits a day and refreshing hourly 72, however many visitors your site has.
  • Give robots short windows, such as the next 30 to 60 minutes, so most of their checks come back empty and cost nothing.
  • Plan prices and monthly allowances are on the pricing page.

Calendar Request Errors and Fixes

A failed call answers with "status": false, a numeric code and a msg. Check status before reading response. Only code 112 sets HTTP status 400; every other error arrives as HTTP 200 with status false, so branch on the body and not on the HTTP status. A 112 message that starts with "No data" means nothing matched, which also happens when from is later than to or the country is unknown; one that starts with "Invalid" points at a field you must rewrite. Messages are quoted as the API sends them; for 211 and 213 only the opening words are shown.

Code / HTTPMessageFix
101
HTTP 200
You have not supplied a valid API Access Key.Also the answer to a call with no access_key or an empty one. Copy the key again from the dashboard and look for stray spaces or a cut-off value.
102
HTTP 200
Your account is not active, Please check your email to activate it.Click the activation link in the sign-up email.
104
HTTP 200
Sorry, access_key parameter missing. Or add your IP in your dashboard->profileA plain call without a key gets 101, so 104 is rare. If you see it, add access_key or save the IP of your server in the dashboard profile.
105
HTTP 200
Sorry, You are not allow to access this API endpoint. Please upgrade your planThe plan is below Corporate; upgrade to unlock the calendar.
112
HTTP 400
No data or an invalid value has been specified. Data not found.Nothing matched, so widen the window or check codes, countries and currencies. For a news filter it simply means no news. Do not retry the same request.
112
HTTP 400
Invalid 'from' date. Use YYYY-MM-DD, 'YYYY-MM-DD HH:MM' or unix time.Rewrite the named field (from or to) in one of the listed formats.
211
HTTP 200
Starts with "Your monthly API request limit exceed" and ends with your limit and its reset dateRetrying does not help until the reset date; wait for it or move to a larger plan.
213
HTTP 200
Starts with "Rate limit exceeded."Too many calls in a short period, for example more than 10 demo-key calls an hour from one IP. Wait a minute and retry, slow down, or switch to your own key.

Economic Calendar API FAQ

What is an economic calendar API?

A web service that delivers the dates, times and results of scheduled economic releases as structured data. Software reads it directly instead of scraping a calendar web page.

Is there a free economic calendar API?

You can try this one at no cost with the demo key API_KEY, which gives a small trimmed sample and allows 10 calls an hour from one IP. Complete data needs the Corporate plan or a higher plan.

How often is the economic calendar updated?

Every 5 minutes. A freshly published figure is usually visible in the actual field about 5 minutes after its release time.

Which time zone does the economic calendar API use?

UTC, both for the times in each reply and for the from and to values you send. Conversion to local time is left to your application.

How far back does the historical economic calendar data go?

The stored history begins in 2018. Request any period since then by setting from and to.

Can I use the economic calendar API in MT4 or MT5?

Yes. An Expert Advisor can call it through WebRequest(), and passing the chart pair as symbol returns the news for both of its currencies.

Which economic events move the forex market the most?

Central bank rate decisions, CPI inflation, Non Farm Payrolls, unemployment and GDP releases of the major economies usually cause the largest moves. The API marks them with importance 2.

Can I get the economic calendar as CSV?

Not directly, because the endpoint answers in JSON, JSONP, serialized PHP, array or object form. Writing the JSON rows to a CSV file takes only a few lines in most languages.

How many credits does an economic calendar request cost?

One credit covers up to 50 returned events, so 51 to 100 events cost two, and failed or empty calls cost nothing. A whole week of high-impact news fits into a single credit.

Does the API include forecasts for upcoming events?

Yes, where a forecast exists it is present before the release, next to the previous reading. The actual field stays empty until the figure is out.

Does the economic calendar API support other languages or time zones?

No. Text is English only and every time is UTC. Names such as lang or timezone are ignored without an error, so convert the times in your own code; the Date Range section shows how for Python and JavaScript.

Can I show the economic calendar on my own website?

Fetch it on your server with your key, cache the reply for the refresh cycle and serve the cached copy to your visitors. A call from browser JavaScript works because the API accepts any origin, but it shows your key to everyone. How the data may be displayed is set by the terms of service.


Economic Calendar Data Disclaimer

Release times are set by the publishing institutions and can change, sometimes at short notice, and published figures are often revised later. Treat the calendar as information rather than trading advice: FCS API accepts no liability for losses from decisions based on it, and use of the data is governed by our terms of service.