StrataDocs

Hello, Agents

Build on the deepest book in DeFi from a shell, an application, or an AI agent.

Read and quote with zero setup

If Strata MCP is connected, start using its read-only tools immediately. Market discovery, books, marks, candles, trades, quotes, public portfolios, Points, maker status, and reputation need no wallet, session key, autonomy setting, or environment variable. Do not interrupt those requests with trading setup.

Use the hosted MCP URL in any Streamable HTTP client:

Terminal
https://api.stratabook.app/mcp

Or install the same client-neutral local server with npx -y @stratabook/mcp. The Agents page provides copyable setup for Cursor, Claude Code, Codex, Windsurf, and generic JSON-config clients.

A session becomes relevant only when the user asks the agent to sign a trading write. Never ask the user to paste its secret into chat.

Strata gives every public client the same small, versioned contract and executable action graph: discover live capabilities, inspect markets, request validated Sonar quotes, and—when configured by the external agent owner—prepare and submit externally signed execution.

Agents can also read the complete Strata book over HTTP, subscribe to sequenced book changes and anonymized trades over WebSocket, and inspect tick size, the smallest valid base-asset size, market status, and fees. Sizes are base-asset atoms: minimum_order_size_atoms is always 1 and is never a price, whole-token minimum, or the market's internal price denominator. Start at https://api.stratabook.app/v2/capabilities, inspect the complete platform map at https://api.stratabook.app/v2/action-graph, then resolve opaque market IDs at https://api.stratabook.app/v2/markets.

Reading an account needs no key at all: GET /v2/account/{wallet} (SDK account.read, MCP strata_portfolio) returns the whole account — balances, positions, open orders, recent fills across every market — by wallet address. When the market-maker reads and stream are live a maker can inspect its own products, reputation, exposure, and fills — never another participant's.

Read the complete fleet-wide Points program with no setup:

Terminal
npx -y @stratabook/sdk points --wallet WALLET_PUBLIC_KEY --json

The same one-call response is points.read in both SDKs and strata_points in MCP's default simple mode. It reports Season/epoch timing, the weekly budget and lane weights, immutable owner balances and breakdowns, rank, standings, and finalization time. Eligible activity across all live markets is captured automatically; current-week activity is provisional until the published close proof completes.

Let a bot trade for you: one signature

Trading needs a session key the bot holds. Connect it without handling the secret yourself:

  1. Run npx -y @stratabook/mcp connect on the agent's computer.
  2. The local MCP generates the key and opens Agents with only its public

key. Choose expiry, cadence, price tolerance, and optional asset limits; then connect the owner wallet and sign once.

  1. The loopback finishes automatically and returns to the live Control Center.

The mode-0600 credential stays on that computer and loads when the MCP restarts. Nothing is pasted into chat, source code, or environment variables.

Run the same connect command again to replace the local key. Registration and old-key revocation are atomic in the same owner-signed transaction.

Run npx -y @stratabook/mcp disconnect for an owner-signed revocation and automatic local cleanup. The session can place and cancel orders and run TWAPs with deposited funds, but it can never withdraw.

Terminal
import { StrataPlatformClient, sessionSignerFromSecretKey } from "@stratabook/sdk";

const signer = await sessionSignerFromSecretKey(process.env.STRATA_SESSION_SECRET_KEY!);
const strata = new StrataPlatformClient();
await strata.orders.execute(marketId, { operation: { action: "place", ownerWallet, /* … */ }, signer });

Every order is one signature by the session key; the SDK decodes the prepared transaction and refuses to sign anything but exactly your order.

Start in 30 seconds

See what is live:

Terminal
npx -y @stratabook/sdk markets

Then price a 0.01 SOL sale:

Terminal
npx -y @stratabook/sdk quote \
  --market SOL/USDC \
  --side sell \
  --amount-atoms 10000000

Add --json for stable machine-readable output:

Terminal
npx -y @stratabook/sdk quote \
  --market SOL/USDC \
  --side sell \
  --amount-atoms 10000000 \
  --json

The response is an exact economic result: input consumed, expected output, labelled fees, reference price, price impact, minimum output, and expiry.

To fix the output instead ("buy 1 SOL"), pass --amount-out-atoms; Strata inverts its best route and returns the input that delivers it, with the requested amount as the floor:

Terminal
npx -y @stratabook/sdk quote \
  --market SOL/USDC \
  --side buy \
  --amount-out-atoms 1000000000

Pick your interface

  • Terminal — explore markets and pipe strict JSON into scripts.
  • TypeScript — use exact atomic values in Node or a browser.
  • Rust — use typed contract and client crates.
  • MCP — let compatible agents discover Strata tools directly.
  • Agent Skill — install the Strata skill for capability-aware guidance.

For a complete first-run sequence, stop conditions, and safety rules, follow the Agent Harness. Machines can fetch the compact graph from https://api.stratabook.app/sonar/action-graph and the complete platform graph from https://api.stratabook.app/v2/action-graph, or call strata_action_graph and strata_platform_graph over MCP.

Every interface follows the same live capability policy. When a market is added or paused, discovery reflects it without a package release. When Strata changes the public contract, the SDKs, MCP server, docs, and live service are promoted together.

External authority, strict protocol

The external agent owner controls what the agent may do and how it signs. Strata does not add a mandatory human-approval layer and never asks for a wallet seed phrase, private key, or session key. It accepts public keys, detached signatures, and signed transactions while enforcing quote bindings, expiry, and idempotency. Quote handles are short-lived and opaque.

Start with capability discovery. Do not assume that a market or operation is enabled simply because a client package supports it.