Skip to main content

Python Client Library for Benzinga Data

Project description

alt text

Benzinga Python Client

This is the the official documentation for Benzinga's Python Package. This package Is compatible with Python v3.x+. For extensive instructions, visit Benzinga Docs

Getting Started

The installation process varies depending on your python version and system used. The basic installation instructions are as follows:

pip install benzinga

Alternatively, the package can be installed by using:

pip3 install benzinga

Once you have successfully installed the package, you can either import the Financial Data module, for quantitative financial data:

from benzinga import financial_data

or you can import the Benzinga News Data module, if you're looking into financial news:

from benzinga import news_data

Your Key

Api Key To initiate a class, an API key is used, for authentication purposes. Contact us if you don't yet have a key, we will take care of you!

Sample API Key (type: str) : "testkey892834789s9s8abshtuy"

Sample Test Financial Data Module

  1. Initiating the class:
from benzinga import financial_data
api_key = "testkey892834789s9s8abshtuy"
fin = financial_data.Benzinga(api_key)
  1. A sample test run to get ratings on a stock. (Returns a JSON object):
stock_ratings = fin.ratings()
  1. Since fin.ratings() returns a JSON dict, for a better view of the dict, you can call the fin.output() method on the result. Example:
fin.output(stock_ratings)

Sample Test News Data Module

  1. Initiating the class:
from benzinga import news_data
api_key = "testkey892834789s9s8abshtuy"
paper = news_data.News(api_key)
  1. A sample test run to get general news. (Returns a JSON Object)
stories = paper.news()
  1. Since fin.news() returns a JSON dict, for a better view of the dict, you can call the fin.output() method on the result. Example:
paper.output(stories)

It is important to note that for both the Financial Data Module and the News Data Module, there are many optional parameters for the methods. Below is a detailed listing of possible methods for the Financial Data Module and the news Data Module, their method call names, arguments, and what they return.

For more Financial Data and News Data methods, please visit Benzinga Cloud.

Additional Links

Project details


Download files

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

Source Distribution

benzinga-1.13.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

benzinga-1.13-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file benzinga-1.13.tar.gz.

File metadata

  • Download URL: benzinga-1.13.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for benzinga-1.13.tar.gz
Algorithm Hash digest
SHA256 e86b781ccabed59f5236657b025711461def04447d56fa77cd313b8dc6a4e847
MD5 72b25d049eac5d53130d7bc0d7b2e681
BLAKE2b-256 c1a90c93c60b21d5b47ea4e9d48204d47fbcbb9c1f1decd944d142f711e3cf42

See more details on using hashes here.

File details

Details for the file benzinga-1.13-py3-none-any.whl.

File metadata

  • Download URL: benzinga-1.13-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for benzinga-1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 0c83968607030babb6b5347e5e7b6a1d511d459ee3e37bd12eeaa8020606f464
MD5 04efe865278a9253bb6a0060620a336e
BLAKE2b-256 0b7a4838c63871692641f3f564adaa40217ceac302318c91d540dcf76b768063

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 Pingdom Monitoring Sentry Error logging StatusPage Status page