News API Documentation

Last Updated: 05/30/2024 13:15 EST

Our API uses Open AI and Machine Learning to provide forex news event data and analysis to developers across all programming languages, including MQL5, MQL4, Swift, and Python.

Library Access

You can also access the API using GET requests. To authenticate your GET requests, include your API key in the header of your request. You can generate an API key in your profile.

Example Header:

{
  "Content-Type": "application/json",
  "Authorization": "Api-Key YOUR_API_KEY",
}


Endpoints

Endpoint Description
Event List List of News Events
Event Info Basic news event information
Event History Details including Strength, Quality, Projection, and Outcome
Machine Learning Predictions on event outcomes
Smart Analysis Analysis on event outcomes
Full Event List Comprehensive list of events with all details
Calendar List of events ordered by time
GPT Sentiment analysis on news events and statements

Rate Limit

Our API enforces a rate limit of one request per second to ensure service stability and fair usage.

Pricing and Credits

Each day, users are entitled to 24 free uses of our API. Once these free uses are depleted, usage rates apply as follows: 1 credit per use for Non-GPT endpoints and 5 credits per use for GPT POST requests.

Credits are essential for continued use and can be purchased via our billing page. You can monitor your API usage here.

Note: Charges will only occur if users have credits, thus unauthenticated users are limited to the free daily uses.

Event List

To access the Event List endpoint, send a GET request to https://www.jblanked.com/news/api/mql5/list/ for MQL5 data, or send a GET request to https://www.jblanked.com/news/api/forex-factory/list/ for Forex Factory data.

It returns a JSON list of dictionaries of all available News Events.

Example Response:

MQL5:

[
  {
    "Name": "Adjusted Current Account",
    "Currency": "JPY",
    "Event_ID": 39207008,
    "Category": "Currency Report",
  },
]

Forex Factory:

[
  {
    "Name": "Adjusted Current Account",
    "Currency": "JPY",
  },
]

Event Info

To access the Event Info endpoint, send a GET request to: https://www.jblanked.com/news/api/mql5/ID, where ID is the Event Identification number. This endpoint only has MQL5 data.

It returns a JSON object with the Name, Currency, Event ID, and Category.

Example Response:

[
  {
    "Name": "Average Hourly Earnings m/m",
    "Currency": "USD",
    "Event_ID": 840030018,
    "Category": "Job Inflation Report",
  },
]

Event History

To access the Event History endpoint, send a GET request to: https://www.jblanked.com/news/api/mql5/ID/history/, where ID is the Event Identification number. This endpoint only has MQL5 data.

It returns a JSON object with the Name, Currency, Event ID, Category, and Event History. The Event History returns a list of dictionaries with the fields Date, Actual, Forecast, Previous, Outcome, Projection, Strength, Quality, 1 Minute, 30 Minute, and 1 Hour.

Example Response:

{
  "Name": "Average Hourly Earnings m/m",
  "Currency": "USD",
  "Event_ID": 840030018,
  "Category": "Job Inflation Report",
  "History": [
    {
      "Date": "2023.12.08 15:30:00",
      "Actual": 0.4,
      "Forecast": 0.4,
      "Previous": 0.2,
      "Outcome": "Actual = Forecast > Previous",
      "Projection": 0.5,
      "Strength": "Strong Data",
      "Quality": "Bad Data",
      "1 Minute": "Bullish",
      "30 Minute": "Bullish",
      "1 Hour": "Bullish",
    },
  ],
}

Machine Learning

To access the Machine Learning endpoint, send a GET request to: https://www.jblanked.com/news/api/mql5/ID/machine-learning/, where ID is the Event Identification number. This endpoint only has MQL5 data.

It returns a JSON object with the Name, Currency, Event ID, Category, and Machine Learning predictions.

Example Response:

{
  "Name": "Average Hourly Earnings m/m",
  "Currency": "USD",
  "Event_ID": 840030018,
  "Category": "Job Inflation Report",
  "MachineLearning": {
    "Outcomes": {
      "Actual < Forecast < Previous": {
        "1 Hour": {"Bearish": 36.77, "Bullish": 61.21},
        "1 Minute": {"Bearish": 33.23, "Bullish": 65.27},
        "30 Minute": {"Bearish": 33.80, "Bullish": 65.07},
      },
      // other outcomes...
    },
    "Accuracy": {
      "1 Hour": 0.57,
      "1 Minute": 0.71,
      "30 Minute": 0.43,
    }
  }
}

