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.4.tar.gz (16.1 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.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: insighta_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 16.1 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.4.tar.gz
Algorithm Hash digest
SHA256 de64c4609aa6cc4934e53726e8547bf18c0f6f1a09ba0da6961be31603d32f5f
MD5 3bc27d2b2b9d42dfad75e31a49299d0f
BLAKE2b-256 eb8dd7639d0593a481109db507d4c1e6dab667bc3435828f538f5290523f34f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: insighta_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d47a9e1f4d31b8c3691ef695757dd61fbe8ad4825be2d3389b1a04414188e7a
MD5 c528e8b878fade14bc8a5a22153ec1a6
BLAKE2b-256 5562ee9fb597d2b3eed661806c71d5d49accb8fffcdb5d5cd1265782f8e7615f

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