{"name":"TARS Autonomous Trader","description":"Autonomous portfolio risk copilot and trading agent. Audits holdings, scores risk, and enforces non-overridable risk gates before any order; every decision is written to an onchain audit trail.","version":"0.2.0","category":"Finance","service":{"name":"TARS Portfolio Risk Audit","description":"Runs a comprehensive portfolio audit over data the caller forwards: scores concentration, leverage and position risk, applies the same non-overridable risk gates used before live orders, and returns a structured report plus a markdown summary. No server-side credentials required in data-forwarding mode. Hire it via POST /hire.","type":"A2MCP","endpoint":"https://api.tarstrade.xyz/hire","request":{"method":"POST","content_type":"application/json","parameters":["mode (string, optional): 'own_account' (default) audits the data you forward; 'demo' / 'live' are shorthands for profile_mode. Unknown values are rejected with 422.","profile_mode (string, optional): 'demo' (default) or 'live'. 'live' requires ALLOW_LIVE=true on the deployment.","inst_type (string, optional): 'SWAP', 'FUTURES' or 'OPTION' — limits the leverage/positions check to that instrument type.","balance_data (object, required for data-forwarding): output of `okx account balance-all --json`. The {'data': [...]} envelope is accepted, as is a single account row {'trading': {...}}. balance_data.trading.totalEq is required.","positions_data (array or object, optional): output of `okx account positions --json` — either the array of positions or the {'data': [...]} envelope."],"example":"curl -X POST https://api.tarstrade.xyz/hire \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"mode\": \"own_account\",\n  \"profile_mode\": \"demo\",\n  \"inst_type\": \"SWAP\",\n  \"balance_data\": {\n    \"trading\": {\n      \"totalEq\": \"10000\",\n      \"details\": [\n        {\n          \"ccy\": \"USDT\",\n          \"availBal\": \"9000\",\n          \"cashBal\": \"10000\",\n          \"eq\": \"10000\",\n          \"upl\": \"0\"\n        },\n        {\n          \"ccy\": \"BTC\",\n          \"availBal\": \"0.05\",\n          \"cashBal\": \"0.05\",\n          \"eq\": \"3300\",\n          \"upl\": \"120\"\n        }\n      ]\n    }\n  },\n  \"positions_data\": [\n    {\n      \"instId\": \"BTC-USDT-SWAP\",\n      \"pos\": \"0.1\",\n      \"avgPx\": \"50000\",\n      \"upl\": \"12.5\",\n      \"lever\": \"3\",\n      \"liqPx\": \"40000\",\n      \"mgnMode\": \"cross\"\n    }\n  ]\n}'"},"response":{"description":"Audit report: risk score, flags with severity, markdown summary, and needs_human_review. Returned synchronously.","example":"{\n  \"audit_id\": \"audit_6d1f45ffcf\",\n  \"mode\": \"data\",\n  \"authenticated\": true,\n  \"risk_score\": 0.45,\n  \"flags\": [\n    {\n      \"code\": \"CONCENTRATION\",\n      \"severity\": \"warning\",\n      \"detail\": \"USDT is 100% of trading equity\"\n    },\n    {\n      \"code\": \"HIGH_LEVERAGE\",\n      \"severity\": \"high\",\n      \"detail\": \"ETH-USDT-SWAP at 10x leverage\"\n    }\n  ],\n  \"report_md\": \"# Portfolio Risk Audit \\u2014 audit_6d1f45ffcf\\n...\",\n  \"needs_human_review\": false,\n  \"error\": null\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/rpc-fast-status","method":"GET","description":"RPC Fast sidetrack surface (7.1): configured?, plan, per-call"},{"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-10-09T05:20:39.332293Z","payment":{"protocol":"x402","network":"eip155:196","listed_prices_usdc":{"/hire":"0.50","/trade":"0.50"},"gated":false,"posture":"Launch-free: priced routes answer without payment until the operator configures PAY_TO_ADDRESS. /api/v1/pricing, /api/v1/estimate and /.well-known/x402 always report the exact enforcement state.","well_known":"/.well-known/x402"},"live_mode_enabled":false,"risk_disclosure":"Paper-trading agent. The live gate is closed (ALLOW_LIVE=false) and the G1 paper milestone is not met, so no live track record exists or is claimed. Audits and risk gates are real; trade execution is not live."}