Back to agents docs
SDK packages

Typed clients for agents

Installable TypeScript and Python clients for Orrery's x402 API. They wrap payment challenges, response envelopes, cross-venue endpoints, watchlist summaries, and the Decision API without adding trading or account execution.

published packages

@orrery-labs/client

TypeScript

Install from registry

npm install @orrery-labs/client

Agent call

import { OrreryClient, OrreryPaymentRequired } from "@orrery-labs/client";

const orrery = new OrreryClient({
  apiKey: process.env.ORRERY_API_KEY,
  payment: process.env.ORRERY_X_PAYMENT,
});

try {
  const queue = await orrery.attention({ limit: 5 });
  console.log(queue.data);
} catch (err) {
  if (err instanceof OrreryPaymentRequired) {
    console.log(err.challenge);
  }
}

Source: /sdk/typescript

orrery-client

Python

Install from registry

pip install orrery-client

Agent call

from orrery import OrreryClient, OrreryPaymentRequired

import os

client = OrreryClient(api_key=os.environ.get("ORRERY_API_KEY"))

try:
    queue = client.attention(limit=5)
    print(queue["data"])
except OrreryPaymentRequired as exc:
    print(exc.challenge)

Source: /sdk/python

What the SDKs cover

read-only
x402 health and payment challenge handling
Orrery API keys for monthly credit packs
Decision API: attention queue and market deep dive
Polymarket/Kalshi normalized market list
Cross-venue divergence feed
Market snapshot, why, and resolution risk
Signals, events, trades, wallets, categories, backtests
Watchlist summary and portfolio risk POST endpoints
Environment defaults: ORRERY_BASE_URL, ORRERY_API_KEY, ORRERY_X_PAYMENT

The clients call Orrery only. They do not connect to Kalshi or Polymarket user accounts, submit orders, read positions, or provide trade recommendations.

Local verification

source checks
# TypeScript
cd sdk/typescript
npm install
npm run check
npm run build

# Python
cd sdk/python
python -m pip install -e .
python -m unittest discover -s tests

Single-file demos

For no-install demos, Orrery still serves dependency-light files from the public site.

Release gate

0.1.0 published

The public packages are live as @orrery-labs/client on npm and orrery-client on PyPI. Future releases still require an intentional version bump, local verification, and registry publish.

Orrery SDK packages — TypeScript and Python | Orrery