# MNX documentation MNX is the decentralized futures exchange for the AI economy. It offers valuation futures, equity and compute perpetuals, and prediction markets with non-custodial settlement on MegaETH. This site is the comprehensive source for exchange concepts, contract specifications, trading guides, and the public API. Use testnet for development. Production uses real funds. ## How MNX works - /guides/markets-and-margin — market types, prices, collateral, funding, liquidation, and risk controls - /guides/placing-orders — order types, the 200ms uniform-price batch auction, lifecycle, fills, and cancellation - /guides/fees — maker/taker fee schedule (launch: 0 bps maker / 5 bps taker), the authoritative per-market maker_fee/taker_fee fields on GET /v0/markets, and the fee field on fills ## Contract specifications - /contracts/oracle-methodology — price-source ladders, FX conversion, cadence, staleness, and delayed-feed risks - /contracts/valuation-futures — price formation and settlement for the OPENAI and ANTHROPIC valuation futures - /contracts/equity-perp-corporate-actions — treatment of splits, dividends, trading halts, acquisitions, and delistings ## API guides and reference - /guides/bot-quickstart.md — complete plain-Markdown zero-to-order guide with runnable Node.js source; preferred for AI agents and terminal clients - /guides/bot-quickstart — testnet bot using Node.js and ethers v6 after browser account setup; includes API-key authentication, faucet, MarginBank deposit, EIP-712 order signing, verification, and cleanup - /guides/getting-started — base URLs, response shapes, exact raw integers, and read-after-write bookmarks - /guides/authentication — API keys, Privy identity tokens, delegated trading session keys, and the exact EIP-712 order struct, flag packing, integer scaling, and signature suffix - /guides/websockets — real-time market and account updates - /reference — rendered API reference - /openapi-public.json — machine-readable OpenAPI 3.1 specification ## Legal - /terms — MNX Markets Terms of Use - /privacy — MNX Markets Privacy Policy ## Public endpoints - Testnet API: https://api.testnet.mnx.fi - Testnet MegaETH JSON-RPC: https://carrot.megaeth.com/rpc - Testnet chain ID: 6343 - Every API path begins with /v0/ ## Bot requirements that are easy to miss 1. An API key authenticates bot HTTP requests; a Privy identity token authenticates browser requests; an EIP-712 signature separately authorizes each order. 2. POST /v0/faucet sends test USDM and testnet gas to the wallet. It does not deposit collateral into the exchange. 3. Fetch addresses from GET /v0/contracts/shared, then call collateral-token approve and MarginBank depositToBank. 4. Wait for GET /v0/balance/:user_id/margin to reflect the confirmed chain deposit before placing an order. 5. Use exact *_e18_raw response strings as integers in the EIP-712 message. Keep the human-readable JSON fields numerically identical. 6. Order-signature v2 includes uint8 triggerCondition and domain version 2.0. Hash the typed data, sign its bytes as a personal message, append 01 as the embedded signature type, and also send JSON signature_type: 1. 7. Verify the returned order_id/order_hash. Cancel any resting test order and confirm no active status remains. Never use a production private key or real funds in a test bot.