News API Docs

Last Updated: 04/03/2024 19:59 EST

 

 

Our API uses Open AI, Machine Learning, and MQL5’s Calendar to provide News API access to developers across all computer languages, including MQL4 and Python. 

 

You can access our API via our Library:

Github - https://github.com/jblanked/JB-News 

Python - https://pypi.org/project/jb-news/ 

MQL - JB-News.mqh 

 

You can also access the API using GET requests (a type of HTTP request that is used to retrieve data from a server). To be authenticated when using GET requests, you must send your API key in the header of your request. You can generate an API key in your  profile.


Note that the Free Tier has a rate limit of once every 5 minutes and doesn't grant you access to machine learning, smart analysis, or extended history data. Alternatively, you can join the Premium Tier, which has a rate limit of once every minute and grants you access to all our data. VIP members enjoy unrestricted access with no rate limit.

 

Example of the header:


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

 

Endpoints

 

The API contains 7 main endpoints:

 

1. Event List - List of News Events

2. Event Info - Name, ID, Currency, and Category

3. Event History - Name, ID, Currency, Category, and History with the Strength, Quality, Projection, and Outcome of each event and the 1 minute, 30 minute, and 1 hour price action of each event

4. Machine Learning - Name, ID, Currency, Category, and Machine Learning predictions (bullish/bearish) on each of the 13 possible event outcomes

5. Smart Analysis - Name, ID, Currency, Category, and Smart Analysis (bullish/bearish) on each of the 13 possible event outcomes

6. Full Event List - List of News Events with Name, ID, Currency, Category, History, Machine Learning, and Smart Analysis

7. Calendar - List of News Events, in order by time, with Name, ID, Currency, Category, Date, Actual, Forecast, Previous, Outcome, Strength, Quality, and Projection.

 

 

Event List

To access the Event List endpoint, send a GET request to: https://www.jblanked.com/news/api/list/

It will return a JSON list of dictionaries of all the available News Events

Here is an example of what it will return:


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

 

Event Info

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

 

It will return a JSON object of the Name, Currency, and ID.

 

Here is an example of what it will return (using the event USD - Average Hourly Earnings):


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

 

Endpoint: https://www.jblanked.com/news/api/840030018

 

Alternatively you can send a GET request to: https://www.jblanked.com/news/api/ID/full/, and it will return a JSON object of the Name, Currency, ID, Event History, Machine Learning, and Smart Analysis.

 

 

Event History

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

 

It will return a JSON object of the Name, Currency, ID, and Event History

 

Here is an example of what it will return (using the event USD - Average Hourly Earnings):


{
    "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",
        },
    ],
}

Endpoint: https://www.jblanked.com/news/api/840030018/history/

 

 

Machine Learning

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

 

It will return a JSON object of the Name, Currency, ID, and Machine Learning

 

Here is an example of what it will return (using the event USD - Average Hourly Earnings):


{
    "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",
        "Actual < Forecast Actual = Previous": "Bullish",
        "Actual < Forecast Actual > Previous": "Bearish",
        "Actual > Forecast Actual < Previous": "Bullish",
        "Actual > Forecast Actual = Previous": "Neither_Bearish_or_Bullish",
        "Actual < Forecast Forecast > Previous": "Bullish",
        "Actual > Forecast Forecast < Previous": "Bearish",
        "Actual > Forecast Forecast = Previous": "Bearish",
    },
    "MachineLearning": {
        "Outcomes": {
            "Actual < Forecast < Previous": {
                "1 Hour": {"Bearish": 36.77243292, "Bullish": 61.20939255},
                "1 Minute": {"Bearish": 33.22533965, "Bullish": 65.27003646},
                "30 Minute": {"Bearish": 33.79747868, "Bullish": 65.06764889},
            },
            "Actual < Forecast = Previous": {
                "1 Hour": {"Bearish": 23.55616391, "Bullish": 75.85520148},
                "1 Minute": {"Bearish": 2.88366172, "Bullish": 95.74064612},
                "30 Minute": {"Bearish": 1.47894481, "Bullish": 98.12327623},
            },
            
        },
        "1 Hour Accuracy": 0.57142857,
        "1 Minute Accuracy": 0.71428571,
        "30 Minute Accuracy": 0.42857143,
    },
}

 

 

Smart Analysis

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

 

It will return a JSON object of the Name, Currency, ID, and Smart Analysis

 

Here is an example of what it will return (using the event USD - Average Hourly Earnings):


