Developers · PRISM Engine v2

The API reference.

PRISM is optimization infrastructure for institutional finance — a GPU-native, tax-aware optimization stack exposed as a clean REST API. Bring holdings, lots, prices, and targets; get optimized trades with a deterministic, replayable record.

01 · Overview

One routed optimization core, behind a REST API.

PRISM serves wealth platforms, RIAs, index providers, and institutional asset managers. The same engine powers every tier; tiers differ only by hardware allocation. Deploy via the hosted REST API, a dedicated VPC, or on-prem.

CapabilityDescriptionPerformance
Portfolio rebalancingOptimize weights to a target allocation< 10 ms
Tax-loss harvestingIdentify & execute tax-saving tradesreal-time
Wash-sale detectionIRS-compliant 30-day lookback< 1 ms
Batch processingMulti-account optimization500K+ accounts/hr
02 · Quick start

Test your connection.

All requests go to the versioned base URL and authenticate with a Bearer token.

base url
https://api.prism-optimize.com/v2
bash · health check
curl -X GET https://api.prism-optimize.com/v2/health \
  -H "Authorization: Bearer YOUR_API_KEY"
03 · Authentication

Bearer token on every request.

Pass your API key in the Authorization header. Keys are scoped per tier and rotate without downtime.

header
Authorization: Bearer YOUR_API_KEY
04 · Compute tiers & modes

Same engine. Different hardware allocation.

TierArchitectureRequests/sAccounts/hr
StandardShared GPU pool10050,000
ProfessionalDedicated RTX 4000 Ada slice500250,000
EnterpriseDedicated RTX 4000 Ada cluster2,0001,000,000+

Optimization modes

Pick a mode by latency budget and quality need.

ModeLatencyQualityUse case
fast< 5 msGood (95%+)Real-time rebalancing
quality< 50 msExcellent (99%+)Tax optimization, transitions
ultraboundedNear-optimal (99.9%+)Large-scale batch, 50k+ assets
05 · API reference

Endpoints.

POST /optimize POST /optimize/batch POST /harvest

POST /optimize

Optimize a single portfolio for rebalancing with tax awareness.

json · request
{
  "account_id": "string",
  "holdings": [
    { "ticker": "string", "shares": number, "cost_basis": number }
  ],
  "prices": { "TICKER": number },
  "target_weights": { "TICKER": number },
  "parameters": {
    "tax_rate": 0.37,
    "max_turnover": 0.20,
    "mode": "fast | quality | ultra"
  }
}

Example — rebalance to target

python
def rebalance_portfolio(account_id, holdings, prices, targets, api_key):
    response = requests.post(
        "https://api.prism-optimize.com/v2/optimize",
        json={
            "account_id": account_id,
            "holdings": holdings,
            "prices": prices,
            "target_weights": targets,
            "parameters": {
                "mode": "quality",
                "max_turnover": 0.20,
                "position_max": 0.10
            }
        },
        headers={"Authorization": f"Bearer {api_key}"}
    )
    return response.json()
06 · Tax-loss & batch

Harvest losses; price the whole book.

PRISM identifies and executes tax-loss harvesting opportunities with proactive wash-sale avoidance. For more than ~10 accounts, always use the batch endpoint — it parallelizes internally and is dramatically faster.

python · harvest
response = requests.post(
    "https://api.prism-optimize.com/v2/harvest",
    json={
        "account_id": "acc_123",
        "holdings": holdings,
        "prices": prices,
        "parameters": {
            "tax_rate": 0.37,
            "min_loss_threshold": 500,
            "consider_wash_sales": True
        }
    },
    headers={"Authorization": f"Bearer {api_key}"}
)
Batch tip. Send up to a full book to /optimize/batch in one call. Internal parallelization makes it ~50× faster than looping single-account requests.
07 · Errors & limits

Predictable failures, bounded runtime.

Standard HTTP status codes indicate success or failure. Runtime is bounded — there are no solver timeouts that threaten a deadline.

Handle rate limits

On 429, implement exponential backoff. The Retry-After header tells you how many seconds to wait before retrying.

Use batching

For more than 10 accounts, always use /optimize/batch rather than many single calls.

Validate against ground truth. An exact-reference comparator ships so you can check PRISM's output on your own data, deterministically and re-derivably, for any audit date.

Run it on your own book.

Request a key and a matched-workload pilot — your universe, constraints, costs, and tax rules, with a pass/fail metric you set before we start.

Request a pilot →