Skip to main content

Insighta Cloud SDK - API client and data models

Project description

insighta-sdk

CI PyPI Python License

Insighta Cloud SDK — API client and data models for portfolio management.

Installation

pip install insighta-sdk

Authentication

You can obtain an API key from the Developer tab at insight.cloud/settings.

Save the key in a credentials.yaml file:

api_key: "your-api-key-here"
endpoint: "https://openapi.insighta.cloud"

Load it in your code:

from insighta_sdk import Credentials

creds = Credentials.from_file("credentials.yaml")

Quick Start

from insighta_sdk import Credentials, InsightaClient

creds = Credentials.from_file("credentials.yaml")
client = InsightaClient(creds)

# List portfolios
portfolios = client.get_portfolios()

# Create a portfolio
from insighta_sdk import UploadConfig
config = UploadConfig.from_file("upload.yaml")
portfolio_id = client.create_portfolio(config)

Features

  • API Client — Full coverage of Insighta OpenAPI (portfolios, orders, metrics)
  • Data ModelsTrade, Holding, Deposit, OrderGroup, CashDeposit, RateEntry
  • Utilities — Rate lookup, order grouping, deposit merging
  • Workspace ManagementDirs class for consistent file path resolution

Use Cases

  • AI Agent-driven portfolio automation — Integrate with LLM agents (e.g., LangChain, CrewAI) to build autonomous rebalancing, signal-based trading, or research-to-execution pipelines using the SDK as the execution layer.
  • Backtesting dashboards — Pull NAV/metrics history and visualize portfolio performance programmatically.
  • Multi-portfolio management — Automate creation, monitoring, and teardown of simulation portfolios at scale.

API Reference

Client

Method Description
create_portfolio(config) Create a new portfolio
get_portfolios() List own portfolios
search_portfolios(...) Search public portfolios
delete_portfolio(id) Delete a portfolio
send_order(portfolio_id, group, currency) Submit an order group
get_nav_history(id) Get NAV history
get_metrics_history(id, ...) Get metrics (TWR, etc.)

Utilities

Function Description
load_order_groups(path) Parse order.csv into OrderGroup list
load_cash_deposits(path) Parse cash_deposits.csv
merge_and_sort_groups(orders, deposits, memos) Merge and sequence order groups
load_rate_file(path) Load exchange rate CSV
lookup_rate(entries, dt, cur, base) Find applicable rate for a trade
fetch_ticker_info(tickers) Query ticker metadata from API

API Endpoint

Base URL: https://openapi.insighta.cloud

OpenAPI spec: insighta-app/openapi-docs/

Development

pip install -e .
pytest

See CONTRIBUTING.md for guidelines.

License

CC-BY-NC-4.0 — See LICENSE

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

insighta_sdk-0.2.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

insighta_sdk-0.2.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file insighta_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: insighta_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for insighta_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bc9453e6b6654c5e5af3099efaee2e6049ad065e17b998f3f1694836ba3b7bc8
MD5 ea77415e4e2635f25c8cbdabc904681b
BLAKE2b-256 926899344f045b80b4eb80b4bc37e964bb5dc9756ca9aa63699101b3517eb9ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for insighta_sdk-0.2.0.tar.gz:

Publisher: publish.yml on insighta-cloud/insighta-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 insighta_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: insighta_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for insighta_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05388b0bdd658efc49827377dd33986459aa81f85e4a36a0a33ad59c8ee5cc1b
MD5 b3f504a81a7ceb3fa82c725eb7146e05
BLAKE2b-256 dd99394e62c8b2deafbb0b5496d279ba2d9ef633c66e6f2b3c5f39f010f15a42

See more details on using hashes here.

Provenance

The following attestation bundles were made for insighta_sdk-0.2.0-py3-none-any.whl:

Publisher: publish.yml on insighta-cloud/insighta-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