{
    "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",
        "Actual < Forecast Actual = Previous": "Bullish",
        "Actual < Forecast Actual > Previous": "Bearish",
        "Actual > Forecast Actual < Previous": "Bullish",
        "Actual > Forecast Actual = Previous": "Neither_Bearish_or_Bullish",
        "Actual < Forecast Forecast > Previous": "Bullish",
        "Actual > Forecast Forecast < Previous": "Bearish",
        "Actual > Forecast Forecast = Previous": "Bearish",
    },
}

 

 

Full Event List

To access the Full Event List endpoint, send a GET request to: https://www.jblanked.com/news/api/full-list/

 

It will return a JSON object of the Name, Currency, ID, Event History, Machine Learning, and Smart Analysis of each event, organized by currency.

 

Alternatively you can send a GET request to: https://www.jblanked.com/news/api/full-list/Currency, where Currency is the currency you want to filter by.

 

 

Calendar

To access the Calendar endpoint, send a GET request to: https://www.jblanked.com/news/api/calendar/

 

If you want to get the events from today only, send a GET request to: https://www.jblanked.com/news/api/calendar/today/

 

If you want to get the events from this week only, send a GET request to: https://www.jblanked.com/news/api/calendar/week/

 

It will return a History JSON object as a dictionary. Here is an example:


 {
     "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"
},

Event IDs

JPY - Adjusted Current Account

Event ID: 392070008

JPY - Adjusted Trade Balance

Event ID: 392040001

CAD - ADP Nonfarm Employment Change

Event ID: 124070001

USD - ADP Nonfarm Employment Change

Event ID: 840190001

JPY - au Jibun Bank Composite PMI

Event ID: 392500003

JPY - au Jibun Bank Manufacturing PMI

Event ID: 392500001

JPY - au Jibun Bank Services PMI

Event ID: 392500002

USD - Average Hourly Earnings m/m

Event ID: 840030018

USD - Average Hourly Earnings y/y

Event ID: 840030019

USD - Baker Hughes US Oil Rig Count

Event ID: 840100001

USD - Baker Hughes US Total Rig Count

Event ID: 840100002

CAD - BoC Interest Rate Decision

Event ID: 124040006

GBP - BoE Interest Rate Decision

Event ID: 826020009

JPY - BoJ Bank Lending y/y

Event ID: 392060013

JPY - BoJ Corporate Goods Price Index m/m

Event ID: 392060014

JPY - BoJ Corporate Goods Price Index y/y

Event ID: 392060015

JPY - BoJ Interest Rate Decision

Event ID: 392060022

JPY - BoJ M2 Money Stock y/y

Event ID: 392060012

JPY - BoJ Monetary Base y/y

Event ID: 392060011

JPY - BoJ Tankan Large Manufacturing Index

Event ID: 392060008

JPY - BoJ Tankan Large Non-Manufacturing Index

Event ID: 392060010

JPY - BoJ Weighted Median Core CPI y/y

Event ID: 392060038

USD - CB Consumer Confidence Index

Event ID: 840180002

GBP - Claimant Count Change

Event ID: 826010004

GBP - Core CPI m/m

Event ID: 826010043

EUR - Core CPI m/m

Event ID: 999030010

CAD - Core CPI m/m

Event ID: 124010005

USD - Core CPI m/m

Event ID: 840030006

EUR - Core CPI y/y

Event ID: 999030012

JPY - Core CPI y/y

Event ID: 392030003

USD - Core CPI y/y

Event ID: 840030008

GBP - Core CPI y/y

Event ID: 826010013

CAD - Core CPI y/y

Event ID: 124010006

USD - Core Durable Goods Orders m/m

Event ID: 840020014

JPY - Core Machinery Orders m/m

Event ID: 392010009

JPY - Core Machinery Orders y/y

Event ID: 392010010

USD - Core PCE Price Index m/m

Event ID: 840010001

USD - Core PPI m/m

Event ID: 840030002

GBP - Core PPI Output m/m

Event ID: 826010009

GBP - Core PPI Output y/y

Event ID: 826010010

USD - Core PPI y/y

Event ID: 840030004

USD - Core Retail Sales m/m

Event ID: 840020011

GBP - Core Retail Sales m/m

Event ID: 826010021

CAD - Core Retail Sales m/m

Event ID: 124010008

CHF - CPI m/m

Event ID: 756020001

EUR - CPI m/m

Event ID: 999030011

CAD - CPI m/m

Event ID: 124010003

GBP - CPI m/m

Event ID: 826010011

USD - CPI m/m

Event ID: 840030005

AUD - CPI q/q

Event ID: 36010014

NZD - CPI q/q

Event ID: 554010005

JPY - CPI s.a. m/m

