{"openapi":"3.1.0","info":{"title":"AgentFX","version":"1.0.0","description":"Headless perp execution for autonomous AI agents. No browser, no wallet popup — register, get an API key, place orders. Routed venue: Hyperliquid. Flat fee: 0.01% (1 bps) taker."},"servers":[{"url":"https://jdufibzebfwymvnyunti.functions.supabase.co/fx-api"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{"apiKey":[]}],"paths":{"/v1/system/status":{"get":{"summary":"Heartbeat / venue health (public, no auth)","responses":{"200":{"description":"ok"}}},"post":{"summary":"Heartbeat / venue health — accepts empty body for naïve probe clients (public, no auth)","responses":{"200":{"description":"ok"}}}},"/v1/instruments":{"get":{"summary":"Tradable symbols (perps) + max leverage","responses":{"200":{"description":"ok"}}}},"/v1/venues":{"get":{"summary":"Routed venues (currently: hyperliquid)","responses":{"200":{"description":"ok"}}}},"/v1/quotes":{"get":{"summary":"Snapshot bid/ask","parameters":[{"name":"symbols","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/v1/enroll/config":{"get":{"summary":"Public on-chain addresses (agent signer, builder, chain) needed before approveAgent + approveBuilderFee","responses":{"200":{"description":"ok"}}}},"/v1/market-risk":{"get":{"summary":"Live HL spread/funding/depth/oracle-deviation snapshot (public)","parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/v1/register":{"post":{"summary":"Create an AgentFX account (JWT)","responses":{"200":{"description":"ok"}}}},"/v1/keys":{"post":{"summary":"Mint an API key (JWT, scopes: trade,read)","responses":{"200":{"description":"ok"}}}},"/v1/account":{"get":{"summary":"Equity, margin, balance, fee tier","responses":{"200":{"description":"ok"}}}},"/v1/limits":{"get":{"summary":"Read account caps + risk thresholds","responses":{"200":{"description":"ok"}}},"put":{"summary":"Update account caps + risk thresholds (spread/slippage/funding/correlation/vol-sizing)","responses":{"200":{"description":"ok"}}}},"/v1/policy":{"get":{"summary":"Read agent governance policy","responses":{"200":{"description":"ok"}}},"put":{"summary":"Update agent governance policy (rate limits, cooldown, flip cap, hours, min equity, min confidence, anomaly action)","responses":{"200":{"description":"ok"}}}},"/v1/intent-log":{"get":{"summary":"Recent agent intent fingerprints + outcomes (30d retention)","responses":{"200":{"description":"ok"}}}},"/v1/enroll/hyperliquid":{"post":{"summary":"BYOW: register your own wallet (must approveAgent + approveBuilderFee first)","responses":{"200":{"description":"ok"}}}},"/v1/enroll/status":{"get":{"summary":"Live on-chain re-verification of approveAgent + approveBuilderFee","responses":{"200":{"description":"ok"}}}},"/v1/deposit-address":{"get":{"summary":"Your own hl_address — fund it directly on Arbitrum One (native USDC)","responses":{"200":{"description":"ok"}}}},"/v1/balance":{"get":{"summary":"Live HL accountValue + withdrawable USDC","responses":{"200":{"description":"ok"}}}},"/v1/orders":{"get":{"summary":"List caller's submitted intents","responses":{"200":{"description":"ok"}}},"post":{"summary":"Place perp order — headless, platform-signed via your approveAgent grant","responses":{"200":{"description":"ok"}}}},"/v1/orders/simulate":{"post":{"summary":"Dry-run preflight + policy + anomaly + risk engine; no submit","responses":{"200":{"description":"ok"}}}},"/v1/orders/{id}":{"delete":{"summary":"Cancel working HL order by intent id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/v1/positions":{"get":{"summary":"Live HL positions for your wallet","responses":{"200":{"description":"ok"}}}},"/v1/positions/{coin}/close":{"post":{"summary":"Submit opposite-side market order to flatten a position","parameters":[{"name":"coin","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok"}}}},"/v1/stream-token":{"post":{"summary":"Mint 60s WebSocket token for live quotes","responses":{"200":{"description":"ok"}}}}}}