Skip to main content

Official Python SDK for the SentiSense market intelligence API

Project description

SentiSense Python SDK

PyPI version Python versions License: MIT

Official Python SDK for the SentiSense market intelligence API.

Installation

pip install sentisense

Quick Start

from sentisense import SentiSenseClient

client = SentiSenseClient("your-api-key")

# Get a stock price
price = client.get_stock_price("AAPL")
print(price)

# Get multiple stock prices
prices = client.get_stock_prices(["AAPL", "MSFT", "GOOGL"])

# Check market status
status = client.get_market_status()
print(status)

Authentication

All API requests require an API key. You can generate one from your Developer Console.

client = SentiSenseClient("your-api-key")

For full endpoint documentation, request/response schemas, and interactive examples, see the API Documentation.

API Reference

Stocks

Method Description
get_stock_price(ticker) Real-time price for a single stock
get_stock_prices(tickers) Real-time prices for multiple stocks
get_stock_profile(ticker) Company profile
get_stock_chart(ticker, timeframe="1M") OHLCV chart data
get_all_stocks() List of available tickers
get_all_stocks_detailed() Tickers with company names and entity IDs
get_market_status() Market open/closed status
get_fundamentals(ticker, timeframe="quarterly") Financial fundamentals

Institutional Flows (13F)

Method Description
get_institutional_quarters() Available 13F reporting quarters
get_institutional_flows(report_date, limit=50) Fund flows for a quarter
get_stock_holders(ticker, report_date) Institutional holders for a stock
get_activist_positions(report_date) Activist investor positions

Error Handling

The SDK raises typed exceptions for API errors:

from sentisense import SentiSenseClient, AuthenticationError, RateLimitError

client = SentiSenseClient("your-api-key")

try:
    price = client.get_stock_price("AAPL")
except AuthenticationError:
    print("Invalid or missing API key")
except RateLimitError:
    print("Rate limit exceeded, try again later")
Exception HTTP Status Description
AuthenticationError 401, 403 Invalid or missing API key
NotFoundError 404 Resource not found
RateLimitError 429 Rate limit exceeded
APIError Other 4xx/5xx General API error

All exceptions inherit from SentiSenseError and include .status_code, .message, and .response attributes.

License

MIT - see LICENSE for details.

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

sentisense-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

sentisense-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file sentisense-0.1.0.tar.gz.

File metadata

  • Download URL: sentisense-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.8

File hashes

Hashes for sentisense-0.1.0.tar.gz
Algorithm Hash digest
SHA256 49fcaea3d494965da22b6a72a5ffef6fe0fbd1e4770b0b7843a001e2232eba3d
MD5 90d53d267ec33cb00ee0af05974f5202
BLAKE2b-256 a4d169e484f344a10ef619c1a3a436295b423aff42f0e6636753b232e7c28276

See more details on using hashes here.

File details

Details for the file sentisense-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sentisense-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.8

File hashes

Hashes for sentisense-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b2a54bce91c056789f8d947bdd7069187bb4c53f4dc95a648ccace0f62fbd3c
MD5 2e4bb602664ccea8a27915ebe3505c31
BLAKE2b-256 8e26e7189ddec10e9df07d10d150d77e2518780b914f37a991ed1cc84c58426b

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