{
  "version": "0.1.0",
  "name": "AttaGo Crypto Trading Signals",
  "description": "Real-time Go/No-Go scoring for 50+ crypto assets with tiered derivatives coverage. Spot scores, perpetual futures scores (Top 8 to all tokens by tier), confidence levels, and Fear & Greed index. Paid tiers update every 30 seconds; free tier every 5 minutes. Two access modes: stateless x402 pay-per-request (no account) or registered account with tier-based subscriptions.",
  "openapi_source": "/docs/openapi.yaml",
  "authentication": {
    "x402": {
      "description": "Pay-per-request via x402 USDC micropayments. No account required — payment IS authentication.",
      "pricing": {
        "agent_score": "$0.10 USDC per request",
        "agent_data": "$0.45 USDC per request"
      },
      "dataTier": "business",
      "dataTierNote": "x402 requests always receive business-tier data (all futures tokens).",
      "flow": "Send request -> receive HTTP 402 with PAYMENT-REQUIRED header -> sign USDC payment -> retry with PAYMENT-SIGNATURE header",
      "libraries": ["@x402/fetch", "@x402/evm", "@x402/svm"]
    },
    "cognito": {
      "description": "Agents can register for a tier-based subscription via Cognito API (no browser required). Subscriptions offer discounts over pay-per-request for high-volume agents.",
      "flow": [
        "1. SignUp: POST to Cognito with email + password (programmatic, no browser needed)",
        "2. ConfirmSignUp: Confirm with the 6-digit code sent to email",
        "3. InitiateAuth: Sign in with USER_PASSWORD_AUTH flow to get JWT tokens",
        "4. Use the IdToken as Authorization: Bearer header on all /v1/ endpoints"
      ],
      "tokenRefresh": "Tokens expire in 1 hour. Use RefreshToken with REFRESH_TOKEN_AUTH flow to renew.",
      "subscriptionEndpoint": "POST /v1/payments/subscribe (x402-settled)"
    },
    "economics": {
      "payPerRequest": "At $0.10/score, 10 requests/day = ~$30/month, 480 requests/day = ~$144/month",
      "businessSubscription": "$60/month includes 250 free data pushes, alerts, webhooks",
      "breakEven": "~600 x402 requests/month ($60) equals Business subscription cost",
      "recommendation": "Agents making >600 requests/month save money with a Business subscription"
    }
  },
  "registeredAgentFeatures": [
    "Tier-specific data: Free=Top 8, Basic=Top 16, Pro=Top 32, Business=All futures tokens",
    "Alert subscriptions with 25 configurable metrics and real-time evaluation",
    "Webhook delivery for automated trading signals (Pro+ tiers, up to 10 endpoints)",
    "Prepaid data-push bundles (60-800 credits, never expire, as low as $0.06/push)",
    "Web push notifications (up to 10 devices on Business tier)",
    "30-second data refresh (vs 5-minute for free tier)"
  ],
  "payment": {
    "protocol": "x402",
    "version": 2,
    "asset": "USDC",
    "networks": [
      "eip155:8453",
      "eip155:43114",
      "eip155:137",
      "eip155:42161",
      "eip155:10",
      "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
    ],
    "facilitator": "https://facilitator.payai.network"
  },
  "chains": {
    "get_asset_score": {
      "description": "Get derived scoring data for a single crypto asset (business-tier: all futures tokens)",
      "agent_instructions": "Call GET /v1/agent/score?symbol={SYMBOL} with an x402 PAYMENT-SIGNATURE header. Returns derived scoring data: normalized composite score (0-100), GO/NO-GO/NEUTRAL signal, spot/perps sub-scores with component bands, categorical context labels (funding, positioning, OI trend, basis spread, liquidation pressure), market regime, and signalId for dedup. schemaVersion 2.0. No raw provider numerics. Response includes derivSymbols listing which futures tokens are covered. Data refreshes every 30s. Costs $0.10 USDC per request.",
      "steps": [
        { "endpoint": "/v1/agent/score", "method": "GET", "params": { "symbol": "{asset_symbol}" } }
      ]
    },
    "get_full_market_data": {
      "description": "Get derived scoring data for all tracked crypto assets (business-tier: all futures tokens)",
      "agent_instructions": "Call GET /v1/agent/data with an x402 PAYMENT-SIGNATURE header. Optionally filter with ?symbols=BTC,ETH,SOL. Returns multi-asset derived response: assets keyed by symbol with composite scores, spot/perps sub-scores, component bands, and context labels. Market regime, sources, and meta hoisted to root. schemaVersion 2.0. No raw provider numerics. Each asset includes derivSymbols listing its covered futures tokens. Data refreshes every 30s. Costs $0.45 USDC per request.",
      "steps": [
        { "endpoint": "/v1/agent/data", "method": "GET" }
      ]
    },
    "get_single_token_data": {
      "description": "Get derived scoring data for a specific token via per-request x402 payment",
      "agent_instructions": "Call GET /v1/api/data/{TOKEN} with an x402 PAYMENT-SIGNATURE header. Returns derived scoring data: composite score, spot/perps sub-scores with component bands, categorical context labels, and market regime. schemaVersion 2.0. No raw provider numerics. Costs $0.10 USDC for registered users.",
      "steps": [
        { "endpoint": "/v1/api/data/{token}", "method": "GET" }
      ]
    }
  }
}
