REST API

API reference

Base URL https://multi-venym-labs.vercel.app/api. Responses use a { success, data, timestamp } envelope (a few data endpoints return a raw array). Execution endpoints accept an Idempotency-Key header. Public GET endpoints have a live Try-it runner — expand a card and hit Send.

Market data

Public — no key required. Expand an endpoint and try it against live data.

Parameters
symbolstringrequiredPerp symbol.
Try it — live

Streaming (SSE)

Content-Type: text/event-stream. Named events book · bar · trade, with : heartbeat comments every 5s. Target the backend directly to avoid proxy buffering, or just use the SDK / MCP watch_* tools.

bash
curl -N "https://multi-backend.fly.dev/api/aggregated/stream/trades?symbol=BTC"

Account

Requires a key with scope account:read. Keyed to the key's subject wallet.

Orders & positions

Requires scope orders:execute and policy.executionEnabled = true.

bash
curl -X POST https://multi-venym-labs.vercel.app/api/agent/orders \
  -H "Authorization: Bearer $MULTI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "symbol": "BTC", "side": "BUY", "type": "MARKET", "quantity": "0.01" }'

Execution strategies

Server-run TWAP and scaled (ladder) execution. The full strategy notional is policy-checked and reserved up-front — slicing is not a way around limits. The events stream emits strategy_update as slices fill.

Pair trades

Requires scope pairs:execute. A single position split into balanced long/short perp legs.

Swaps

Cross-chain via LiFi/SideShift (EVM + Solana). quote and prepare need swap:quote; headless execute needs swap:execute. (EVM headless execution is live; Solana headless is operator-gated — use the non-custodial prepare path. See recipes.)

Key management

Authenticated with your multi (Dynamic) session JWT — see authentication.

Errors return { success: false, error, code }. See the safety model for the full error and rate-limit catalog.