Skip to main content

Insighta Cloud SDK - API client and data models

Project description

insighta-sdk

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.1.5.tar.gz (18.8 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.1.5-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: insighta_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for insighta_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6ff4112b93e3973a636d7db2a7df45c4fe31bc1d5901d9e536f5f58fca57857e
MD5 5a2ea466aa49652b706006f5771d43cb
BLAKE2b-256 51f3f778f6ac6ae682ae67925487c75c0b6c5dc61046736501aa12833d116fdb

See more details on using hashes here.

File details

Details for the file insighta_sdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: insighta_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for insighta_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bc86aa2f8c19bd644394b66fc5f11962a491f01cd15348263829756683f45692
MD5 3849cff7fe3b37cebded679d5f90fdbe
BLAKE2b-256 e07877b880d1640a3fdf2492f5dec23792c21e20c88ab460b507de6c62a5fd1f

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