cnbc

A Python package that wraps CNBC API endpoints and returns financial data in JSON.

https://github.com/ag3ntz3r0/cnbc

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.6%) to scientific vocabulary

Keywords

cnbc cnbc-api finance python stock stock-market
Last synced: 4 months ago · JSON representation ·

Repository

A Python package that wraps CNBC API endpoints and returns financial data in JSON.

Basic Info
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
cnbc cnbc-api finance python stock stock-market
Created almost 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License Code of conduct Citation Security

README.md

CNBC

A Python package that wraps CNBC API endpoints and returns financial data in JSON. The API queries business news and live market data to streamline the development of financial applications.

IMPORTANT LEGAL DISCLAIMER


cnbc is not affiliated, endorsed, or vetted by CNBC, Inc. It is an open-source tool that uses a publicly available API and is intended for research and educational purposes.

Installation

shell pip install cnbc

Subscribe to CNBC API

Utilization

APIWrapper

The APIWrapper class is used to make requests to the CNBC API.
Note: A majority of the CNBC API endpoints require parameters. These must be set by an additional instruction.

```python from cnbc import APIWrapper, Endpoints

apiwrapper = APIWrapper( apikey='YOURAPIKEY', endpoint=Endpoints.TRANSLATE )

The APIWrapper class will supply the required parameters for the configured CNBC API endpoint.

apiwrapperparams = apiwrapper.params apiwrapper_params['symbol'] = 'AAPL'

The APIWrapper class will make a request to the CNBC API and return the response in JSON.

jsonresponse = apiwrapper.request()

The APIWrapper class can be repurposed to make multiple requests to the CNBC API.

apiwrapper.endpoint = Endpoints.GETSUMMARY apiwrapperparams = apiwrapper.params apiwrapperparams['issueIds'] = jsonresponse['issueId'] jsonresponse = apiwrapper.request() ```

Translate Endpoint

A majority of the CNBC API endpoints require an issueId or issueIds parameter. The translate endpoint is used to convert a symbol to an issueId.
Note: The APIWrapper class contains a translation table which can be loaded and saved to a file to reduce the number of requests to the CNBC API.

Owner

  • Name: Brandon J. Lacy
  • Login: AG3NTZ3R0
  • Kind: user

b i g d a t a - p y t h o n - f i n a n c e

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lacy"
  given-names: "Brandon"
title: "cnbc"
version: 0.0.2
date-released: 2022-03-11
url: "https://github.com/AG3NTZ3R0/cnbc"

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 28
  • Total Committers: 1
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
AG3NTZ3R0 Z****0@d****m 28
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 1
  • Total pull requests: 15
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: about 6 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.2
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • lwinkler (1)
Pull Request Authors
  • AG3NTZ3R0 (27)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 25 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
pypi.org: cnbc

A Python package that wraps CNBC API endpoints and returns financial data in JSON.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 25 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Average: 24.8%
Stargazers count: 27.8%
Forks count: 29.8%
Downloads: 34.7%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/pylint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/unittest.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
pyproject.toml pypi
requirements.txt pypi
  • pylint ==3.0.3
  • requests ==2.31.0