Skip to main content

PyStoxx:

accessibility text

PyStoxx is a Python library of Stoxx by Recursiv that allows users to retrieve current data and historical information for publicly traded companies with our JSON API.

Features Include:

  • Current & Historical Company Sentiment
  • Company News Articles
  • Pricing History
  • Price Quotes
  • Company Data
  • Company Competition

Quick Start Guide

  1. Install Stoxx using Pip

     pip install pystoxx
    
  2. Import Stoxx

     from pystoxx import Stoxx
    
  3. Add your API Token using the RapidAPI extension. Sign up for a free plan without a credit card by visiting Stoxx By Recursiv hosted at RapidAPI.

     stoxx = Stoxx()
     stoxx.RapidAPI("add-your-token-here")
    
  4. Query your data of interest:

     ​stoxx.get_historical_prices(ticker="msft", months=2)
    

Query Current and Historical Stock Ticker Data:

Historical Pricing Data:

Input:

    # Get historical daily pricing data
    stoxx.get_historical_prices(ticker="msft", months=2)

Output:

    {
    "changePercent": 0,
    "close": 198.76,
    "date": "2020-03-19",
    "high": 208.75,
    "low": 195.27,
    "open": 201,
    "symbol": "MSFT",
    "updated": 1613017108000,
    "volume": 4796717
    }

Historical News & Sentiment Data:

Input:

    # Get historical news & sentiment data
    stoxx.get_historical_news(ticker="msft", months=2)

Output:

    {
    "FeedUrl": "url-to-article",
    "Polarity": 0.08882323,
    "PublishDate": "2021-02-17T20:04:00+00:00",
    "Subjectivity": 0.2944154,
    "Title": "News Corp. and Google Settle Long Pay Fight With Global News Pact",
    "VaderAggregate": 0.9933,
    "VaderNegative": 0.045,
    "VaderNeutral": 0.827,
    "VaderPositive": 0.127,
    "id": "4cb8b419-2ec1-32d0-849a-2ac524475c23"
    },

Company Data and Information:

Input:

    # Get company information
    stoxx.get_company_data("msft")

Output:

    {
            "companyName": "Microsoft Corporation",
            "country": "US",
            "industry": "Data Processing, Hosting, and Related Services",
            "sector": "Information",
            "symbol": "MSFT",
            "tags": [
            "Technology Services",
            "Packaged Software",
            "Information",
            ],
            "website": "https://www.microsoft.com/en-us",
            "zip": "98052-6399"
    }

Stock Ticker Price Quote:

Input:

    # Get a price quote
    stoxx.get_price_quote("msft")

Output:

    {
            "close": 230.72,
            "exchange": "NASDAQ/NGS (GLOBAL SELECT MARKET)",
            "high": 234.19,
            "high52w": 245.56,
            "lastTime": "March 18, 2021",
            "lastUpdate": 1616097600583,
            "low": 230.33,
            "low52w": 131.19,
            "marketCap": 1740140021762,
            "name": "Microsoft Corporation",
            "pe": 34.38,
            "symbol": "MSFT",
            "volume": 34852251
    }

List of Publicly Traded Company Tickers:

Input:

    # Get a list of all publicly traded companies
    stoxx.get_public_companies()

Output:

    [
            { "symbol" : "msft" },
            { "symbol" : "amzn" },
            { "symbol" : "amgn" },
            ...
    ]

Find Company Competition:

Input:

    # Get company competition
    stoxx.get_company_competition("msft")

Output:

    {
    "company": "msft",
    "competition": [
            "ORCL",
            "IBM",
            "GOOGL",
            "AAPL",
            ...
    ]
    }

Get Current Market Performance by Sector:

Input:

    # Get market performance
    stoxx.get_market_performance()

Output:

    [
            {
            "datetimeUpdated": 1616097600045,
            "performance": -0.00209,
            "sector": "Health Care"
            },
            ...
    ]

Calculate Sentiment of Stock Market Text:

Input:

    # Calculate Sentiment
    stoxx.calculate_sentiment({"content" : "This is an amazing pypi library!"})

Output:

    {
            "VaderPositive": 0.45,
            "VaderNeutral": 0.55,
            "VaderNegative": 0.0,
            "VaderAggregate": 0.6239,
            "Subjectivity": 0.9,
            "Polarity": 0.750
    }

Disclosures & Disclaimers:

Investing involves substantial risk. Recursiv LLC, the author, nor any of their respective affiliates make any guarantee or other promises as to any result that may be obtained from using the information provided through the Stoxx service or the pyStoxx library. While past performance may be analyzed using the Stoxx service, past performance should not be considered indicative of future performance. Investment decisions should not be made without first consulting a personal financial advisor and careful study of the issuer's prospectus and other public filings. To the maximum extent permitted by law Recursiv LLC, the author, and their respective affiliates, disclaim any and all liability in the event any information, commentary, analysis, opinions, advice and/or recommendations provided by the service prove to be inaccurate, incomplete or unreliable, or result in any investment or other losses. Any and all data provided by the service should be considered commentary and opinion and are subject to change at any time. The information provided in the service is obtained from sources which Recursiv LLC believes to be reliable. However, Recursiv LLC nor the author have not independently verified or otherwise investigated all such information. Neither Recursiv LLC, the author, nor any of their respective affiliates guarantees the accuracy or completeness of any such information. Recursiv LLC, the author, nor any of their respective affiliates are responsible for any errors or omissions in any of the information provided.

Metadata

Release files for pystoxx 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pystoxx 0.1.2
File Size Uploaded Provenance
pystoxx-0.1.2.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pystoxx 0.1.2
File Interpreter ABI Platform
pystoxx-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / pystoxx-0.1.2.tar.gz

Download URL pystoxx-0.1.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0bc454bc98822d5d6f94fc91146a3f1aadd3cd8fd2d153dd11d3f2616639c5f6
BLAKE2b-256 checksum
How to use checksums
34a0fb7fbaa988035c27c2bc12922fae8b4afab3bb4c4736db8d7168daf1164e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / pystoxx-0.1.2-py3-none-any.whl

Download URL pystoxx-0.1.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5adb6cbe3444d8048f632aceb00c9a9da572329cddb7502f85d0f980a4ed760
BLAKE2b-256 checksum
How to use checksums
8801bf2f4ca05e0a70cec1838acd967da64156eae93306683a8e2fa84e9dda40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for pystoxx 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page