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