Skip to main content

A Python SDK for the Kaleidoscope API

Project description

Kaleidoscope SDK

Welcome to the Kaleidoscope SDK! This Python package provides a simple and intuitive way to interact with the Kaleidoscope API, allowing you to access SEC filings, insider transactions, stock data, corporate actions, and more.

Features

  • 📄 Retrieve SEC filings (10-K, 8-K, Form-D, Form-C, etc.)
  • 📊 Get real-time and historical stock data
  • 💼 Access executive and director compensation data
  • 🔎 Fetch insider transactions
  • 🏢 Retrieve corporate actions (mergers, acquisitions, IPOs, etc.)
  • 🇨🇦 Query SEDAR filings for Canadian companies
  • 📰 Access press releases by ticker symbol

Installation

Install the SDK via pip:

pip install kaleidoscope-sdk

Or install from source:

git clone https://github.com/kaleidoscope-cloud/kaleidoscope-sdk.git
cd kaleidoscope-sdk
pip install .

Getting Started

To start using the Kaleidoscope API, sign up for an API key at Kaleidoscope API Landing Page.

Import and Initialize the SDK

from kaleidoscope_sdk import KaleidoscopeAPI

# Initialize with your API key
api = KaleidoscopeAPI(api_key="your_api_key_here")

Retrieve SEC Filings

# Get SEC filings for Apple Inc. (AAPL)
sec_filings = api.search_sec_filings(identifier="AAPL", content="sec", limit=5)
print(sec_filings)

Fetch Real-Time Stock Data

Stock data is tied to a users account and must be requested from support

# Get real-time stock data
real_time_stock = api.get_stock_real_time()
print(real_time_stock)

Retrieve Insider Transactions

# Get insider transactions for Apple Inc.
insider_trades = api.get_insider_transactions(identifier="AAPL", limit=3)
print(insider_trades)

Retrieve Corporate Actions

# Get corporate actions for Tesla (TSLA)
corporate_actions = api.get_corporate_actions(identifier="TSLA", limit=2)
print(corporate_actions)

Error Handling

The SDK handles common API errors and provides informative error messages:

try:
    data = api.get_stock_real_time()
    print(data)
except Exception as e:
    print(f"Error: {e}")

API Reference

SEC Filings

api.search_sec_filings(identifier="AAPL", content="sec", limit=5)
  • identifier: Ticker (e.g., AAPL) or CIK.
  • content: Filter filings (sec, exhibits, agreements).
  • limit: Number of results to return.

Stock Data

api.get_stock_real_time()
api.get_stock_historical(sd="2023-01-01", ed="2023-12-31", limit=10)

Insider Transactions

api.get_insider_transactions(identifier="AAPL", limit=3)

Compensation Data

api.get_compensation_summary(identifier="1214156", year=2022)
api.get_compensation_director(identifier="1214156", year=2022)

Corporate Actions

api.get_corporate_actions(identifier="TSLA", limit=2)

SEDAR Filings (Canada)

api.get_sedar_filings(identifier="00029882", limit=1)

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new branch (feature-new-feature).
  3. Commit your changes.
  4. Push to your branch and create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For support or questions, open an issue or contact us at support@kscope.io.

🌟 Star This Repo!

If you find this SDK useful, consider starring ⭐ the repository to help others find it! Disclaimer

Disclaimer

The data provided by this API is strictly for internal use only and is not intended for external distribution, publication, or unauthorized use. It also cannot be used for AI training, machine learning models, or any related purposes. However, this restriction does not apply to the Enterprise Package, which may be used externally as permitted by its terms. Unauthorized access, sharing, or disclosure of restricted data is strictly prohibited.

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

kaleidoscope_sdk-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

kaleidoscope_sdk-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kaleidoscope_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kaleidoscope_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 34aa1e3290e251a36eb362a0c5a09f0d06599b44e14861d531293339398678f4
MD5 b02ec74339295d1fd352e5e0448d873a
BLAKE2b-256 8420d8b713f3ee114dd2ebdbbc758976bbce9c67ab57d8ac1c3d7e2417e2e850

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidoscope_sdk-0.1.0.tar.gz:

Publisher: python-publish.yml on kaleidoscope-cloud/kaleidoscope-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for kaleidoscope_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8ff4226256547f0f1382472fe603c85c7b1c876e9df3f122f678a9cae6c737
MD5 7158b554c6de3096705e789c58b05a42
BLAKE2b-256 b68e985b2c3a9ff29b181114985b8ae0d834783fc2ec891cea4cda75207b05a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaleidoscope_sdk-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on kaleidoscope-cloud/kaleidoscope-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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