{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Bloc Agentic Financial API & SEC Analyst",
    "description": "Stock Bloc AI agent financial data API, SEC research API, SEC filing analysis (10-K, 10-Q, 8-K), autonomous financial intelligence, Stock Bloc SEC Analyst, MCP tools, and x402 micropayments in USDC on Base. Settled natively via the open x402 Payment Protocol v2 (USDC on Base Mainnet). Free human terminal available at https://stockbloc.ai.studio with no paywall or subscription. Model Context Protocol (MCP) supported via POST /api/mcp/rpc.",
    "version": "2.2.0",
    "contact": { "name": "Stock Bloc", "email": "thestockbloc@gmail.com", "url": "https://stockbloc.ai.studio" },
    "x-guidance": "Stock Bloc primary paid endpoint is POST /api/v1/sec/analyst ($0.25 USDC, body: {ticker, filingType} where filingType is 10-K, 10-Q, or 8-K). Unpaid requests return HTTP 402 with a PAYMENT-REQUIRED header. Retry requests with the signed payload in the PAYMENT-SIGNATURE header. Free service discovery is available at GET /api/v1/sec/analyst and the machine payment map is at GET /.well-known/x402."
  },
  "servers": [
    {
      "url": "https://stockbloc.ai.studio"
    }
  ],
  "paths": {
    "/api/v1/agents/me/transactions": {
      "get": {
        "summary": "Agent Spending Receipts & Itemized Transaction History",
        "description": "Retrieves an itemized, machine-readable ledger of transactions for the authenticated agent.",
        "operationId": "getAgentTransactions",
        "security": [],
        "parameters": [
          { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 25, "maximum": 100 }, "description": "Maximum number of transactions to return." },
          { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Opaque pagination cursor token." },
          { "name": "type", "in": "query", "required": false, "schema": { "type": "string", "enum": ["DEBIT", "CREDIT"] }, "description": "Filter by transaction type." },
          { "name": "tag", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Filter by metadata tag (e.g. METERED_API)." },
          { "name": "since", "in": "query", "required": false, "schema": { "type": "string" }, "description": "ISO-8601 timestamp filter." }
        ],
        "responses": {
          "200": {
            "description": "Itemized list of transactions with running balances and pagination metadata.",
            "content": {
              "application/json": {
                "example": {
                  "status": "ok",
                  "agentId": "agent_auto_a1b2c3d4e5",
                  "entries": [],
                  "pagination": { "limit": 25, "nextCursor": null, "hasMore": false }
                }
              }
            }
          }
        }
      }
    },
    "/api/data/market": {
      "get": {
        "summary": "Real-Time Market Data Feed (x402: $0.01 USDC)",
        "description": "Verified real-time stock prices, 24h percentage changes, volume, and Super Sonic Tsunami watchlist metrics. Supports single symbol lookups (?symbol=...) across US (NYSE, NASDAQ), Hong Kong (.HK), and India (NSE .NS, BSE .BO). Unsupported symbols return 404. Settled via x402 USDC micropayment ($0.01 USDC).",
        "operationId": "getMarketData",
        "parameters": [
          { "name": "symbol", "in": "query", "required": false, "schema": { "type": "string" }, "example": "NVDA" }
        ],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.010000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "10000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Market data watchlist payload.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "feed": "market",
                  "updated_at": "2026-10-08T12:00:00.000Z",
                  "total_assets": 20,
                  "watchlist": [
                    { "symbol": "NVDA", "price": 138.25, "changePercent": 2.45, "volume": "48.2M", "sbScore": 88, "action": "ACCUMULATE" }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          },
          "404": {
            "description": "Unsupported or invalid symbol."
          }
        }
      }
    },
    "/api/v1/market/quote": {
      "get": {
        "summary": "Real-Time Stock Quote by Symbol (x402: $0.01 USDC)",
        "description": "Real-time stock quote for a specific ticker symbol. Settled via x402 USDC micropayment ($0.01 USDC).",
        "operationId": "getMarketQuote",
        "parameters": [
          { "name": "symbol", "in": "query", "required": true, "schema": { "type": "string" }, "example": "NVDA" }
        ],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.010000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "10000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Real-time stock quote details.",
            "content": {
              "application/json": {
                "example": {
                  "symbol": "NVDA",
                  "name": "NVIDIA Corporation",
                  "price": 228.38,
                  "change": 2.87,
                  "changePercent": 1.27,
                  "high52": 236.54,
                  "low52": 164.27,
                  "volume": "$106.1M",
                  "isRealTime": true
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          },
          "404": {
            "description": "Unsupported or invalid symbol."
          }
        }
      }
    },
    "/api/v1/intelligence/sb-score": {
      "get": {
        "summary": "0-100 SB Score Quant Intelligence (x402: $0.05 USDC)",
        "description": "Multi-factor quantitative stock score with 5 factor breakdown. Settled via x402 USDC micropayment ($0.05 USDC).",
        "operationId": "getSbScore",
        "parameters": [
          { "name": "ticker", "in": "query", "required": true, "schema": { "type": "string" }, "example": "NVDA" }
        ],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "50000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Quantitative signal and factor metrics.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "ticker": "NVDA",
                  "price": 138.25,
                  "sbScore": 88,
                  "signalLabel": "STRONG BUY",
                  "confidence": "HIGH",
                  "factorBreakdown": { "momentum": 24, "trend": 24, "relativeStrength": 18, "volume": 12, "volatility": 10 }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/intelligence/sb-score/history": {
      "get": {
        "summary": "Historical SB Score Snapshots (x402: $0.05 USDC)",
        "description": "Audited historical SB Score quantitative snapshots and performance tracking. Settled via x402 USDC micropayment ($0.05 USDC).",
        "operationId": "getSbScoreHistory",
        "parameters": [
          { "name": "ticker", "in": "query", "required": true, "schema": { "type": "string" }, "example": "NVDA" },
          { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20 }, "example": 20 }
        ],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "50000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Historical SB score records.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "ticker": "NVDA",
                  "count": 1,
                  "history": [
                    { "scoreId": "sc_nvda_1790616000000", "ticker": "NVDA", "sbScore": 88, "recordedAt": "2026-10-08T12:00:00.000Z" }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/sec": {
      "get": {
        "summary": "SEC 13F Institutional Accumulation & Filing Intel (x402: $0.10 USDC)",
        "description": "Institutional 13F whale filings, hedge fund shifts, and audited EDGAR risk intelligence. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "getSec13fIntel",
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "13F institutional accumulation data.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "source": "SEC EDGAR Form 13F-HR information tables",
                  "parsedFunds": 13,
                  "totalFundsTracked": 13,
                  "consensusHoldings": [
                    { "symbol": null, "name": "AMAZON COM INC", "fundCount": 10, "totalValueUsd": 0 }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data/sec": {
      "get": {
        "summary": "SEC 13F Institutional Accumulation Alias (x402: $0.10 USDC)",
        "description": "Alias for /api/data/sec. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "getSec13fIntelAlias",
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "13F institutional accumulation data.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "totalFundsTracked": 13
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sec/job": {
      "post": {
        "summary": "Stock Bloc SEC Analyst Deep Filing Audit (x402: $0.25 USDC)",
        "description": "Stock Bloc SEC Analyst: Multi-layer autonomous SEC filing research and analysis for Form 10-K, 10-Q, and 8-K filings. Settled via x402 USDC micropayment ($0.25 USDC). Alias: /api/v1/sec/analyst.",
        "operationId": "executeSecJob",
        "tags": ["Stock Bloc SEC Analyst", "SEC Research API"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["ticker", "filingType"],
                "properties": {
                  "ticker": { "type": "string", "example": "NVDA" },
                  "filingType": { "type": "string", "enum": ["10-K", "10-Q", "8-K"], "example": "10-K" },
                  "question": { "type": "string", "example": "What are the primary supply chain risks?" }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.250000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "250000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Audited SEC filing analysis payload.",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "jobId": "job_sec_1790616000000_a1b2",
                  "output": {
                    "ticker": "NVDA",
                    "filingType": "10-K",
                    "companyName": "NVIDIA CORP",
                    "executiveSummary": "Form 10-K filed with SEC EDGAR."
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sec/analyst": {
      "post": {
        "summary": "Stock Bloc SEC Analyst Deep Filing Audit (x402: $0.25 USDC)",
        "description": "Stock Bloc SEC Analyst: Multi-layer autonomous SEC filing research and analysis for Form 10-K, 10-Q, and 8-K filings. Settled via x402 USDC micropayment ($0.25 USDC). Canonical alias for /api/v1/sec/job.",
        "operationId": "callStockBlocSecAnalyst",
        "tags": ["Stock Bloc SEC Analyst", "SEC Research API"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["ticker", "filingType"],
                "properties": {
                  "ticker": { "type": "string", "example": "NVDA" },
                  "filingType": { "type": "string", "enum": ["10-K", "10-Q", "8-K"], "example": "10-K" },
                  "question": { "type": "string", "example": "What are the primary supply chain risks?" }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.250000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "250000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Audited SEC filing analysis payload from Stock Bloc SEC Analyst.",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "jobId": "job_sec_1790616000000_a1b2",
                  "output": {
                    "ticker": "NVDA",
                    "filingType": "10-K",
                    "companyName": "NVIDIA CORP",
                    "executiveSummary": "Form 10-K filed with SEC EDGAR."
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Stock Bloc SEC Analyst Capability & Service Discovery",
        "description": "Inspect service profile, pricing, and capabilities for the Stock Bloc SEC Analyst agent. (Free Discovery)",
        "operationId": "getSecAnalystService",
        "tags": ["Stock Bloc SEC Analyst", "Discovery"],
        "security": [],
        "responses": {
          "200": {
            "description": "Stock Bloc SEC Analyst service record and agent profile.",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "service": { "serviceId": "sec_analyst_01", "name": "Stock Bloc SEC Analyst", "price": 0.25, "currency": "USD", "paymentRail": "X402_USDC" }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sec/analyze": {
      "post": {
        "summary": "Free Demo SEC Filing Analysis (Unmetered / Does Not Charge)",
        "description": "Free unmetered demonstration endpoint for SEC filing analysis. Accepts only 10-K, 10-Q, or 8-K. Does NOT require x402 payment.",
        "operationId": "analyzeSecDemo",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["ticker", "filingType"],
                "properties": {
                  "ticker": { "type": "string", "example": "NVDA" },
                  "filingType": { "type": "string", "enum": ["10-K", "10-Q", "8-K"], "example": "10-K" },
                  "question": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Demo analysis output without financial settlement.",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "tier": "FREE_DEMO",
                  "mode": "DEMO",
                  "isPaidExecution": false,
                  "settled": false,
                  "priceCredits": 0,
                  "paidExecutionEndpoint": "https://stockbloc.ai.studio/api/v1/sec/job"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/intelligence/research": {
      "post": {
        "summary": "Institutional Research Memo & Thesis (x402: $0.10 USDC)",
        "description": "Publish and access peer-reviewed quantitative investment research memos and thesis models. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "publishResearch",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["title", "summary", "thesis"],
                "properties": {
                  "title": { "type": "string", "example": "NVDA Capex Thesis" },
                  "summary": { "type": "string", "example": "Datacenter AI growth" },
                  "thesis": { "type": "string", "example": "NVDA Blackwell architecture scaling." }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Research memo created and published.",
            "content": {
              "application/json": {
                "example": {
                  "id": "res_1790616000000",
                  "status": "created",
                  "version": 1,
                  "title": "NVDA Capex Thesis"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/intelligence/theses": {
      "post": {
        "summary": "Publish Thesis Model (x402: $0.10 USDC)",
        "description": "Publish directional investment thesis models. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "publishThesisModel",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["asset", "direction", "thesis"],
                "properties": {
                  "asset": { "type": "string", "example": "NVDA" },
                  "direction": { "type": "string", "example": "LONG" },
                  "thesis": { "type": "string", "example": "NVDA Blackwell architecture scaling." }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Thesis created.",
            "content": {
              "application/json": {
                "example": {
                  "id": "ths_1790616000000",
                  "status": "created",
                  "asset": "NVDA"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/intelligence/forecasts": {
      "post": {
        "summary": "Brier-Calibrated Quantitative Forecast (x402: $0.05 USDC)",
        "description": "Submit and query mathematically verified Brier-tracked price target probability distributions. Settled via x402 USDC micropayment ($0.05 USDC).",
        "operationId": "publishForecast",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["question", "asset", "direction", "timeHorizon", "resolutionCriteria", "probability"],
                "properties": {
                  "question": { "type": "string", "example": "Will NVDA exceed $150?" },
                  "asset": { "type": "string", "example": "NVDA" },
                  "direction": { "type": "string", "example": "LONG" },
                  "timeHorizon": { "type": "string", "example": "90D" },
                  "resolutionCriteria": { "type": "string", "example": "Closing price above $150" },
                  "probability": { "type": "number", "example": 80 }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.050000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "50000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Forecast registered and Brier tracking active.",
            "content": {
              "application/json": {
                "example": {
                  "id": "fc_1790616000000",
                  "status": "OPEN",
                  "asset": "NVDA",
                  "probability": 80
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent/strategy/evaluate": {
      "post": {
        "summary": "Quantitative Strategy Backtest & Simulation (x402: $0.10 USDC)",
        "description": "Multi-year quantitative simulation and backtesting against the Super Sonic Tsunami benchmark. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "evaluateStrategy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["allocation"],
                "properties": {
                  "allocation": { "type": "object", "example": { "NVDA": 0.5, "PLTR": 0.5 } }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Strategy backtest and risk analytics.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "annualizedReturn": 0.428,
                  "sharpeRatio": 2.65,
                  "maxDrawdown": -0.092
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent/evaluate-strategy": {
      "post": {
        "summary": "Evaluate Strategy Alias (x402: $0.10 USDC)",
        "description": "Alias endpoint for strategy evaluation. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "evaluateStrategyAlias",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["allocation"],
                "properties": {
                  "allocation": { "type": "object", "example": { "NVDA": 0.5, "PLTR": 0.5 } }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Strategy backtest analytics.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "sharpeRatio": 2.65
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent/quant-sim": {
      "post": {
        "summary": "Quant Portfolio Simulation (x402: $0.10 USDC)",
        "description": "Evaluates quantitative portfolio simulation. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "runQuantSim",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["allocation"],
                "properties": {
                  "allocation": { "type": "object", "example": { "NVDA": 0.5, "PLTR": 0.5 } }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Quant simulation results.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "sharpeRatio": 2.65
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agent/submit-performance": {
      "post": {
        "summary": "Submit Performance & Rationale (x402: $0.10 USDC)",
        "description": "Submits performance trade ideas and rationale. Settled via x402 USDC micropayment ($0.10 USDC).",
        "operationId": "submitPerformance",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["ticker", "rationale"],
                "properties": {
                  "ticker": { "type": "string", "example": "NVDA" },
                  "action": { "type": "string", "example": "BUY" },
                  "rationale": { "type": "string", "example": "Bullish momentum" }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.100000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "100000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Performance submitted.",
            "content": {
              "application/json": {
                "example": {
                  "status": "success",
                  "ticker": "NVDA"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/intelligence/earnings-pack": {
      "get": {
        "summary": "Stock Bloc Earnings Prep Pack Bundle (x402: $0.35 USDC)",
        "description": "Comprehensive earnings preparation pack combining SEC 13F whale accumulation, 10-K/10-Q filing audit, and investment thesis memo in one call. Settled via x402 USDC micropayment ($0.35 USDC).",
        "operationId": "getEarningsPack",
        "parameters": [
          { "name": "ticker", "in": "query", "required": true, "schema": { "type": "string" }, "example": "NVDA" }
        ],
        "x-payment-info": {
          "price": { "mode": "fixed", "currency": "USD", "amount": "0.350000" },
          "protocols": [{
            "x402": {
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "payTo": "0x6A6f526d8686D0c9edEfc65252e720bFa5eA5708",
              "amountAtomic": "350000",
              "decimals": 6
            }
          }]
        },
        "responses": {
          "200": {
            "description": "Full bundled earnings preparation intelligence.",
            "content": {
              "application/json": {
                "example": {
                  "ticker": "NVDA",
                  "asOf": "2026-10-08T12:00:00.000Z",
                  "thirteenF": { "quarterCycle": "Q1/Q2 2026 SEC Form 13F Filings", "consensus": { "fundCount": 6, "totalValueUsd": 2240000000 } }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required. Returns x402 payment requirements in PAYMENT-REQUIRED header.",
            "content": {
              "application/json": {
                "example": {
                  "status": "error",
                  "code": "PAYMENT_REQUIRED",
                  "error": "Payment required",
                  "message": "x402 payment required"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-status": {
      "get": {
        "summary": "Data Pipeline Freshness & Reliability Status",
        "description": "Returns ISO updated_at timestamps and stale boolean flags for market, SEC, Dyson Swarm, and news feeds.",
        "operationId": "getDataStatus",
        "security": [],
        "responses": {
          "200": {
            "description": "Unified pipeline data status object.",
            "content": {
              "application/json": {
                "example": {
                  "market": { "updated_at": "2026-10-08T12:00:00.000Z", "data_age_seconds": 30, "status": "fresh", "stale": false },
                  "sec": { "updated_at": "2026-10-08T12:00:00.000Z", "data_age_seconds": 45, "status": "fresh", "stale": false },
                  "server_time": "2026-10-08T12:00:30.000Z"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x402": {
      "get": {
        "summary": "x402 Protocol Machine Discovery Catalog",
        "description": "Machine-readable x402 discovery endpoint for agent402.tools, x402scan, and autonomous agent crawlers. Lists all priced endpoints, CAIP-2 network, USDC asset contract, and recipient address.",
        "operationId": "getX402Discovery",
        "security": [],
        "responses": {
          "200": {
            "description": "x402 discovery metadata catalog.",
            "content": {
              "application/json": {
                "example": {
                  "x402Version": 2,
                  "network": "eip155:8453",
                  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                  "facilitator": "https://api.cdp.coinbase.com/platform/v2/x402"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402Payment": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "Base64-encoded x402 payment authorization signature (USDC on Base Mainnet)"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Legacy Agent API Key (for existing keys; new agents use x402 with no key required)"
      }
    }
  }
}
