{"name":"Portfolio Risk Copilot","description":"Autonomous portfolio risk auditing agent. Analyzes holdings, scores risk, and enforces non-overridable risk gates before any trade execution.","version":"0.1.0","category":"Finance","service":{"name":"Portfolio Risk Audit Service","description":"Runs a comprehensive portfolio audit: fetches account balances and positions, evaluates risk exposure, applies non-overridable risk gates, and returns a detailed audit report with risk scores and position analysis. The service is hired via the /hire endpoint.","type":"A2MCP","endpoint":"https://api.tarstrade.xyz/hire","request":{"method":"POST","parameters":["mode (string, required): Audit mode - 'demo' for testnet data or 'live' for real account. Example: \"demo\"","profile_mode (string, required): Profile mode - 'demo' or 'live'. Example: \"demo\"","inst_type (string, optional): Instrument type filter for leverage/positions check - 'SWAP', 'FUTURES', or 'OPTION'. Example: \"SWAP\"","balance_data (object, optional): Pre-gathered balance data from 'okx account balance-all --json'. Required for data-forwarding mode (production). Example: {\"data\": [{\"ccy\": \"USDT\", \"availBal\": \"10000\"}]}","positions_data (array, optional): Pre-gathered positions data from 'okx account positions --json'. Array of position objects. Example: [{\"instId\": \"BTC-USDT-SWAP\", \"pos\": \"0.1\", \"avgPx\": \"50000\"}]"],"example":"curl -X POST https://api.tarstrade.xyz/hire \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Agent-Token: YOUR_AGENT_TOKEN\" \\\n  -d '{\n    \"mode\": \"own_account\",\n    \"profile_mode\": \"demo\",\n    \"inst_type\": \"SWAP\",\n    \"balance_data\": {\"data\": [{\"ccy\": \"USDT\", \"availBal\": \"10000\"}]},\n    \"positions_data\": [{\"instId\": \"BTC-USDT-SWAP\", \"pos\": \"0.1\", \"avgPx\": \"50000\"}]\n  }'"},"response":{"description":"Returns a comprehensive audit report with risk scores, position analysis, and leverage checks.","example":"{\n  \"total_equity_usd\": 10000.0,\n  \"risk_score\": 45,\n  \"positions\": [{\"asset\": \"BTC\", \"size\": 0.1, \"leverage\": 2.0, \"unrealized_pnl\": 150.0}],\n  \"risk_violations\": [],\n  \"risk_report_id\": \"risk-123\",\n  \"timestamp\": 1699999999.0\n}"}},"endpoints":[{"path":"/.well-known/agent-card.json","method":"GET","description":"A2A-compatible discovery card (I4): capabilities, tool catalog with"},{"path":"/.well-known/x402","method":"GET","description":"x402 payment discovery (I4): which routes are paid and on what terms."},{"path":"/api/v1/billing/moove-link","method":"POST","description":"Create a Moove Receive payment link for a value action. Returns"},{"path":"/api/v1/billing/moove-link/{link_id}","method":"GET","description":"Public link lookup (no key needed — mirrors Moove's unauthenticated"},{"path":"/api/v1/billing/moove-links","method":"GET","description":"Reconciliation source: newest-first page (10 fixed) of the"},{"path":"/api/v1/billing/status/{link_id}","method":"GET","description":"Reconciliation verdict for one link: settled or not, with amounts"},{"path":"/api/v1/curator-profile","method":"GET","description":"Read-only: active curator profile with the resolve knobs for the next"},{"path":"/api/v1/estimate","method":"GET","description":"Cost estimate before a value action (I6): show price before asking"},{"path":"/api/v1/injective/funding","method":"GET","description":"Live Injective funding readout for the dashboard (read-only, no key)."},{"path":"/api/v1/metrics","method":"GET","description":"Structured metrics snapshot (S3): counters, gauges, heartbeat, and"},{"path":"/api/v1/pricing","method":"GET","description":"Full x402 price card (I3): every priced route with tier and USDC"},{"path":"/api/v1/rails","method":"GET","description":"Multichain rail status for the dashboard (public, never leaks keys)."},{"path":"/api/v1/validation","method":"GET","description":"Read-only: the strategy-validation pipeline gate (walk-forward + PBO +"},{"path":"/api/v1/vault/attest","method":"POST","description":"Operator triggers attestTotalAssets on the vault contract."},{"path":"/api/v1/vault/reconciliation","method":"GET","description":"Operator-only reconciliation snapshot: vault totalAssets vs OKX balance."},{"path":"/audit-stats","method":"GET","description":"Query onchain audit trail for recent decisions and executions."},{"path":"/funding-arb-status","method":"GET","description":"Return current funding rates and arb package status for all assets."},{"path":"/health","method":"GET","description":"Liveness + heartbeat (S2): distinguishes \"no cycle ran\" (heartbeat"},{"path":"/hire","method":"POST","description":"Run a portfolio audit: analyze holdings, score risk, log the decision trail."},{"path":"/kill-switch","method":"GET","description":"Current kill switch status. Checks the off-chain gate; also checks the"},{"path":"/kill-switch/activate","method":"POST","description":"Halt all trading immediately. Always activates the off-chain gate;"},{"path":"/kill-switch/deactivate","method":"POST","description":"Resume trading. A deliberate, separate call — this is never triggered"},{"path":"/manifest","method":"GET","description":"Serve the ASP manifest for okx.ai agent registration."},{"path":"/positions","method":"GET","description":"Fetch live positions from OKX. Returns per-asset position data"},{"path":"/risk-stats","method":"GET","description":"Get current daily risk statistics for the agent."},{"path":"/trade","method":"POST","description":"Run a trading cycle: generate signals → pass risk checks → log onchain → execute."}],"permissions":["trade:execute","trade:place_order","trade:cancel_order"],"capabilities":["market_analysis","signal_generation","risk_management","trade_execution","portfolio_audit"],"chain":"xlayer","openapi_generated":"2026-09-26T16:58:06.838783Z","live_mode_enabled":false}