Smart Analysis

To access the Smart Analysis endpoint, send a GET request to: https://www.jblanked.com/news/api/mql5/ID/smart-analysis/, where ID is the Event Identification number. This endpoint only has MQL5 data.

It returns a JSON object with the Name, Currency, Event ID, Category, and Smart Analysis.

Example Response:

{
  "Name": "Average Hourly Earnings m/m",
  "Currency": "USD",
  "Event_ID": 840030018,
  "Category": "Job Inflation Report",
  "SmartAnalysis": {
    "Actual < Forecast < Previous": "Bullish",
    "Actual < Forecast = Previous": "Bullish",
    "Actual = Forecast < Previous": "Bullish",
    "Actual = Forecast = Previous": "Neither_Bearish_or_Bullish",
    "Actual = Forecast > Previous": "Bearish",
    "Actual > Forecast > Previous": "Bearish",
    // other outcomes...
  }
}

Full Event List

To access the Full Event List endpoint, send a GET request to https://www.jblanked.com/news/api/mql5/full-list/ to access MQL5's data, or send a GET request to https://www.jblanked.com/news/api/forex-factory/full-list/ to access Forex Factory's data.

The MQL5 endpoint returns a JSON object with the Name, Currency, ID, Event History, Machine Learning, and Smart Analysis for each event, organized by currency. The Forex Factory endpoint returns a JSON object with the Name, Currency, and Event History for each event, organized by currency.

Calendar

To access the Calendar endpoint, send a GET request to https://www.jblanked.com/news/api/mql5/calendar/ to access MQL5's data, or send a GET request to https://www.jblanked.com/news/api/forex-factory/calendar/ to access Forex Factory's data.

For events occurring today only, send a GET request to https://www.jblanked.com/news/api/mql5/calendar/today/ for MQL5 data, or send a GET request to https://www.jblanked.com/news/api/forex-factory/calendar/today/ for Forex Factory data.

For events occurring this week only, send a GET request to https://www.jblanked.com/news/api/mql5/calendar/week/ for MQL5 data, or send a GET request to https://www.jblanked.com/news/api/forex-factory/calendar/week/ for Forex Factory data.

Example Response:

MQL5:

{
  "Name": "Core CPI m/m",
  "Currency": "USD",
  "Category": "Consumer Inflation Report",
  "Date": "2024.02.08 15:30:00",
  "Actual": 0.4,
  "Forecast": 0.4,
  "Previous": 0.2,
  "Outcome": "Actual = Forecast > Previous",
  "Projection": 0.5,
  "Strength": "Strong Data",
  "Quality": "Bad Data"
}

Forex Factory:

{
  "Name": "Core CPI m/m",
  "Currency": "USD",
  "Date": "2024.02.08 15:30:00",
  "Actual": 0.4,
  "Forecast": 0.4,
  "Previous": 0.2,
}

GPT

To access the GPT endpoint, send a POST request to: https://www.jblanked.com/news/api/gpt/

Include a "content" key with your query as the value.

Example Request:

{
  "content": "What is the sentiment on the latest CPI report?"
}

If the POST request is successful, it returns a JSON object with a "task_id" key containing the Task ID, and a "message" key indicating 'Task started'.

To get the response, send a GET request to: https://www.jblanked.com/news/api/gpt/status/YOUR-TASK-ID, where "YOUR-TASK-ID" is the Task ID provided by the POST request.

Example Response:

{
  "status": "complete",
  "message": "The latest CPI report indicates a bearish sentiment."
}

Event IDs

