Skip to main content

JB-News

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.

Features

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

Installation

pip install jb-news

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

Usage

After installation, import the class:

from jb_news.news import CJBNews 

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

jb = CJBNews()

A list of Event IDs are found on https://www.jblanked.com/news/api/docs/.

Next, set your API key and Event ID:

api_key = "YOUR_API_KEY_HERE" 
event_id = 756020001 # CHF CPI

Next step is to connect to the API by using the start method. You only need to do this once:

if jb.start(api_key):  

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

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

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

Download files

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

Source Distribution

jb_news-1.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jb_news-1.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file jb_news-1.2.0.tar.gz.

File metadata

  • Download URL: jb_news-1.2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for jb_news-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ce78a8a9d09a64a2a20c7f169bb52c35b0e78ff0d7a4f8d29ebb91baa125b91d
MD5 8a24f9811e25c4bd79f744bdf4f4cbf4
BLAKE2b-256 dabe88572e0b91be64f0eef691acc4f4fd7e5dbd799b1cddf7b09faaeeed1379

See more details on using hashes here.

File details

Details for the file jb_news-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: jb_news-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for jb_news-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2893c59c356d91fd5cf7c7be4c9ce39a26881f96073a3a75353c82fb2c2524e
MD5 706fd9c71d25a3ffbae65f20ebdbf296
BLAKE2b-256 b8b0c6316eb7f4de78a09939e80b9de44b1be577a3ae847ed8b7d4ab5e36a64d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page