{"openapi":"3.1.0","info":{"title":"RDX Cross-Chain Stablecoin & DEX Liquidity Arbitrage API","description":"Real-time stablecoin de-peg anomalies, cross-chain liquidity routing metrics and swap arbitrage signals across **Base**, **Arbitrum** and **Solana**, for autonomous treasury agents and high-frequency DEX bots.\n\nCommercial endpoints cost **$0.05 USDC per call** and accept three payment gateways: Skyfire (`kyapay-token`), Coinbase x402 v2 (`PAYMENT-SIGNATURE`) and AgentCash (`X-402-Payment-Receipt`). Skyfire `kya` tokens receive a free 2-route sample. Responses are served from a Redis cache refreshed every 15 minutes.","version":"2.2.0","x-guidance":"Paid GET endpoints ($0.05 USDC per call on Base). Request without credentials to receive the x402 v2 challenge, or send a Skyfire token in `kyapay-token`. Full instructions: https://dex.rdxdata.xyz/llms.txt"},"servers":[{"url":"https://dex.rdxdata.xyz","description":"Production"}],"paths":{"/":{"get":{"tags":["Meta"],"summary":"Service index","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Root  Get"}}}}}}},"/health":{"get":{"tags":["Meta"],"summary":"Liveness and cache status","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pricing":{"get":{"tags":["Meta"],"summary":"Pricing and payment gateways","operationId":"pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pricing V1 Pricing Get"}}}}}}},"/v1/dex/arbitrage":{"get":{"tags":["DEX Arbitrage"],"summary":"Cross-chain stablecoin peg health and DEX arbitrage routes","operationId":"dex_arbitrage_v1_dex_arbitrage_get","responses":{"200":{"description":"Latest cached arbitrage report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageResponse"}}}},"402":{"description":"Payment required (x402 v2): no credentials, underfunded Skyfire token, or declined payment. The same challenge is mirrored Base64-encoded in the `Payment-Required` response header.","headers":{"Payment-Required":{"description":"Base64(JSON) x402 v2 PaymentRequired object.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"string"},"description":"Wallet paywall page, served to browsers."}}},"403":{"description":"Skyfire token is invalid, expired or failed signature verification."},"503":{"description":"Feed cache is empty or a dependency is unavailable; retry shortly."}},"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"50000","price":"$0.05","currency":"USDC","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","headers":{"challenge":"Payment-Required","payment":"PAYMENT-SIGNATURE","receipt":"X-402-Payment-Receipt"},"gateways":["skyfire","coinbase-x402-v2","agentcash"]},"x-skyfire-token-type":["kya","pay","kya-pay"],"parameters":[{"name":"kyapay-token","in":"header","required":false,"schema":{"type":"string"},"description":"Skyfire token header. This service accepts kya, pay, or kya-pay tokens. kya = free 2-route sample (never charged); pay / kya-pay = full live data, charged $0.05 after delivery.","x-skyfire-token-type":["kya","pay","kya-pay"]},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"x402 v2 payment payload (Base64 JSON), USDC on Base (eip155:8453). Request without credentials first to receive the challenge in the `Payment-Required` header."},{"name":"X-402-Payment-Receipt","in":"header","required":false,"schema":{"type":"string"},"description":"AgentCash / relay-issued signed payment receipt: v1.<base64url payload>.<hmac-sha256>."}]}},"/v1/dex/chain/{chain_name}":{"get":{"tags":["DEX Arbitrage"],"summary":"Peg health and arbitrage routes touching one chain","operationId":"dex_chain_v1_dex_chain__chain_name__get","parameters":[{"name":"chain_name","in":"path","required":true,"schema":{"type":"string","description":"One of: base, arbitrum, solana.","examples":["base"],"title":"Chain Name"},"description":"One of: base, arbitrum, solana."},{"name":"kyapay-token","in":"header","required":false,"schema":{"type":"string"},"description":"Skyfire token header. This service accepts kya, pay, or kya-pay tokens. kya = free 2-route sample (never charged); pay / kya-pay = full live data, charged $0.05 after delivery.","x-skyfire-token-type":["kya","pay","kya-pay"]},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"x402 v2 payment payload (Base64 JSON), USDC on Base (eip155:8453). Request without credentials first to receive the challenge in the `Payment-Required` header."},{"name":"X-402-Payment-Receipt","in":"header","required":false,"schema":{"type":"string"},"description":"AgentCash / relay-issued signed payment receipt: v1.<base64url payload>.<hmac-sha256>."}],"responses":{"200":{"description":"Chain-scoped slice of the latest report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required (x402 v2): no credentials, underfunded Skyfire token, or declined payment. The same challenge is mirrored Base64-encoded in the `Payment-Required` response header.","headers":{"Payment-Required":{"description":"Base64(JSON) x402 v2 PaymentRequired object.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}},"text/html":{"schema":{"type":"string"},"description":"Wallet paywall page, served to browsers."}}},"403":{"description":"Skyfire token is invalid, expired or failed signature verification."},"503":{"description":"Feed cache is empty or a dependency is unavailable; retry shortly."}},"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]},"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"50000","price":"$0.05","currency":"USDC","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","headers":{"challenge":"Payment-Required","payment":"PAYMENT-SIGNATURE","receipt":"X-402-Payment-Receipt"},"gateways":["skyfire","coinbase-x402-v2","agentcash"]},"x-skyfire-token-type":["kya","pay","kya-pay"]}}},"components":{"schemas":{"ArbitrageResponse":{"properties":{"status":{"type":"string","enum":["ok","partial"],"title":"Status"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"model_used":{"type":"string","title":"Model Used"},"chains_monitored":{"items":{"type":"string","enum":["Base","Arbitrum","Solana"]},"type":"array","title":"Chains Monitored"},"stablecoin_peg_health":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object","title":"Stablecoin Peg Health"},"arbitrage_routes":{"items":{"$ref":"#/components/schemas/ArbitrageRoute"},"type":"array","title":"Arbitrage Routes"},"summary":{"anyOf":[{"$ref":"#/components/schemas/SignalSummary"},{"type":"null"}]},"peg_monitor":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/PegReading"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Peg Monitor"},"alerts":{"items":{"$ref":"#/components/schemas/PegAlert"},"type":"array","title":"Alerts"},"methodology":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Methodology"},"access_tier":{"type":"string","enum":["live","sample"],"title":"Access Tier"},"upgrade":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Upgrade"}},"type":"object","required":["status","generated_at","model_used","chains_monitored","stablecoin_peg_health","arbitrage_routes","access_tier"],"title":"ArbitrageResponse"},"ArbitrageRoute":{"properties":{"pair":{"type":"string","maxLength":32,"minLength":3,"title":"Pair","description":"Asset quoted in USD, e.g. 'USDC/USD'."},"source_chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Source Chain","description":"Chain where the asset is cheaper (buy side)."},"target_chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Target Chain","description":"Chain where the asset is dearer (sell side)."},"spread_bps":{"type":"integer","minimum":0.0,"title":"Spread Bps","description":"Cross-chain price gap in basis points."},"optimal_dex_router":{"type":"string","maxLength":120,"minLength":3,"title":"Optimal Dex Router","description":"e.g. 'Aerodrome -> Camelot', 'Jupiter -> Uniswap v3'."},"slippage_risk":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"title":"Slippage Risk"},"confidence_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence Score","description":"0.00 - 1.00"},"execution_note":{"type":"string","maxLength":320,"minLength":5,"title":"Execution Note","description":"One-sentence execution note."},"estimated_cost_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cost Bps","description":"Assumed execution cost: 2 DEX legs + bridge + fixed gas at a $10k reference size."},"net_spread_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Spread Bps","description":"spread_bps minus estimated_cost_bps."},"breakeven_notional_usd":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Breakeven Notional Usd","description":"Trade size above which fixed costs no longer consume the edge; null if never."},"actionable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Actionable","description":"True when net_spread_bps > 0."}},"type":"object","required":["pair","source_chain","target_chain","spread_bps","optimal_dex_router","slippage_risk","confidence_score","execution_note"],"title":"ArbitrageRoute"},"ChainResponse":{"properties":{"status":{"type":"string","title":"Status"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"model_used":{"type":"string","title":"Model Used"},"chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Chain"},"stablecoin_peg_health":{"additionalProperties":{"type":"number"},"type":"object","title":"Stablecoin Peg Health"},"peg_monitor":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/PegReading"},"type":"object"},{"type":"null"}],"title":"Peg Monitor"},"alerts":{"items":{"$ref":"#/components/schemas/PegAlert"},"type":"array","title":"Alerts","default":[]},"arbitrage_routes":{"items":{"$ref":"#/components/schemas/ChainRoute"},"type":"array","title":"Arbitrage Routes"},"route_count":{"type":"integer","title":"Route Count"},"access_tier":{"type":"string","enum":["live","sample"],"title":"Access Tier"},"upgrade":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Upgrade"}},"type":"object","required":["status","generated_at","model_used","chain","stablecoin_peg_health","arbitrage_routes","route_count","access_tier"],"title":"ChainResponse"},"ChainRoute":{"properties":{"pair":{"type":"string","maxLength":32,"minLength":3,"title":"Pair","description":"Asset quoted in USD, e.g. 'USDC/USD'."},"source_chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Source Chain","description":"Chain where the asset is cheaper (buy side)."},"target_chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Target Chain","description":"Chain where the asset is dearer (sell side)."},"spread_bps":{"type":"integer","minimum":0.0,"title":"Spread Bps","description":"Cross-chain price gap in basis points."},"optimal_dex_router":{"type":"string","maxLength":120,"minLength":3,"title":"Optimal Dex Router","description":"e.g. 'Aerodrome -> Camelot', 'Jupiter -> Uniswap v3'."},"slippage_risk":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"title":"Slippage Risk"},"confidence_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence Score","description":"0.00 - 1.00"},"execution_note":{"type":"string","maxLength":320,"minLength":5,"title":"Execution Note","description":"One-sentence execution note."},"estimated_cost_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cost Bps","description":"Assumed execution cost: 2 DEX legs + bridge + fixed gas at a $10k reference size."},"net_spread_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Spread Bps","description":"spread_bps minus estimated_cost_bps."},"breakeven_notional_usd":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Breakeven Notional Usd","description":"Trade size above which fixed costs no longer consume the edge; null if never."},"actionable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Actionable","description":"True when net_spread_bps > 0."},"role":{"type":"string","enum":["source","target"],"title":"Role"}},"type":"object","required":["pair","source_chain","target_chain","spread_bps","optimal_dex_router","slippage_risk","confidence_score","execution_note","role"],"title":"ChainRoute"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PegAlert":{"properties":{"chain":{"type":"string","enum":["Base","Arbitrum","Solana"],"title":"Chain"},"asset":{"type":"string","title":"Asset"},"price":{"type":"number","title":"Price"},"deviation_bps":{"type":"number","title":"Deviation Bps"},"severity":{"type":"string","enum":["WATCH","ALERT","CRITICAL"],"title":"Severity"}},"type":"object","required":["chain","asset","price","deviation_bps","severity"],"title":"PegAlert"},"PegReading":{"properties":{"price":{"type":"number","title":"Price"},"deviation_bps":{"type":"number","title":"Deviation Bps","description":"Signed deviation from $1.00 in basis points."},"status":{"type":"string","enum":["NORMAL","WATCH","ALERT","CRITICAL"],"title":"Status"}},"type":"object","required":["price","deviation_bps","status"],"title":"PegReading"},"SignalSummary":{"properties":{"actionable_routes":{"type":"integer","title":"Actionable Routes"},"best_net_spread_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Net Spread Bps"},"signal":{"type":"string","enum":["NONE","WEAK","MODERATE","STRONG"],"title":"Signal"},"note":{"type":"string","title":"Note"}},"type":"object","required":["actionable_routes","best_net_spread_bps","signal","note"],"title":"SignalSummary"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"SkyfireToken":{"type":"apiKey","in":"header","name":"kyapay-token","description":"Skyfire token header. This service accepts kya, pay, or kya-pay tokens. `kya` = free sample (never charged); `pay` / `kya-pay` = full live data, charged after delivery. The hid / apd / aid identity claims are optional. Verified against https://app.skyfire.xyz/.well-known/jwks.json (ES256).","x-skyfire-token-type":["kya","pay","kya-pay"]}}},"x-agentcash-guidance":{"llmsTxtUrl":"https://dex.rdxdata.xyz/llms.txt"},"x-skyfire-token-type":["kya","pay","kya-pay"],"x-x402":{"x402Version":2,"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bda02913","amount":"50000","price":"$0.05","currency":"USDC","payTo":"0xA0f3bab8f298766610005F2BCcDef6964b40b5e6","headers":{"challenge":"Payment-Required","payment":"PAYMENT-SIGNATURE","receipt":"X-402-Payment-Receipt"},"gateways":["skyfire","coinbase-x402-v2","agentcash"]},"extensions":{"bazaar":{"info":{"input":{"type":"http","method":"GET"},"output":{"type":"json","example":{"status":"ok","generated_at":"2026-01-01T00:00:00Z","model_used":"rdx-dex-engine-v2","chains_monitored":["Base","Arbitrum","Solana"],"stablecoin_peg_health":{"Base":{"USDC":0.9998},"Arbitrum":{"USDC":1.0004,"USDT":0.9996},"Solana":{"USDC":1.0001,"USDT":0.9999}},"arbitrage_routes":[{"pair":"USDC/USD","source_chain":"Base","target_chain":"Arbitrum","spread_bps":6,"optimal_dex_router":"Aerodrome -> Camelot","slippage_risk":"LOW","confidence_score":0.72,"execution_note":"Bridge latency and gas can consume most of a 6 bps gap, so size trades accordingly.","estimated_cost_bps":3.5,"net_spread_bps":2.5,"breakeven_notional_usd":1667,"actionable":true}],"summary":{"actionable_routes":1,"best_net_spread_bps":2.5,"signal":"WEAK","note":"1 route(s) clear estimated costs; best net spread 2.5 bps."},"alerts":[],"access_tier":"live"}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["GET","HEAD","DELETE"]}},"required":["type","method"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"status":{"type":"string","enum":["ok","partial"]},"generated_at":{"type":"string"},"model_used":{"type":"string"},"chains_monitored":{"type":"array","items":{"type":"string","enum":["Base","Arbitrum","Solana"]}},"stablecoin_peg_health":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}},"arbitrage_routes":{"type":"array","items":{"type":"object","properties":{"pair":{"type":"string"},"source_chain":{"type":"string","enum":["Base","Arbitrum","Solana"]},"target_chain":{"type":"string","enum":["Base","Arbitrum","Solana"]},"spread_bps":{"type":"integer","minimum":0},"optimal_dex_router":{"type":"string"},"slippage_risk":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"confidence_score":{"type":"number","minimum":0,"maximum":1},"execution_note":{"type":"string"},"estimated_cost_bps":{"type":"number"},"net_spread_bps":{"type":"number"},"breakeven_notional_usd":{"type":["integer","null"]},"actionable":{"type":"boolean"}},"required":["pair","source_chain","target_chain","spread_bps","optimal_dex_router","slippage_risk","confidence_score","execution_note"]}},"summary":{"type":"object","properties":{"actionable_routes":{"type":"integer","minimum":0},"best_net_spread_bps":{"type":["number","null"]},"signal":{"type":"string","enum":["NONE","WEAK","MODERATE","STRONG"]},"note":{"type":"string"}}},"peg_monitor":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"object","properties":{"price":{"type":"number"},"deviation_bps":{"type":"number"},"status":{"type":"string","enum":["NORMAL","WATCH","ALERT","CRITICAL"]}}}}},"alerts":{"type":"array","items":{"type":"object","properties":{"chain":{"type":"string","enum":["Base","Arbitrum","Solana"]},"asset":{"type":"string"},"price":{"type":"number"},"deviation_bps":{"type":"number"},"severity":{"type":"string","enum":["WATCH","ALERT","CRITICAL"]}}}},"access_tier":{"type":"string","enum":["live","sample"]}},"required":["status","generated_at","chains_monitored","stablecoin_peg_health","arbitrage_routes"]}},"required":["type"]}},"required":["input"]}}}}