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.1.4.tar.gz (2.9 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.1.4-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jb_news-1.1.4.tar.gz
  • Upload date:
  • Size: 2.9 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.1.4.tar.gz
Algorithm Hash digest
SHA256 f96eb214b299eb66379e0ed25701d3bad3090ed9f80f48a8de3ac838e2bd3e73
MD5 b02a58075ea6e0c95a2beeb103cfdd96
BLAKE2b-256 12178f2518074637d0894e62b74d0f85e82faeb9ce3bded242936d50c213ba39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jb_news-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5b0b50a2ff95d44ea86a85e93296e089bf7b9db1ec4eb56fc2b044d143ae6639
MD5 9b7beb6f2b156d516255123134476d15
BLAKE2b-256 90e5d3670630c98a017f245d07b7fd941bd44d5af9046d0aa3c0093778ec0b4c

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