HTTP API reference
Use authorization: Bearer $DASHBOARD_API_KEY for scripts. Browser pages use the session cookie. Every endpoint documented on this page is paper-only and returns cache-control: no-store for live reads; the separate, operator-gated live-trading rails are covered under the Trading docs page.
Dashboard account, positions, histories, thematic baskets, strategy previews, and custom basket metadata.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/snapshot", headers=headers, timeout=30)response.raise_for_status()snapshot = response.json()
print(snapshot.keys())print("positions", len(snapshot.get("positions", [])))print("custom baskets", len(snapshot.get("custom_baskets", [])))Full state document for the hedge board: summary, constituents, exposures, events, hedge hint, Hyperliquid reference, deployment state, and raw strategy snapshot.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
state = requests.get( f"{base_url}/api/baskets/btc-eth-short-term/state", headers=headers, timeout=30,).json()
summary = state["summary"]print("basket", state["basket_id"])print("price/nav", summary.get("nav"), "pnl", summary.get("total_pnl"))print("constituents", len(state["constituents"]))print("net deltas", state["exposures"]["net_btc_delta"], state["exposures"]["net_eth_delta"])
# The raw source-of-truth strategy snapshot used by the strategy page is embedded here.strategy_snapshot = state["snapshot"]print(strategy_snapshot["basket"]["price"], strategy_snapshot["orderbook"]["spreadBps"])Fast dashboard header: NAV, cash reserve, total P&L, BTC/ETH deltas, last roll, next expected roll, and update time.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/baskets/btc-eth-short-term/summary", headers=headers, timeout=30)response.raise_for_status()payload = response.json()print(payload){ "basket_id": "btc-eth-short-term", "nav": 1250345.22, "cash_pct": 0.08, "total_pnl": 20345.11, "net_btc_delta": -0.72, "net_eth_delta": 1.15, "last_roll_at": "2026-05-20T10:30:00Z", "last_rebalance_at": "2026-05-20T10:30:02Z", "next_expected_roll_window": "2026-05-20T10:35:00Z", "updated_at": "2026-05-20T10:31:04Z"}Raw BTC/ETH prediction-market positions: market id, name, asset, tenor, expiry, contracts, mark, notional, weight, indicative MTM, and status.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/baskets/btc-eth-short-term/constituents", headers=headers, timeout=30)response.raise_for_status()payload = response.json()print(payload){ "market_id": "pm_btc_5m_100k_up_1035", "market_name": "Will BTC be above 100k at 10:35?", "underlying_asset": "BTC", "tenor_bucket": "5m", "expiry_time": "2026-05-20T10:35:00Z", "strike_or_threshold": 100000, "side_held": "YES", "contracts_held": 25000, "mark_price": 0.54, "notional_value": 13500, "weight_in_basket": 0.041, "unrealized_pnl": 420, "status": "active"}Hedge-relevant BTC/ETH delta, tenor breakdowns, top contributors, and delta change since the last roll.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/baskets/btc-eth-short-term/exposures", headers=headers, timeout=30)response.raise_for_status()payload = response.json()print(payload){ "net_btc_delta": -0.72, "net_eth_delta": 1.15, "by_asset": { "BTC": { "total_delta": -0.72, "by_tenor": { "5m": -0.41, "15m": -0.19, "1h": -0.12 }, "top_contributors": [ { "market_id": "pm_btc_5m_100k_up_1035", "delta_contribution": -0.18 } ] }, "ETH": { "total_delta": 1.15, "by_tenor": { "5m": 0.63, "15m": 0.31, "1h": 0.21 }, "top_contributors": [ { "market_id": "pm_eth_5m_2500_up_1035", "delta_contribution": 0.22 } ] } }, "change_since_last_roll": { "btc_delta_change": 0.14, "eth_delta_change": -0.09 } }Chronological roll, rebalance, mark-change, and exposure-change events for audit and hedge update logic.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/baskets/btc-eth-short-term/events", headers=headers, timeout=30)response.raise_for_status()payload = response.json()print(payload){ "event_id": "evt_123", "timestamp": "2026-05-20T10:35:01Z", "event_type": "basket_rebalanced", "details": { "expired_markets": ["pm_btc_5m_100k_up_1035"], "added_markets": ["pm_btc_5m_100k_up_1040"], "btc_delta_before": -0.72, "btc_delta_after": -0.51, "eth_delta_before": 1.15, "eth_delta_after": 1.10 }}Read-only Hyperliquid offset hint. It never places orders.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}"}
response = requests.get(f"{base_url}/api/baskets/btc-eth-short-term/hedge_hint", headers=headers, timeout=30)response.raise_for_status()payload = response.json()print(payload){ "as_of": "2026-05-20T10:31:04Z", "net_btc_delta": -0.72, "net_eth_delta": 1.15, "suggested_hedge": [ { "venue": "hyperliquid", "asset": "BTC", "action": "BUY", "size": 0.72 }, { "venue": "hyperliquid", "asset": "ETH", "action": "SELL", "size": 1.15 } ]}Server-sent events with basket.state.updated, basket.summary.updated, basket.delta.updated, and basket.tick channels.
import jsonimport osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}", "accept": "text/event-stream"}
with requests.get( f"{base_url}/api/baskets/btc-eth-short-term/stream", headers=headers, stream=True, timeout=60,) as response: response.raise_for_status() event_name = None for line in response.iter_lines(decode_unicode=True): if not line: continue if line.startswith("event:"): event_name = line.split(":", 1)[1].strip() elif line.startswith("data:"): payload = json.loads(line.split(":", 1)[1].strip()) print(event_name, payload.get("generatedAt") or payload.get("updated_at")) if event_name == "basket.tick": print("basket price", payload["basket"].get("price")) breakevent: basket.delta.updateddata: { "net_btc_delta": -0.72, "net_eth_delta": 1.15, "updated_at": "2026-05-20T10:35:01Z"}
event: basket.tickdata: { "kind": "crypto_updown.tick.v1", "cadenceMs": 50, "basket": { "price": 0.135, "activeLegs": 10, "totalLegs": 12 }, "history_tail": { "ts": "2026-05-20T10:35:01Z", "price": 0.135 }}Current ATOP nowcast source-of-truth. nowcast.snapshot.legs include full L2 bid/ask arrays; nowcast.snapshot.orderbook.scenarios contains basket-level executable VWAP and slippage by dollar notional.
{ "generatedAt": "2026-05-20T10:35:01.125Z", "basket": { "price": 0.3562, "bid": 0.3462, "ask": 0.3573, "spreadBps": 312 }, "legs": [ { "id": "dflow:btc-updown-5m:yes", "venue": "dflow_kalshi", "asset": "BTC", "side": "YES", "weight": 0.0833, "price": 0.3511, "bid": 0.3462, "ask": 0.3573, "bids": [{ "price": 0.3462, "size": 147.2 }], "asks": [{ "price": 0.3573, "size": 151.9 }] } ], "orderbook": { "scenarios": [ { "notionalUsd": 1000, "buyPrice": 0.3767, "sellPrice": 0.3415, "buyImpactBps": 701, "sellImpactBps": 299, "buySlippageUsd": 20.5, "sellSlippageUsd": -14.7, "filledLegs": 12, "totalLegs": 12 } ], "legs": [ { "id": "dflow:btc-updown-5m:yes", "allocationPct": 8.33, "bidLevels": [{ "price": 0.3462, "size": 147.2 }], "askLevels": [{ "price": 0.3573, "size": 151.9 }] } ] }}For a basket buy: leg_notional_usd = total_notional_usd * allocation_pct shares_to_buy = leg_notional_usd / executable_level_price leg_vwap = sum(price_level * filled_shares) / sum(filled_shares) basket_buy_price = sum(allocation_pct * leg_vwap) buy_slippage_usd = total_notional_usd * max(0, basket_buy_price - basket_mid)
For a basket sell: leg_notional_usd = total_notional_usd * allocation_pct shares_to_sell = leg_notional_usd / executable_reference_price leg_vwap = sum(price_level * filled_shares) / sum(filled_shares) basket_sell_price = sum(allocation_pct * leg_vwap) sell_slippage_usd = total_notional_usd * min(0, basket_sell_price - basket_mid)
The dashboard must not multiply full notional by every leg independently.Every leg receives only its basket allocation.import os
from atop import AtopClient
# Institutional dashboard host only - authenticate with the dashboard# automation key (ito_*); the public bkt_* key returns 401 here.client = AtopClient( institutional_base_url="https://app.itomarkets.com", institutional_api_key=os.environ["ATOP_INSTITUTIONAL_API_KEY"],)nowcast = client.nowcast("wsc_crypto_updown_delta_hedged_roll")snapshot = nowcast["snapshot"]
# Full L2 is in snapshot["legs"][i]["bids"] and ["asks"].# Each level is {"price": probability_price, "size": contracts}.for leg in snapshot["legs"]: top_bids = leg["bids"][:10] top_asks = leg["asks"][:10] print(leg["id"], leg["venue"], "mark", leg["price"]) print(" bids", top_bids) print(" asks", top_asks)
# Basket-level executable scenarios are already dollar-notional simulations.for row in snapshot["orderbook"]["scenarios"]: print(row["notionalUsd"], row["buyPrice"], row["sellPrice"], row["buySlippageUsd"], row["sellSlippageUsd"])Server-sent ATOP nowcast ticks. This is the narrowest realtime stream when you only need crypto basket price, legs, paper lots, roll count, and executable orderbook updates.
import os
from atop import AtopClient
# Institutional dashboard host only - authenticate with the dashboard# automation key (ito_*); the public bkt_* key returns 401 here.client = AtopClient( institutional_base_url="https://app.itomarkets.com", institutional_api_key=os.environ["ATOP_INSTITUTIONAL_API_KEY"], timeout=60,)
for event_name, payload in client.stream_nowcast("wsc_crypto_updown_delta_hedged_roll"): print(event_name, payload.get("generatedAt")) if event_name == "atop.nowcast.tick": print("basket price", payload["snapshot"]["basket"].get("price")) breakDeploy paper capital into the BTC/ETH hedge basket. Body accepts capital_usd, capitalUsd, or capital. Set hedge_hyperliquid true to add paper Hyperliquid BTC/ETH hedge rows and include hedge MTM.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}", "content-type": "application/json"}
ticket = { "capital_usd": 10, "hedge_hyperliquid": True,}
response = requests.post( f"{base_url}/api/baskets/btc-eth-short-term/trade", json=ticket, headers=headers, timeout=30,)response.raise_for_status()print(response.json())Paper basket ticket. Body fields: basket, size, optional side, max_legs.
curl -X POST "https://app.itomarkets.com/api/cli/basket-trade" \ -H "authorization: Bearer $DASHBOARD_API_KEY" \ -H "content-type: application/json" \ -d '{ "basket": "ITO-P3", "size": 10, "max_legs": 12 }'{ "ok": true, "bridge": "institutional-cli", "account": "client", "command": ["institutional-cli", "basket", "trade", "ITO-P3", "10.00", "--max-legs", "12", "--local", "--json"], "applied_positions": 9, "applied_notional_usd": 10, "result": { "paper_only": true, "action": "basket_trade", "basket_code": "ITO-P3" }}List or create account-local custom paper baskets. Custom baskets are limited to 20 legs and never broadcast venue orders.
import osimport requests
base_url = os.environ.get("INSTITUTIONAL_API_BASE_URL", "https://app.itomarkets.com")api_key = os.environ["INSTITUTIONAL_API_KEY"]headers = {"authorization": f"Bearer {api_key}", "content-type": "application/json"}
payload = { "name": "BTC/ETH Relative Value", "description": "Paper-only client basket", "legs": [ {"market_id": "btc-updown-5m", "venue": "polymarket", "side": "YES", "weight": 0.5}, {"market_id": "eth-updown-5m", "venue": "dflow", "side": "YES", "weight": 0.5}, ],}
response = requests.post(f"{base_url}/api/custom-baskets", json=payload, headers=headers, timeout=30)response.raise_for_status()print(response.json())