Interpose

SDKs & Tools

SDKs & Postman

Official client libraries for TypeScript and Python, plus Postman collections for every pillar. All SDKs are generated from the same OpenAPI 3.1 specs that power the interactive API reference.

TypeScript / Node.js SDK

Works in Node.js 18+ and modern browsers. Fully typed — every request and response shape is inferred from the OpenAPI spec. Monetary values are returned as strings to preserve decimal precision.

One package per pillar — install only what you need. There is no unified @interpose/sdk meta-package; each client is scoped to its pillar's API surface.

Install

bash
npm install @interpose/baas-sdk
npm install @interpose/pm-sdk
npm install @interpose/post-trade-sdk
npm install @interpose/agents-sdk

Initialize a client

typescript
import { BaasClient } from '@interpose/baas-sdk';
import { PmClient } from '@interpose/pm-sdk';
import { PostTradeClient } from '@interpose/post-trade-sdk';

const baas = new BaasClient({
  baseUrl: 'https://sandbox-api.interposehq.com',
  apiKey:  process.env.INTERPOSE_API_KEY!,
});
const pm = new PmClient({
  baseUrl: 'https://sandbox-api.interposehq.com',
  apiKey:  process.env.INTERPOSE_API_KEY!,
});
const postTrade = new PostTradeClient({
  baseUrl: 'https://sandbox-api.interposehq.com',
  apiKey:  process.env.INTERPOSE_API_KEY!,
});

BaaS — accounts & orders

typescript
// Open an account
const account = await baas.accounts.create({
  user_id: 'usr_01HV4Y2K3M5N8P9QR2ST4UVWXY',
  type:    'INDIVIDUAL',
});
// account.account_id → "acct_01HV4Y2K3M5N8P9QR2ST4UVWXY"

// Place a market order
const order = await baas.orders.create({
  account_id: account.account_id,
  side:       'BUY',
  order_type: 'MARKET',
  quantity:   '10.00000000',
  security:   { type: 'ticker', value: 'AAPL' },
});

// Read current positions
const { items } = await baas.positions.list({ account_id: account.account_id });

Portfolio Management — rebalancing

typescript
// List portfolios
const { items } = await pm.portfolios.list({ page: 1, page_size: 25 });

// Trigger a rebalance
const run = await pm.rebalancing.trigger('ptf_01HV4Y2K3M5N8P9QR2ST4UVWXY', {
  trigger: 'MANUAL',
});

// Approve the generated order set
const approved = await pm.rebalancing.approveRun(run.run_id);

Post-Trade — settlement

typescript
// List recent transactions for an account
const { items } = await postTrade.transactions.list({
  account_id: 'acct_01HV4Y2K3M5N8P9QR2ST4UVWXY',
});

// Get a single transaction's settlement status
const txn = await postTrade.transactions.get(items[0].transaction_id);
console.log(txn.status); // "PENDING" | "SETTLING" | "SETTLED" | "FAILED"

TPA and Trust don't have dedicated client packages yet — call their REST APIs directly using the OpenAPI specs linked above. @interpose/agents-sdk (AgentsClient) is also available for the AI back-office agents API.

Error handling

typescript
import { ApiError } from '@interpose/baas-sdk';

try {
  await baas.orders.create({ ... });
} catch (err) {
  if (err instanceof ApiError) {
    console.error(err.status, err.statusText, err.body);
  }
}

Python SDK

Requires Python 3.10+. Uses httpx under the hood (sync client). One installable package, three per-pillar clients — mirrors the TypeScript SDK's shape. Every response is a dict-with-attribute-access object; monetary and quantity fields stay exactly the strings the API returns (e.g. "10.00000000") — never coerced to float. Parse with decimal.Decimal when you need to compute.

Install

bash
pip install interpose-sdk

Initialize a client

Three auth modes, matched to what each pillar's API actually accepts server-side: a pre-obtained bearer token, an API key exchanged for a bearer token automatically (OAuth 2.0 client_credentials — BaaS and PM), or raw HMAC-SHA256 request signing with no token round-trip (PM only today).

python
from interpose_sdk import BaasClient, PmClient, PostTradeClient

# API key → auto-refreshing bearer token (BaaS, PM)
baas = BaasClient(
    base_url="https://sandbox-api.interposehq.com",
    api_key_id="ik_live_...",
    api_key_secret="...",
)

# Raw HMAC signing, zero token round-trips (PM only)
pm = PmClient(
    base_url="https://sandbox-api.interposehq.com",
    hmac_key_id="ik_live_...",
    hmac_key_secret="...",
)

# Post-trade has no self-service key/oauth router yet — bring your own bearer token
post_trade = PostTradeClient(base_url="https://sandbox-api.interposehq.com", access_token=my_jwt)

BaaS — accounts & orders

python
# Open an account
account = baas.accounts.create(user_id="usr_01HV4Y2K3M5N8P9QR2ST4UVWXY", type="INDIVIDUAL", currency="USD")

# Place a market order — quantities and prices are always strings, never float
order = baas.orders.create(
    account_id=account.account_id,
    side="BUY",
    type="MARKET",
    symbol="AAPL",
    quantity="10.00000000",
)
print(order.order_id)   # "ord_01HV4Y2K3M5N8P9QR2ST4UVWXY"
print(order.status)     # "PENDING"

# List with automatic pagination
for acct in baas.accounts.iter_all(page_size=100):
    print(acct.account_id, acct.status)

PM — portfolios & the certification harness

pm.certification wraps the parallel-run accuracy harness: reconcile Interpose's own computed performance against an incumbent's figures, and pull the daily AUM-weighted attribution-error report a development-partnership fee gate is measured against.

python
portfolio = pm.portfolios.create(name="Core Growth", currency="USD")
perf = pm.portfolios.performance(portfolio.portfolio_id, period="1M")

run = pm.certification.create_run(
    portfolio_id=portfolio.portfolio_id,
    as_of_date="2026-07-31",
    reference_source="ORION",
    reference_twr=orion_twr,
    reference_ending_value=orion_ending_value,
)
print(run.status)   # "PASSED" | "FAILED"

report = pm.certification.daily_report("2026-07-31")
print(report.aum_weighted_value_error_bps, report.within_threshold)

Error handling

python
from interpose_sdk import ApiError, RateLimitedError
import time

try:
    baas.orders.create(account_id=account.account_id, side="BUY", type="MARKET", symbol="AAPL", quantity="10.00000000")
except RateLimitedError:
    pass   # 429s are retried automatically (default max_retries=3) before this would raise
except ApiError as e:
    print(e.status_code, e.body)   # e.g. 422, {"detail": "..."}

Postman Collections

Each pillar ships a pre-built Postman collection with every endpoint, example request bodies, and environment variables for baseUrl, apiKey, and common entity IDs. Import a collection into Postman, set the environment variables, and you can exercise the full API in minutes.

Environment setup

After importing a collection, create a Postman environment with these variables:

json
{
  "baseUrl":        "https://api.interposehq.com",
  "apiKey":         "your-api-key-here",
  "accountId":      "acct_01HV4Y2K3M5N8P9QR2ST4UVWXY",
  "portfolioId":    "ptf_01HV4Y2K3M5N8P9QR2ST4UVWXY",
  "planId":         "plan_01HV4Y2K3M5N8P9QR2ST4UVWXY"
}

Each collection's pre-request scripts automatically compute the HMAC-SHA256 signature if you set an hmacSecret environment variable — no manual signing required.

Next steps