# Arena Exchange v4.9 (Wire Protocol 2.0 / Manifest Release 4.8) > 100% Headless C++23 HFT, Algo & Autonomous AI Execution Protocol (Zero Website, Zero House Prop Bots) ## Live Node Posture - Markets Active: 19 - Auth Required: true - Default Maker / Taker Fee (bps): 0 / 0 - Segmented Public Fee Schedule: false - Settlement Chain ID: 84532 - Clearinghouse Contract: 0xcF4A547dC3c77E56b2af601e72a85A5eB9760907 - Public Base Sepolia Testnet HTTPS Gateway: `https://testnet.feraterra.app` (`wss://testnet.feraterra.app/ws`) ## Exact Fixed-Point Arithmetic (Zero Floating-Point Inside Engine) - `price_ticks` (int64): `1 tick = $0.01 USD` (`$100,000.00 = 10,000,000 ticks`). - `qty_lots` (uint64): `1 lot = 1e-4` (`0.0001`) base units (`1.0000 BTC = 10,000 lots`). - `usd_micro` (int64): `1 USD = 1,000,000 usd_micro`; `notional_usd_micro = price_ticks * qty_lots`. - `SpreadBook` (`kind == "spread"`): quoted around par offset `1,000,000 ticks` (`$10,000.00`), so `+$5.00` differential = `1,000,500 ticks`. - `BoundedClaim` (`kind == "bounded_claim"`): bounded `[0, claim_cap_ticks]` claims quoted in `[1, claim_cap_ticks - 1]` ticks (`100 ticks = $1.00` binary or `10,000 ticks = $100.00` scalar/corridor collateral per lot). ## Self-Custodial Onboarding & Authentication 1. `POST /auth/challenge` with `{"eth_address":"0x..."}` -> returns EIP-191 `message` & `nonce`. 2. Sign `message` with `secp256k1` EIP-191 `personal_sign` (`65`-byte `r||s||v`). 3. `POST /auth/wallet` (alias `POST /auth/verify`) with `{"eth_address":"0x...","nonce":"...","signature":"0x..."}` -> issues `account_id`, `api_key`, `api_secret` (HTTP/WS HMAC-SHA256), and `wire_key_lo_hex`/`wire_key_hi_hex` (128-bit binary SipHash MAC). 4. Sign authenticated HTTP requests with headers `X-Arena-API-Key`, `X-Arena-Timestamp` (ms), `X-Arena-Signature = HMAC_SHA256(api_secret, ts + "\n" + METHOD + "\n" + path_and_query + "\n" + body)` (or `ts + "\n" + nonce + ...` when `X-Arena-Nonce` is supplied). ## Testnet Faucet & Non-Custodial L2 Settlement - Testnet Faucet (when edge faucet proxy is enabled on non-mainnet chains): `POST /faucet` with `{"recipient":"0x...","asset":"USD","amount":"10000","drip_gas":true}`. - L2 Margin Deposit: ERC-20 `approve(clearinghouse, rawAmount)` then `Clearinghouse.depositTraderMargin(accountId, assetId, rawAmount)` (`GET /settlement/status` & `GET /settlement/config` return live addresses). - L2 Withdrawal: `POST /withdraw` returns an operator-signed voucher redeemable on-chain via `Clearinghouse.claimWithdrawalVoucher(...)` (`GET /withdrawals?account_id=` lists issued vouchers); trustless escape proofs are served at `GET /settlement/escape_proof?account_id=...`. ## Discovery, Market Data & Stateless Order Dry-Run - `GET /openapi.json`: OpenAPI 3.1.0 JSON schema for HTTP endpoints. - `GET /manifest` & `GET /health`: Live protocol posture, capability flags, and conservation health. - `GET /markets`, `GET /ticker?market_id=1`, `GET /book?market_id=1&depth=20`, `GET /trades?market_id=1`, `GET /candles?market_id=1&interval=1m` (or `interval_sec=60`). - `GET /leaderboard?limit=50&sort=equity`: Zero-mutation public Testnet Gladiator Leaderboard (Eigen-SPAN equity, net PnL, ROI bps, BBO uptime streak 1.00x->3.00x multiplier, masked wallet, volume, open orders & active positions). - `GET /account?account_id=`: Real-time Eigen-SPAN portfolio risk (`equity`, `imr`, `mmr`, `free_margin`), positions, and open orders. - `POST /order/preview` (and WS `{"op":"order_preview",...}`): 100% read-only dry-run returning `would_accept`, `status`, `effective_price_ticks`, `estimated_filled_lots`, `estimated_avg_price_ticks`, `estimated_slippage_bps`, `estimated_fee_micro`, and `post_imr_micro`/`post_free_margin_micro` with ZERO WAL or order-book state mutation. ## Execution & Autonomous AI / Algo Strategy Endpoints - `POST /order`, `POST /modify`, `POST /cancel`, `POST /cancel_all`: Limit/Market/IOC/FOK/PostOnly (`post_only_slide`), `primary_peg`, `midpoint_peg`, `mark_peg`, `trailing_peg`, `dark_midpoint`, `display_qty_lots` (iceberg), `oco_linked`, `auto_skew_ticks`, `auto_flip_ticks`, `jit_elastic_mult`, `max_lifetime_wal_seqs`. - `POST /quote`: Atomic 1-WAL two-sided maker quote replace with FIFO queue preservation. - `POST /basket` & `POST /spread`: All-or-nothing multi-leg atomic baskets (`<= 4` legs) and 2-leg spread arbitrage. - `POST /mint_redeem` & `POST /flash_arb`: Zero-collateral `BoundedClaim` complete-set mint/redeem and flash arbitrage. - `POST /auto_cross_arb`: Single-packet Jacobian-hedged cross-market stat-arb sweeper (perp/spot basis, spread books, triangles, power/linear-spread formula perps). - `POST /auto_liquidate`: Zero-capital distressed-account liquidation sweeper with instant L3 offload. - `POST /auto_delta_hedge`: 1-call Jacobian portfolio delta neutralizer. - `GET /ledger/tip`: Operator-signed Keccak-256 ledger tip (`ARENA_LEDGER_TIP_V2_1`). ## Client Transports, SDK & MCP Server - WebSocket: `ws://:/ws` (`{"op":"auth",...}`, `{"op":"subscribe",...}`, `{"op":"order_preview",...}`, `{"op":"order",...}`). - Ultra-Low-Latency Binary Wire: 64-byte `ArenaWire` TCP/UDP + 64-byte `ArenaITCH` L3 tick feed. - Python SDK (`sdk/python/arena_sdk.py`): `ArenaHttpClient`, `ArenaWsClient`, `ArenaBinaryClient`, and CCXT drop-in `ArenaCcxtAdapter`. - Model Context Protocol (`scripts/arena_mcp_server.py`): standalone 24-tool gateway over `stdio` or `--http-listen-port` Streamable HTTP JSON-RPC 2.0 (`POST /mcp`).