Event ID: 392030010

CHF - CPI y/y

Event ID: 756020002

GBP - CPI y/y

Event ID: 826010012

AUD - CPI y/y

Event ID: 36010015

NZD - CPI y/y

Event ID: 554010006

CAD - CPI y/y

Event ID: 124010004

JPY - CPI y/y

Event ID: 392030001

EUR - CPI y/y

Event ID: 999030013

USD - CPI y/y

Event ID: 840030007

EUR - Current Account

Event ID: 999010016

CAD - Current Account

Event ID: 124010010

NZD - Current Account

Event ID: 554010027

AUD - Current Account

Event ID: 36010036

GBP - Current Account

Event ID: 826010036

USD - Current Account

Event ID: 840010015

USD - Durable Goods Orders m/m

Event ID: 840020013

EUR - ECB Deposit Facility Rate Decision

Event ID: 999010006

EUR - ECB Interest Rate Decision

Event ID: 999010007

EUR - ECB Marginal Lending Facility Rate Decision

Event ID: 999010015

USD - EIA Crude Oil Stocks Change

Event ID: 840200001

USD - EIA Natural Gas Storage Change

Event ID: 840200009

NZD - Electronic Card Retail Sales m/m

Event ID: 554010001

NZD - Electronic Card Retail Sales y/y

Event ID: 554010002

CAD - Employment Change

Event ID: 124010011

AUD - Employment Change

Event ID: 36010003

EUR - Employment Change q/q

Event ID: 999030001

NZD - Employment Change q/q

Event ID: 554010016

USD - Existing Home Sales

Event ID: 840120001

USD - Export Price Index m/m

Event ID: 840030013

EUR - Export Price Index m/m

Event ID: 276010005

USD - Export Price Index y/y

Event ID: 840030014

EUR - Export Price Index y/y

Event ID: 276010006

USD - Factory Orders m/m

Event ID: 840020003

EUR - Factory Orders m/m

Event ID: 276010018

EUR - Factory Orders y/y

Event ID: 276010019

USD - Fed Interest Rate Decision

Event ID: 840050014

USD - Federal Budget Balance

Event ID: 840150001

CAD - Foreign Securities Purchases

Event ID: 124010019

GBP - GDP 3m/3m

Event ID: 826010040

CAD - GDP m/m

Event ID: 124010021

GBP - GDP m/m

Event ID: 826010039

USD - GDP q/q

Event ID: 840010007

GBP - GDP q/q

Event ID: 826010037

AUD - GDP q/q

Event ID: 36010019

NZD - GDP q/q

Event ID: 554010024

CAD - GDP q/q

Event ID: 124010022

JPY - GDP q/q

Event ID: 392010001

CHF - GDP q/q

Event ID: 756040001

EUR - GDP q/q

Event ID: 999030016

NZD - GDP y/y

Event ID: 554010025

GBP - GDP y/y

Event ID: 826010038

CHF - GDP y/y

Event ID: 756040002

EUR - GDP y/y

Event ID: 999030017

JPY - GDP y/y

Event ID: 392010003

CAD - GDP y/y

Event ID: 124010035

AUD - GDP y/y

Event ID: 36010020

EUR - HICP m/m

Event ID: 380010003

JPY - Household Spending y/y

Event ID: 392030008

EUR - Import Price Index m/m

Event ID: 276010003

USD - Import Price Index m/m

Event ID: 840030011

USD - Import Price Index y/y

Event ID: 840030012

EUR - Import Price Index y/y

Event ID: 276010004

GBP - Industrial Production m/m

Event ID: 826010025

JPY - Industrial Production m/m

Event ID: 392020006

EUR - Industrial Production m/m

Event ID: 999030007

GBP - Industrial Production y/y

Event ID: 826010026

JPY - Industrial Production y/y

Event ID: 392020007

EUR - Industrial Production y/y

Event ID: 999030008

CHF - Industrial Production y/y

Event ID: 756020006

USD - Initial Jobless Claims

Event ID: 840140001

CAD - IPPI m/m

Event ID: 124010024

USD - ISM Manufacturing PMI

Event ID: 840040001

USD - ISM Non-Manufacturing PMI

Event ID: 840040003

CAD - Ivey PMI

Event ID: 124020001

USD - JOLTS Job Openings

Event ID: 840030021

JPY - Labor Cash Earnings y/y

Event ID: 392050001

NZD - Labor Cost Index q/q

Event ID: 554010017

NZD - Labor Cost Index y/y

Event ID: 554010018

GBP - Manufacturing Production m/m

Event ID: 826010027

GBP - Manufacturing Production y/y