Currency Name Event ID
JPY Adjusted Current Account 392070008
JPY Adjusted Trade Balance 392040001
CAD ADP Nonfarm Employment Change 124070001
USD ADP Nonfarm Employment Change 840190001
JPY au Jibun Bank Composite PMI 392500003
JPY au Jibun Bank Manufacturing PMI 392500001
JPY au Jibun Bank Services PMI 392500002
USD Average Hourly Earnings m/m 840030018
USD Average Hourly Earnings y/y 840030019
USD Baker Hughes US Oil Rig Count 840100001
USD Baker Hughes US Total Rig Count 840100002
CAD BoC Interest Rate Decision 124040006
GBP BoE Interest Rate Decision 826020009
JPY BoJ Bank Lending y/y 392060013
JPY BoJ Corporate Goods Price Index m/m 392060014
JPY BoJ Corporate Goods Price Index y/y 392060015
JPY BoJ Interest Rate Decision 392060022
JPY BoJ M2 Money Stock y/y 392060012
JPY BoJ Monetary Base y/y 392060011
JPY BoJ Tankan Large Manufacturing Index 392060008
JPY BoJ Tankan Large Non-Manufacturing Index 392060010
JPY BoJ Weighted Median Core CPI y/y 392060038
USD CB Consumer Confidence Index 840180002
GBP Claimant Count Change 826010004
GBP Core CPI m/m 826010043
EUR Core CPI m/m 999030010
CAD Core CPI m/m 124010005
USD Core CPI m/m 840030006
EUR Core CPI y/y 999030012
JPY Core CPI y/y 392030003
USD Core CPI y/y 840030008
GBP Core CPI y/y 826010013
CAD Core CPI y/y 124010006
USD Core Durable Goods Orders m/m 840020014
JPY Core Machinery Orders m/m 392010009
JPY Core Machinery Orders y/y 392010010
USD Core PCE Price Index m/m 840010001
USD Core PPI m/m 840030002
GBP Core PPI Output m/m 826010009
GBP Core PPI Output y/y 826010010
USD Core PPI y/y 840030004
USD Core Retail Sales m/m 840020011
GBP Core Retail Sales m/m 826010021
CAD Core Retail Sales m/m 124010008
CHF CPI m/m 756020001
EUR CPI m/m 999030011
CAD CPI m/m 124010003
GBP CPI m/m 826010011
USD CPI m/m 840030005
AUD CPI q/q 36010014
NZD CPI q/q 554010005
JPY CPI s.a. m/m 392030010
CHF CPI y/y 756020002
GBP CPI y/y 826010012
AUD CPI y/y 36010015
NZD CPI y/y 554010006
CAD CPI y/y 124010004
JPY CPI y/y 392030001
EUR CPI y/y 999030013
USD CPI y/y 840030007
EUR Current Account 999010016
CAD Current Account 124010010
NZD Current Account 554010027
AUD Current Account 36010036
GBP Current Account 826010036
USD Current Account 840010015
USD Durable Goods Orders m/m 840020013
EUR ECB Deposit Facility Rate Decision 999010006
EUR ECB Interest Rate Decision 999010007
EUR ECB Marginal Lending Facility Rate Decision 999010015
USD EIA Crude Oil Stocks Change 840200001
USD EIA Natural Gas Storage Change 840200009
NZD Electronic Card Retail Sales m/m 554010001
NZD Electronic Card Retail Sales y/y 554010002
CAD Employment Change 124010011
AUD Employment Change 36010003
EUR Employment Change q/q 999030001
NZD Employment Change q/q 554010016
USD Existing Home Sales 840120001
USD Export Price Index m/m 840030013
EUR Export Price Index m/m 276010005
USD Export Price Index y/y 840030014
EUR Export Price Index y/y 276010006
USD Factory Orders m/m 840020003
EUR Factory Orders m/m 276010018
EUR Factory Orders y/y 276010019
USD Fed Interest Rate Decision 840050014
USD Federal Budget Balance 840150001
CAD Foreign Securities Purchases 124010019
GBP GDP 3m/3m 826010040
CAD GDP m/m 124010021
GBP GDP m/m 826010039
USD GDP q/q 840010007
GBP GDP q/q 826010037
AUD GDP q/q 36010019
NZD GDP q/q 554010024
CAD GDP q/q 124010022
JPY GDP q/q 392010001
CHF GDP q/q 756040001
EUR GDP q/q 999030016
NZD GDP y/y 554010025
GBP GDP y/y 826010038
CHF GDP y/y 756040002
EUR GDP y/y 999030017
JPY GDP y/y 392010003
CAD GDP y/y 124010035
AUD GDP y/y 36010020
EUR HICP m/m 380010003
JPY Household Spending y/y 392030008
EUR Import Price Index m/m 276010003
USD Import Price Index m/m 840030011
USD Import Price Index y/y 840030012
EUR Import Price Index y/y 276010004
GBP Industrial Production m/m 826010025
JPY Industrial Production m/m 392020006
EUR Industrial Production m/m 999030007
GBP Industrial Production y/y 826010026
JPY Industrial Production y/y 392020007
EUR Industrial Production y/y 999030008
CHF Industrial Production y/y 756020006
USD Initial Jobless Claims 840140001
CAD IPPI m/m 124010024
USD ISM Manufacturing PMI 840040001
USD ISM Non-Manufacturing PMI 840040003
CAD Ivey PMI 124020001
USD JOLTS Job Openings 840030021
JPY Labor Cash Earnings y/y 392050001
NZD Labor Cost Index q/q 554010017
NZD Labor Cost Index y/y 554010018
GBP Manufacturing Production m/m 826010027
GBP Manufacturing Production y/y 826010028
CAD Manufacturing Sales m/m 124010029
USD Michigan 5-Year Inflation Expectations 840210005
USD Michigan Consumer Expectations 840210002
USD Michigan Consumer Sentiment 840210001
USD Michigan Inflation Expectations 840210004
USD New Home Sales 840020008
USD New Home Sales m/m 840020009
USD Nonfarm Payrolls 840030016
USD Pending Home Sales m/m 840120003
USD Pending Home Sales y/y 840120004
GBP PPI Input m/m 826010005
NZD PPI Input q/q 554010022
GBP PPI Input y/y 826010006
CHF PPI m/m 756020003
EUR PPI m/m 999030005
USD PPI m/m 840030001
GBP PPI Output m/m 826010007
NZD PPI Output q/q 554010023
GBP PPI Output y/y 826010008
AUD PPI q/q 36010029
CHF PPI y/y 756020004
EUR PPI y/y 999030006
AUD PPI y/y 36010030
USD PPI y/y 840030003
AUD RBA Interest Rate Decision 36030008
AUD RBA Trimmed Mean CPI q/q 36030014
NZD RBNZ 2-Year Inflation Expectations 554020010
NZD RBNZ Interest Rate Decision 554020009
JPY Real Wage y/y 392050004
USD Retail Control m/m 840020012
EUR Retail Sales m/m 999030003
JPY Retail Sales m/m 392020002
CAD Retail Sales m/m 124010007
AUD Retail Sales m/m 36010012
GBP Retail Sales m/m 826010019
USD Retail Sales m/m 840020010
NZD Retail Sales q/q 554010019
AUD Retail Sales q/q 36010038
USD Retail Sales y/y 840020025
NZD Retail Sales y/y 554010021
CHF Retail Sales y/y 756020007
EUR Retail Sales y/y 999030004
JPY Retail Sales y/y 392020003
GBP Retail Sales y/y 826010020
CAD RMPI m/m 124010026
USD S&P Global Composite PMI 840500003
AUD S&P Global Composite PMI 36500003
EUR S&P Global Composite PMI 999500003
EUR S&P Global Manufacturing PMI 999500001
CAD S&P Global Manufacturing PMI 124500001
AUD S&P Global Manufacturing PMI 36500001
USD S&P Global Manufacturing PMI 840500001
EUR S&P Global Services PMI 999500002
AUD S&P Global Services PMI 36500002
USD S&P Global Services PMI 840500002
CHF SNB Interest Rate Decision 756010001
JPY Tokyo Core CPI y/y 392030006
JPY Tokyo CPI s.a. m/m 392030011
EUR Trade Balance 999030018
CHF Trade Balance 756030003
JPY Trade Balance 392040002
CAD Trade Balance 124010018
NZD Trade Balance 554010009
AUD Trade Balance 36010011
GBP Trade Balance 826010029
USD Trade Balance 840020001
CAD Unemployment Rate 124010014
USD Unemployment Rate 840030015
GBP Unemployment Rate 826010003
AUD Unemployment Rate 36010006
NZD Unemployment Rate 554010014
CHF Unemployment Rate 756040003
EUR Unemployment Rate 999030020
JPY Unemployment Rate 392030007
CAD Wholesale Trade m/m 124010031