{"openapi":"3.1.0","info":{"title":"MGO — Multi-chain Gas Optimizer","version":"2.2.0","description":"Compare real-time gas prices across up to 9 EVM chains and get a cheapest-chain recommendation. Pay-per-call via x402 (USDC on Base). No API key.","contact":{"name":"chain-ops","url":"https://chain-ops.xyz","email":"dlrjsdl200@naver.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://api.mgo.chain-ops.xyz"}],"x-x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x665bab4c46a6ae3f755e71793e5685bc6c47dd7a","facilitator":"cdp"},"paths":{"/gas/demo":{"get":{"summary":"Free demo — raw gas prices for 4 chains","description":"Ethereum, Base, Arbitrum, Optimism. Rate limited to 10 requests/hour per IP. No payment.","operationId":"getGasDemo","security":[],"responses":{"200":{"description":"Gas comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GasResponse"}}}}}}},"/prices":{"get":{"summary":"Free native token USD prices (ETH, BNB, POL, AVAX, HYPE), 60s cache","operationId":"getPrices","security":[],"responses":{"200":{"description":"Prices","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"currency":{"type":"string"},"prices":{"type":"object"},"fetchedAt":{"type":"string"},"ageSec":{"type":"number"}}}}}}}}},"/gas/basic":{"get":{"summary":"4-chain gas comparison (paid)","description":"Ethereum, Base, Arbitrum, Optimism with cheapest-chain recommendation and savings %. $0.001 USDC via x402 on Base.","operationId":"getGasBasic","x-x402":{"price":"0.001","asset":"USDC","network":"eip155:8453"},"responses":{"200":{"description":"Gas comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GasResponse"}}}},"402":{"description":"Payment Required. Pay $0.001 USDC via x402 (requirements in the PAYMENT-REQUIRED header), then retry with the PAYMENT-SIGNATURE header."}}}},"/gas/premium":{"get":{"summary":"9-chain gas comparison (paid)","description":"Adds BNB, Polygon, Avalanche, zkSync, Hyperliquid to the basic 4. $0.002 USDC via x402 on Base.","operationId":"getGasPremium","x-x402":{"price":"0.002","asset":"USDC","network":"eip155:8453"},"responses":{"200":{"description":"Gas comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GasResponse"}}}},"402":{"description":"Payment Required. Pay $0.002 USDC via x402 (requirements in the PAYMENT-REQUIRED header), then retry with the PAYMENT-SIGNATURE header."}}}}},"components":{"schemas":{"GasResponse":{"type":"object","required":["success","chains","recommendation"],"properties":{"success":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"tier":{"type":"string","enum":["demo","basic","premium"]},"totalLatencyMs":{"type":"number"},"recommendation":{"type":"object","properties":{"cheapestChain":{"type":"string","example":"Base"},"cheapestChainId":{"type":"number","example":8453},"estimatedCostsUsdc":{"type":"object"},"vsExpensive":{"type":"object","properties":{"chain":{"type":"string"},"savingsPercent":{"type":"string","example":"99.8%"}}},"action":{"type":"string","example":"Use Base — saves 99.8% vs Ethereum"}}},"chains":{"type":"array","items":{"type":"object","properties":{"chain":{"type":"string"},"chainId":{"type":"number"},"nativeToken":{"type":"string"},"tokenPriceUsd":{"type":"number"},"gasPrice":{"type":"object"},"estimatedCosts":{"type":"object"},"status":{"type":"string"}}}}}}}}}