{"openapi":"3.1.0","info":{"title":"Arena Exchange Headless HFT & AI Execution API","version":"4.9.0","x-wire-version":"2.0","x-manifest-release":"4.8","x-markets-active":19,"description":"Headless C++23 multi-archetype CLOB, Eigen-SPAN cross-margin risk engine, non-custodial L2 settlement gateway, and autonomous AI/algo execution API. Fixed-point units: 1 price_tick = $0.01 USD, 1 qty_lot = 1e-4 base units, 1 USD = 1,000,000 usd_micro."},"servers":[{"url":"https://testnet.feraterra.app","description":"Public Base Sepolia Testnet HTTPS Gateway (Chain ID 84532)"}],"components":{"securitySchemes":{"ArenaApiKey":{"type":"apiKey","in":"header","name":"X-Arena-API-Key"},"ArenaTimestamp":{"type":"apiKey","in":"header","name":"X-Arena-Timestamp"},"ArenaSignature":{"type":"apiKey","in":"header","name":"X-Arena-Signature"}},"schemas":{"OrderRequest":{"type":"object","required":["account_id","market_id","qty_lots"],"properties":{"account_id":{"type":"integer","minimum":1},"market_id":{"type":"integer","minimum":1},"side":{"type":"string","enum":["bid","ask","buy","sell"],"default":"bid"},"price_ticks":{"type":"integer","description":"1 tick = $0.01 USD (SpreadBook par = 1,000,000 ticks)"},"qty_lots":{"type":"integer","minimum":1,"description":"1 lot = 1e-4 base units"},"tif":{"type":"string","enum":["gtc","ioc","fok","post_only"],"default":"gtc"},"stp":{"type":"string","enum":["cancel_resting","cancel_incoming","cancel_both","decrement_and_cancel","none"],"default":"cancel_resting"},"is_market":{"type":"boolean","default":false},"reduce_only":{"type":"boolean","default":false},"post_only_slide":{"type":"boolean","default":false},"peg_type":{"type":"string","enum":["none","primary","midpoint","mark","trailing","dark_midpoint"],"default":"none"},"peg_offset_ticks":{"type":"integer","minimum":-500,"maximum":500},"display_qty_lots":{"type":"integer","minimum":0},"client_tag":{"type":"integer","minimum":0},"oco_linked":{"type":"boolean","default":false},"margin_spot":{"type":"boolean","default":false},"auto_skew_ticks":{"type":"integer","minimum":0,"maximum":500},"auto_flip_ticks":{"type":"integer","minimum":0,"maximum":500},"jit_elastic_mult":{"type":"integer","minimum":0,"maximum":10},"max_lifetime_wal_seqs":{"type":"integer","minimum":0,"maximum":65535}}},"OrderPreviewResponse":{"type":"object","required":["ok","preview","stateless","would_accept","status","wal_seq","effective_price_ticks","estimated_filled_lots","estimated_resting_lots","post_imr_micro","post_free_margin_micro"],"properties":{"ok":{"type":"boolean"},"preview":{"type":"boolean"},"stateless":{"type":"boolean"},"would_accept":{"type":"boolean"},"status":{"type":"string"},"order_status":{"type":"string"},"wal_seq":{"type":"integer"},"account_id":{"type":"integer"},"market_id":{"type":"integer"},"side":{"type":"string"},"tif":{"type":"string"},"slid_post_only":{"type":"boolean"},"effective_price_ticks":{"type":"integer"},"mark_price_ticks":{"type":"integer"},"best_bid_ticks":{"type":"integer"},"best_ask_ticks":{"type":"integer"},"qty_lots":{"type":"integer"},"estimated_filled_lots":{"type":"integer"},"estimated_resting_lots":{"type":"integer"},"estimated_avg_price_ticks":{"type":"integer"},"worst_sweep_price_ticks":{"type":"integer"},"estimated_notional_micro":{"type":"integer"},"estimated_slippage_bps":{"type":"integer"},"estimated_fee_micro":{"type":"integer"},"pre_equity_micro":{"type":"integer"},"pre_imr_micro":{"type":"integer"},"pre_mmr_micro":{"type":"integer"},"post_equity_micro":{"type":"integer"},"post_imr_micro":{"type":"integer"},"post_mmr_micro":{"type":"integer"},"post_free_margin_micro":{"type":"integer"}}}}},"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Node conservation & WAL health","responses":{"200":{"description":"Healthy"}}}},"/manifest":{"get":{"operationId":"getManifest","summary":"Protocol posture, fees & capability flags","responses":{"200":{"description":"Manifest JSON"}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","summary":"Machine-readable AI/LLM specification","responses":{"200":{"description":"Plain-text LLM spec"}}}},"/openapi.json":{"get":{"operationId":"getOpenApiJson","summary":"OpenAPI 3.1.0 specification","responses":{"200":{"description":"OpenAPI JSON"}}}},"/markets":{"get":{"operationId":"listMarkets","summary":"List all active markets and risk specs","responses":{"200":{"description":"Markets array"}}}},"/ticker":{"get":{"operationId":"getTicker","summary":"24h ticker & mark/BBO telemetry","parameters":[{"name":"market_id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Ticker JSON"}}}},"/book":{"get":{"operationId":"getOrderBook","summary":"Aggregated visible L2 order book snapshot","parameters":[{"name":"market_id","in":"query","required":true,"schema":{"type":"integer"}},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"L2 book JSON"}}}},"/trades":{"get":{"operationId":"getRecentTrades","summary":"Recent trade executions","parameters":[{"name":"market_id","in":"query","required":true,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Trades JSON"}}}},"/candles":{"get":{"operationId":"getCandles","summary":"OHLCV candles","parameters":[{"name":"market_id","in":"query","required":true,"schema":{"type":"integer"}},{"name":"interval","in":"query","required":false,"schema":{"type":"string","enum":["tick","1s","1m"],"default":"1m"}},{"name":"interval_sec","in":"query","required":false,"schema":{"type":"integer","enum":[0,1,60]}}],"responses":{"200":{"description":"Candles JSON"}}}},"/leaderboard":{"get":{"operationId":"getLeaderboard","summary":"Zero-mutation public Gladiator Leaderboard (masked wallets, Eigen-SPAN equity, PnL & BBO streak)","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["equity","pnl","streak","volume","roi"],"default":"equity"}}],"responses":{"200":{"description":"Ranked Gladiator leaderboard JSON"}}}},"/auth/challenge":{"post":{"operationId":"createAuthChallenge","summary":"Issue EIP-191 wallet sign-in challenge","responses":{"200":{"description":"Challenge nonce & message"}}}},"/auth/wallet":{"post":{"operationId":"loginWithWallet","summary":"Verify EIP-191 wallet signature and mint API/Wire credentials","responses":{"200":{"description":"Issued trader credentials"}}}},"/auth/verify":{"post":{"operationId":"verifyAuthChallenge","summary":"Alias for /auth/wallet EIP-191 signature verification","responses":{"200":{"description":"Issued trader credentials"}}}},"/faucet":{"post":{"operationId":"requestTestnetFaucet","summary":"Self-service testnet token drip (served when testnet edge faucet proxy is enabled; disabled on mainnet)","responses":{"200":{"description":"Minted testnet collateral receipt"},"403":{"description":"Disabled on mainnet"}}}},"/account":{"get":{"operationId":"getAccount","summary":"Eigen-SPAN equity, IMR/MMR, positions & open orders","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Account snapshot"}}}},"/order/preview":{"post":{"operationId":"previewOrder","summary":"Stateless read-only order dry-run (0 WAL/book mutation)","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Dry-run fill, slippage & post-trade Eigen-SPAN margin preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPreviewResponse"}}}}}}},"/order":{"post":{"operationId":"submitOrder","summary":"Submit single order","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"Order accepted"},"400":{"description":"Order rejected"}}}},"/modify":{"post":{"operationId":"modifyOrder","summary":"In-place order price/quantity modify","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Modified"}}}},"/cancel":{"post":{"operationId":"cancelOrder","summary":"Cancel single order or filtered cancel_all","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Canceled"}}}},"/cancel_all":{"post":{"operationId":"cancelAllOrders","summary":"Cancel all resting orders (optional market/tag/side filter)","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Canceled"}}}},"/quote":{"post":{"operationId":"replaceTwoSidedQuote","summary":"Atomic 1-WAL two-sided maker quote replace","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Quote replaced"}}}},"/basket":{"post":{"operationId":"executeAtomicBasket","summary":"All-or-nothing multi-leg atomic basket (up to 4 legs)","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Basket executed"}}}},"/spread":{"post":{"operationId":"executeAtomicSpread","summary":"Atomic 2-leg spread execution","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Spread executed"}}}},"/mint_redeem":{"post":{"operationId":"mintOrRedeemClaimSet","summary":"Mint or redeem BoundedClaim complete sets","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Complete set minted/redeemed"}}}},"/flash_arb":{"post":{"operationId":"executeFlashArbitrage","summary":"Zero-collateral BoundedClaim complete-set flash arbitrage","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Flash arb executed"}}}},"/auto_cross_arb":{"post":{"operationId":"executeAutoCrossArb","summary":"Single-packet Jacobian-hedged cross-market stat-arb sweep","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Cross-arb sweep result"}}}},"/auto_liquidate":{"post":{"operationId":"executeAutoLiquidate","summary":"Autonomous zero-capital liquidation & L3 offload sweep","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Auto-liquidation result"}}}},"/auto_delta_hedge":{"post":{"operationId":"executeAutoDeltaHedge","summary":"1-call Jacobian portfolio delta neutralizer","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Delta hedge result"}}}},"/withdraw":{"post":{"operationId":"requestWithdrawal","summary":"Debit free balance and issue operator-signed L2 withdrawal voucher","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"responses":{"200":{"description":"Withdrawal receipt & voucher"}}}},"/withdrawals":{"get":{"operationId":"listWithdrawals","summary":"List withdrawal vouchers for account","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Withdrawals list"}}}},"/settlement/config":{"get":{"operationId":"getSettlementConfig","summary":"On-chain Clearinghouse & collateral token configuration","responses":{"200":{"description":"Settlement config JSON"}}}},"/settlement/escape_proof":{"get":{"operationId":"getEscapeProof","summary":"Merkle escape-hatch proof for last committed settlement batch","security":[{"ArenaApiKey":[],"ArenaTimestamp":[],"ArenaSignature":[]}],"parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Merkle proof JSON"}}}},"/ledger/tip":{"get":{"operationId":"getLedgerTip","summary":"Operator-signed Keccak-256 ledger tip (ARENA_LEDGER_TIP_V2_1)","responses":{"200":{"description":"Signed ledger tip JSON"}}}}}}