Event ID: 826010028

CAD - Manufacturing Sales m/m

Event ID: 124010029

USD - Michigan 5-Year Inflation Expectations

Event ID: 840210005

USD - Michigan Consumer Expectations

Event ID: 840210002

USD - Michigan Consumer Sentiment

Event ID: 840210001

USD - Michigan Inflation Expectations

Event ID: 840210004

USD - New Home Sales

Event ID: 840020008

USD - New Home Sales m/m

Event ID: 840020009

USD - Nonfarm Payrolls

Event ID: 840030016

USD - Pending Home Sales m/m

Event ID: 840120003

USD - Pending Home Sales y/y

Event ID: 840120004

GBP - PPI Input m/m

Event ID: 826010005

NZD - PPI Input q/q

Event ID: 554010022

GBP - PPI Input y/y

Event ID: 826010006

CHF - PPI m/m

Event ID: 756020003

EUR - PPI m/m

Event ID: 999030005

USD - PPI m/m

Event ID: 840030001

GBP - PPI Output m/m

Event ID: 826010007

NZD - PPI Output q/q

Event ID: 554010023

GBP - PPI Output y/y

Event ID: 826010008

AUD - PPI q/q

Event ID: 36010029

CHF - PPI y/y

Event ID: 756020004

EUR - PPI y/y

Event ID: 999030006

AUD - PPI y/y

Event ID: 36010030

USD - PPI y/y

Event ID: 840030003

AUD - RBA Interest Rate Decision

Event ID: 36030008

AUD - RBA Trimmed Mean CPI q/q

Event ID: 36030014

NZD - RBNZ 2-Year Inflation Expectations

Event ID: 554020010

NZD - RBNZ Interest Rate Decision

Event ID: 554020009

JPY - Real Wage y/y

Event ID: 392050004

USD - Retail Control m/m

Event ID: 840020012

EUR - Retail Sales m/m

Event ID: 999030003

JPY - Retail Sales m/m

Event ID: 392020002

CAD - Retail Sales m/m

Event ID: 124010007

AUD - Retail Sales m/m

Event ID: 36010012

GBP - Retail Sales m/m

Event ID: 826010019

USD - Retail Sales m/m

Event ID: 840020010

NZD - Retail Sales q/q

Event ID: 554010019

AUD - Retail Sales q/q

Event ID: 36010038

USD - Retail Sales y/y

Event ID: 840020025

NZD - Retail Sales y/y

Event ID: 554010021

CHF - Retail Sales y/y

Event ID: 756020007

EUR - Retail Sales y/y

Event ID: 999030004

JPY - Retail Sales y/y

Event ID: 392020003

GBP - Retail Sales y/y

Event ID: 826010020

CAD - RMPI m/m

Event ID: 124010026

USD - S&P Global Composite PMI

Event ID: 840500003

AUD - S&P Global Composite PMI

Event ID: 36500003

EUR - S&P Global Composite PMI

Event ID: 999500003

EUR - S&P Global Manufacturing PMI

Event ID: 999500001

CAD - S&P Global Manufacturing PMI

Event ID: 124500001

AUD - S&P Global Manufacturing PMI

Event ID: 36500001

USD - S&P Global Manufacturing PMI

Event ID: 840500001

EUR - S&P Global Services PMI

Event ID: 999500002

AUD - S&P Global Services PMI

Event ID: 36500002

USD - S&P Global Services PMI

Event ID: 840500002

CHF - SNB Interest Rate Decision

Event ID: 756010001

JPY - Tokyo Core CPI y/y

Event ID: 392030006

JPY - Tokyo CPI s.a. m/m

Event ID: 392030011

EUR - Trade Balance

Event ID: 999030018

CHF - Trade Balance

Event ID: 756030003

JPY - Trade Balance

Event ID: 392040002

CAD - Trade Balance

Event ID: 124010018

NZD - Trade Balance

Event ID: 554010009

AUD - Trade Balance

Event ID: 36010011

GBP - Trade Balance

Event ID: 826010029

USD - Trade Balance

Event ID: 840020001

CAD - Unemployment Rate

Event ID: 124010014

USD - Unemployment Rate

Event ID: 840030015

GBP - Unemployment Rate

Event ID: 826010003

AUD - Unemployment Rate

Event ID: 36010006

NZD - Unemployment Rate

Event ID: 554010014

CHF - Unemployment Rate

Event ID: 756040003

EUR - Unemployment Rate

Event ID: 999030020

JPY - Unemployment Rate

Event ID: 392030007

CAD - Wholesale Trade m/m

Event ID: 124010031