Skip to main content

A comprehensive wrapper for JBlanked's News API, leveraging OpenAI, Machine Learning, and MQL5's Calendar.

Project description


This library is a comprehensive wrapper for JBlanked's News API. It leverages the power of OpenAI, Machine Learning, and MQL5's Calendar to provide developers with easy access to news data across all computer languages, including MQL4 and Python. Full documentation:


  • Easy access to JBlanked's News API
  • Access to News Event History, Machine Learning Predictions, Smart Analysis, and more.
  • Access to News Calendar
  • Supports multiple programming languages including MQL4 and Python

Python Installation

pip install jb-news

This API is freely accessible through our library and through GET requests. Get your API key from: Note that the free tier has a rate limit of once every 5 minutes, but VIP members enjoy unrestricted access.

Python Usage

After installation, import the class:

from import CJBNews 

Then set a variable as an instance of the CJBNews class:

jb = CJBNews()

A list of Event IDs are found on

Next, set your API key and Event ID:

api_key = "YOUR_API_KEY_HERE" 

event_id = 756020001 # CHF CPI

jb.offset = 7  # GMT-3 = 0, GMT = 3, EST = 7, PST = 10

Next step is to connect to the API by using the get method.

if jb.get(api_key):  

Lastly, load the event info of the specified Event ID:

    if jb.load(event_id):  
        name = 
        currency = 
        event_id = 
        history = 
        category =
        machine_learning =
        smart_analysis =

        # print the news info
        print(f"Event Name: {name}\nEvent ID: {event_id}\nCurrency: {currency}")

Alternatively, instead of using the get method, you can load the calendar:

if jb.calendar(api_key,today=True):
    for event in jb.calendar_info:
        name =
        currency = event.currency 
        event_id = event.eventID 
        category = event.category 
        date = 
        actual = event.actual
        forecast = event.forecast 
        previous = event.previous 
        outcome = event.outcome 
        strength = event.strength 
        quality = event.quality 
        projection = event.projection 

        # print the calendar info
        print(f"Event Name: {name}\nEvent ID: {event_id}\nCurrency: {currency}\nDate: {date}\nActual: {actual}\nForecast: {forecast}\nPrevious: {previous}")

You can also access our NewsGPT model:

gpt_response = jb.GPT(api_key,"What does bullish mean in forex?")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

jb_news-2.2.3-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page