{
  "openapi": "3.1.0",
  "info": {
    "title": "TickersFeed",
    "version": "2.1.0",
    "description": "Pay-per-call stock, crypto, DeFi, and gas data API for AI agents — raw data + AI-powered analysis. No API keys, no subscriptions. Payments via x402 (USDC on Base).",
    "contact": {
      "url": "https://tickersfeed.net"
    }
  },
  "servers": [
    {
      "url": "https://api.tickersfeed.net",
      "description": "Production"
    }
  ],
  "paths": {
    "/stock/{symbol}": {
      "get": {
        "operationId": "getStockQuote",
        "summary": "Stock quote",
        "description": "Real-time or 15-min delayed price, OHLC, high/low, previous close, and percent change. Covers NYSE, NASDAQ, AMEX (8,400+ symbols). Add ?tier=realtime for live prices. Costs $0.003 USDC delayed, $0.010 USDC real-time.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, NVDA, MSFT)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "description": "Price tier: 'delayed' (default, 15-min delay, $0.003) or 'realtime' ($0.010)",
            "schema": {
              "type": "string",
              "enum": [
                "delayed",
                "realtime"
              ],
              "default": "delayed"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stock quote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string",
                      "example": "AAPL"
                    },
                    "tier": {
                      "type": "string",
                      "example": "delayed"
                    },
                    "price_usdc": {
                      "type": "number",
                      "example": 0.003
                    },
                    "quote": {
                      "type": "object",
                      "properties": {
                        "c": {
                          "type": "number",
                          "description": "Current price"
                        },
                        "h": {
                          "type": "number",
                          "description": "High price of the day"
                        },
                        "l": {
                          "type": "number",
                          "description": "Low price of the day"
                        },
                        "o": {
                          "type": "number",
                          "description": "Open price"
                        },
                        "pc": {
                          "type": "number",
                          "description": "Previous close price"
                        },
                        "dp": {
                          "type": "number",
                          "description": "Percent change"
                        },
                        "t": {
                          "type": "integer",
                          "description": "Timestamp (Unix)"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown symbol"
          },
          "503": {
            "description": "Upstream rate limit exceeded — retry after a moment"
          }
        },
        "x-402": {
          "price_usdc": 0.003,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/stock/{symbol}/earnings": {
      "get": {
        "operationId": "getStockEarnings",
        "summary": "Stock earnings",
        "description": "Last 4 quarters of EPS earnings — actual, estimate, surprise, and surprise percent. Costs $0.003 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, MSFT, TSLA)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Earnings history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "earnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period": {
                            "type": "string",
                            "example": "2024-09-30"
                          },
                          "actual": {
                            "type": "number",
                            "example": 1.64
                          },
                          "estimate": {
                            "type": "number",
                            "example": 1.6
                          },
                          "surprise": {
                            "type": "number",
                            "example": 0.04
                          },
                          "surprisePercent": {
                            "type": "number",
                            "example": 2.5
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Unknown symbol"
          }
        },
        "x-402": {
          "price_usdc": 0.003,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/stock/{symbol}/news": {
      "get": {
        "operationId": "getStockNews",
        "summary": "Stock news",
        "description": "Latest news articles for a US stock from the last 7 days — up to 10 articles with headline, summary, source, and URL. Costs $0.005 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, NVDA)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "News articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "date_range": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        }
                      }
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "headline": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "datetime": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Unknown symbol"
          }
        },
        "x-402": {
          "price_usdc": 0.005,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/crypto/{symbol}": {
      "get": {
        "operationId": "getCryptoPrice",
        "summary": "Crypto price",
        "description": "Crypto price, market cap, 24h volume, and percent change (1h/24h/7d). Supports 1,000+ coins. Costs $0.002 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Crypto ticker symbol (e.g. BTC, ETH, SOL, DOGE)",
            "schema": {
              "type": "string",
              "example": "BTC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Crypto market data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "market": {
                      "type": "object",
                      "properties": {
                        "price_usd": {
                          "type": "number"
                        },
                        "market_cap_usd": {
                          "type": "number"
                        },
                        "volume_24h_usd": {
                          "type": "number"
                        },
                        "change_1h": {
                          "type": "number"
                        },
                        "change_24h": {
                          "type": "number"
                        },
                        "change_7d": {
                          "type": "number"
                        },
                        "rank": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Unknown crypto symbol"
          }
        },
        "x-402": {
          "price_usdc": 0.002,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/crypto/market": {
      "get": {
        "operationId": "getCryptoMarket",
        "summary": "Global crypto market stats",
        "description": "Total market cap, 24h volume, Bitcoin dominance percentage, and active coin count. Costs $0.002 USDC.",
        "responses": {
          "200": {
            "description": "Global crypto market stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "market": {
                      "type": "object",
                      "properties": {
                        "total_market_cap_usd": {
                          "type": "number"
                        },
                        "total_volume_24h_usd": {
                          "type": "number"
                        },
                        "bitcoin_dominance_pct": {
                          "type": "number"
                        },
                        "active_cryptocurrencies": {
                          "type": "integer"
                        },
                        "market_cap_change_24h": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/crypto/stablecoins": {
      "get": {
        "operationId": "getStablecoins",
        "summary": "Stablecoin supply & peg monitor",
        "description": "USD-pegged stablecoins ranked by circulating supply, each with peg deviation from $1, backing mechanism, chains, and 7-day supply change, plus total stablecoin market cap and depeg flags. Source: DeFiLlama. Costs $0.001 USDC.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max stablecoins to return, up to 50 (default 20)",
            "schema": {
              "type": "integer",
              "example": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stablecoin supply and peg data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_stablecoin_mcap_usd": {
                      "type": "number"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "stablecoins": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "depegged": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.002,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/crypto/sentiment": {
      "get": {
        "operationId": "getCryptoSentiment",
        "summary": "Crypto Fear & Greed index",
        "description": "Crypto Fear & Greed index (0 = extreme fear, 100 = extreme greed) with today's value, classification, and 7-day trend. Source: alternative.me. Costs $0.002 USDC.",
        "responses": {
          "200": {
            "description": "Fear & Greed index with trend",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer"
                    },
                    "classification": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string"
                    },
                    "change_1d": {
                      "type": "integer"
                    },
                    "change_7d": {
                      "type": "integer"
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "scale": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.002,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/defi/yields": {
      "get": {
        "operationId": "getDefiYields",
        "summary": "DeFi yield pools",
        "description": "Top DeFi yield farming pools ranked by APY across 500+ protocols. Filterable by chain and minimum TVL. Costs $0.001 USDC.",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Filter by blockchain (e.g. ethereum, base, arbitrum)",
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          },
          {
            "name": "min_tvl",
            "in": "query",
            "required": false,
            "description": "Minimum pool TVL in USD (default 10000000)",
            "schema": {
              "type": "integer",
              "default": 10000000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results, up to 50 (default 20)",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DeFi yield pools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "pools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "project": {
                            "type": "string"
                          },
                          "chain": {
                            "type": "string"
                          },
                          "symbol": {
                            "type": "string"
                          },
                          "tvl_usd": {
                            "type": "number"
                          },
                          "apy_total": {
                            "type": "number"
                          },
                          "apy_base": {
                            "type": "number"
                          },
                          "apy_reward": {
                            "type": "number"
                          },
                          "il_risk": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/defi/protocols": {
      "get": {
        "operationId": "getDefiProtocols",
        "summary": "DeFi protocols by TVL",
        "description": "Top DeFi protocols ranked by TVL. Filterable by chain and category. Includes 1d/7d TVL change and mcap/TVL ratio. Costs $0.001 USDC.",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Filter by blockchain (e.g. ethereum, base, arbitrum)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Protocol category (DEX, Lending, Bridge, Yield, etc.)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results, up to 100 (default 20)",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DeFi protocols",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "chains": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "tvl_usd": {
                            "type": "number"
                          },
                          "change_1d": {
                            "type": "number"
                          },
                          "change_7d": {
                            "type": "number"
                          },
                          "mcap_tvl": {
                            "type": "number"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/gas": {
      "get": {
        "operationId": "getGasPrices",
        "summary": "Gas prices",
        "description": "Real-time gas prices on Ethereum and Base — base fee, priority fee, and estimated total in Gwei (EIP-1559 format). Costs $0.001 USDC.",
        "responses": {
          "200": {
            "description": "Gas prices by chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "chains": {
                      "type": "object",
                      "properties": {
                        "ethereum": {
                          "type": "object",
                          "properties": {
                            "base_fee_gwei": {
                              "type": "number"
                            },
                            "priority_fee_gwei": {
                              "type": "number"
                            },
                            "estimated_total_gwei": {
                              "type": "number"
                            },
                            "percentiles": {
                              "type": "object",
                              "properties": {
                                "p10_gwei": {
                                  "type": "number"
                                },
                                "p50_gwei": {
                                  "type": "number"
                                },
                                "p90_gwei": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        "base": {
                          "type": "object",
                          "properties": {
                            "base_fee_gwei": {
                              "type": "number"
                            },
                            "priority_fee_gwei": {
                              "type": "number"
                            },
                            "estimated_total_gwei": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/wallet/{address}/transfers": {
      "get": {
        "operationId": "getWalletTransfers",
        "summary": "Wallet token transfers",
        "description": "USDC transfer history for any wallet on Base or Ethereum, from the last 30 days. Each transfer includes block time, tx hash, sender, receiver, amount, and direction (IN/OUT). Powered by Dune Analytics. Costs $0.003 USDC.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Wallet address (0x...)",
            "schema": {
              "type": "string",
              "example": "0xE82EBef57Fa5aF958B8ECB6843D4327d314F59E3"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Blockchain to query (default: base)",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum"
              ],
              "default": "base"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Lookback window in days, up to 90 (default 30)",
            "schema": {
              "type": "integer",
              "default": 30,
              "maximum": 90
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max transfers returned, up to 100 (default 25)",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet transfer history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.003
                    },
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "days": {
                      "type": "integer"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "transfers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "block_time": {
                            "type": "string"
                          },
                          "tx_hash": {
                            "type": "string"
                          },
                          "sender": {
                            "type": "string"
                          },
                          "receiver": {
                            "type": "string"
                          },
                          "amount_usdc": {
                            "type": "number"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "IN",
                              "OUT"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid wallet address"
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "502": {
            "description": "Upstream data provider (Dune) unavailable"
          }
        },
        "x-402": {
          "price_usdc": 0.003,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/wallet/{address}/portfolio": {
      "get": {
        "operationId": "getWalletPortfolio",
        "summary": "Wallet token portfolio",
        "description": "Multi-token balances for any wallet on Base or Ethereum, computed from the last 30 days of transfers. Returns each token's contract, symbol, net balance, and last activity. Powered by Dune Analytics. Costs $0.003 USDC.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Wallet address (0x...)",
            "schema": {
              "type": "string",
              "example": "0xE82EBef57Fa5aF958B8ECB6843D4327d314F59E3"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Blockchain to query (default: base)",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum"
              ],
              "default": "base"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet token portfolio",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.003
                    },
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "token_count": {
                      "type": "integer"
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "contract_address": {
                            "type": "string"
                          },
                          "symbol": {
                            "type": "string"
                          },
                          "balance": {
                            "type": "number"
                          },
                          "last_activity": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid wallet address"
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "502": {
            "description": "Upstream data provider (Dune) unavailable"
          }
        },
        "x-402": {
          "price_usdc": 0.003,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/chain/{chain}/stats": {
      "get": {
        "operationId": "getChainStats",
        "summary": "Daily on-chain stats",
        "description": "Daily on-chain activity for a supported chain — transaction count, active addresses, average gas used, and total gas spent in ETH. Powered by Dune Analytics. Costs $0.002 USDC.",
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "description": "Blockchain name",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum",
                "arbitrum",
                "optimism"
              ],
              "example": "base"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Number of days of history, up to 30 (default 7)",
            "schema": {
              "type": "integer",
              "default": 7,
              "maximum": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daily on-chain statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.002
                    },
                    "chain": {
                      "type": "string"
                    },
                    "days": {
                      "type": "integer"
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "daily_stats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "example": "2026-06-12"
                          },
                          "tx_count": {
                            "type": "integer"
                          },
                          "active_addresses": {
                            "type": "integer"
                          },
                          "avg_gas_used": {
                            "type": "number"
                          },
                          "total_gas_eth": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unsupported chain"
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "502": {
            "description": "Upstream data provider (Dune) unavailable"
          }
        },
        "x-402": {
          "price_usdc": 0.002,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/sec/{fund}/holdings": {
      "get": {
        "operationId": "getFundHoldings",
        "summary": "13F institutional holdings",
        "description": "What a fund owns — latest 13F holdings for an asset manager (Berkshire, Bridgewater, Citadel, ARK, Scion, or any 13F filer). Each stock position with issuer, CUSIP, market value, and shares, ranked by value. Pass a fund alias, a raw CIK, or a public filer's ticker. Source: SEC EDGAR. Costs $0.008 USDC.",
        "parameters": [
          {
            "name": "fund",
            "in": "path",
            "required": true,
            "description": "Fund alias (BERKSHIRE), raw CIK, or public filer ticker",
            "schema": {
              "type": "string",
              "example": "BERKSHIRE"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max positions, up to 200 (default 50)",
            "schema": {
              "type": "integer",
              "example": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fund 13F holdings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fund": {
                      "type": "string"
                    },
                    "cik": {
                      "type": "string"
                    },
                    "filing": {
                      "type": "object"
                    },
                    "positions": {
                      "type": "integer"
                    },
                    "total_value_usd": {
                      "type": "number"
                    },
                    "holdings": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.008,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/sec/{symbol}/filings": {
      "get": {
        "operationId": "getSecFilings",
        "summary": "SEC filings",
        "description": "Recent SEC filings (10-K, 10-Q, 8-K, etc.) for a US public company. Filterable by form type. Returns filing date, accession number, description, and direct link to EDGAR. Costs $0.003 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, MSFT)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Filter by SEC form type (e.g. 10-K, 10-Q, 8-K)",
            "schema": {
              "type": "string",
              "example": "10-K"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max filings returned, up to 50 (default 20)",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SEC filings list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.003
                    },
                    "symbol": {
                      "type": "string",
                      "example": "AAPL"
                    },
                    "cik": {
                      "type": "string",
                      "example": "0000320193"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "form": {
                            "type": "string",
                            "example": "10-K"
                          },
                          "filingDate": {
                            "type": "string",
                            "example": "2026-01-15"
                          },
                          "accessionNumber": {
                            "type": "string",
                            "example": "0000320193-26-000012"
                          },
                          "description": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://www.sec.gov/Archives/edgar/data/320193/..."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown symbol or no CIK mapping found"
          }
        },
        "x-402": {
          "price_usdc": 0.003,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/sec/{symbol}/financials": {
      "get": {
        "operationId": "getSecFinancials",
        "summary": "SEC financial statements",
        "description": "Key financial metrics extracted from SEC filings — revenue, net income, EPS, total assets, total liabilities, and stockholders' equity. Each metric includes period, value, source form, and filing date. Costs $0.008 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, MSFT)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of periods to return (default 4)",
            "schema": {
              "type": "integer",
              "default": 4
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Financial statements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.008
                    },
                    "symbol": {
                      "type": "string",
                      "example": "AAPL"
                    },
                    "cik": {
                      "type": "string",
                      "example": "0000320193"
                    },
                    "company": {
                      "type": "string",
                      "example": "Apple Inc."
                    },
                    "financials": {
                      "type": "object",
                      "properties": {
                        "revenue": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string",
                                "example": "2025-09-30"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string",
                                "example": "10-K"
                              },
                              "filed": {
                                "type": "string",
                                "example": "2025-11-01"
                              }
                            }
                          }
                        },
                        "net_income": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "eps_basic": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "eps_diluted": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "total_assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "total_liabilities": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "stockholders_equity": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "form": {
                                "type": "string"
                              },
                              "filed": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown symbol or no CIK mapping found"
          }
        },
        "x-402": {
          "price_usdc": 0.008,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/sec/{symbol}/insiders": {
      "get": {
        "operationId": "getSecInsiders",
        "summary": "SEC insider filings",
        "description": "Recent insider transaction filings (Form 4) for a US public company — reported buys and sells by officers, directors, and 10% owners. Filterable by lookback window in days. Returns filing date, accession number, description, and direct link to EDGAR. Costs $0.005 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, MSFT)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max filings returned, up to 50 (default 20)",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 50
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Lookback window in days, up to 365 (default 90)",
            "schema": {
              "type": "integer",
              "default": 90,
              "maximum": 365
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SEC insider filings list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.005
                    },
                    "symbol": {
                      "type": "string",
                      "example": "AAPL"
                    },
                    "cik": {
                      "type": "string",
                      "example": "0000320193"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "days": {
                      "type": "integer",
                      "example": 90
                    },
                    "insider_filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "form": {
                            "type": "string",
                            "example": "4"
                          },
                          "filingDate": {
                            "type": "string",
                            "example": "2026-06-10"
                          },
                          "accessionNumber": {
                            "type": "string",
                            "example": "0000320193-26-000045"
                          },
                          "description": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://www.sec.gov/Archives/edgar/data/320193/..."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown symbol or no CIK mapping found"
          }
        },
        "x-402": {
          "price_usdc": 0.005,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/fx/{base}/{quote}": {
      "get": {
        "operationId": "getFxPair",
        "summary": "Foreign exchange rate",
        "description": "Exchange rate for a currency pair using 3-letter ISO 4217 codes (e.g. USD/EUR, GBP/JPY). Returns the latest available rate. Costs $0.001 USDC.",
        "parameters": [
          {
            "name": "base",
            "in": "path",
            "required": true,
            "description": "Base currency (3-letter ISO 4217 code, e.g. USD, EUR, GBP)",
            "schema": {
              "type": "string",
              "example": "USD"
            }
          },
          {
            "name": "quote",
            "in": "path",
            "required": true,
            "description": "Quote currency (3-letter ISO 4217 code, e.g. EUR, JPY, GBP)",
            "schema": {
              "type": "string",
              "example": "EUR"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exchange rate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.001
                    },
                    "base": {
                      "type": "string",
                      "example": "USD"
                    },
                    "quote": {
                      "type": "string",
                      "example": "EUR"
                    },
                    "rate": {
                      "type": "number",
                      "example": 0.8915
                    },
                    "date": {
                      "type": "string",
                      "example": "2026-06-22"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown currency code"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/fx/rates/{base}": {
      "get": {
        "operationId": "getFxRates",
        "summary": "All exchange rates for a base currency",
        "description": "All available exchange rates for a given base currency. Returns an object of currency-code-to-rate pairs. Costs $0.001 USDC.",
        "parameters": [
          {
            "name": "base",
            "in": "path",
            "required": true,
            "description": "Base currency (3-letter ISO 4217 code, e.g. USD, EUR, GBP)",
            "schema": {
              "type": "string",
              "example": "USD"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exchange rates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.001
                    },
                    "base": {
                      "type": "string",
                      "example": "USD"
                    },
                    "date": {
                      "type": "string",
                      "example": "2026-06-22"
                    },
                    "rates": {
                      "type": "object",
                      "description": "Object of currency-code-to-rate pairs",
                      "example": {
                        "EUR": 0.8915,
                        "GBP": 0.7642,
                        "JPY": 149.32
                      }
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — include PAYMENT-SIGNATURE header with signed USDC payment (x402 v2; legacy X-PAYMENT accepted)"
          },
          "404": {
            "description": "Unknown currency code"
          }
        },
        "x-402": {
          "price_usdc": 0.001,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/analyze/stock/{symbol}": {
      "get": {
        "operationId": "analyzeStock",
        "summary": "AI stock analysis",
        "description": "AI-powered stock analysis combining real-time quote, last 4 quarters of earnings, and latest news into a structured investment summary with momentum, sentiment, risks, and outlook. Powered by Claude Haiku. Costs $0.03 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Stock ticker symbol (e.g. AAPL, TSLA, NVDA)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AI-generated stock analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "price": {
                      "type": "number"
                    },
                    "price_usdc": {
                      "type": "number",
                      "example": 0.03
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "earnings_trend": {
                          "type": "string"
                        },
                        "sentiment": {
                          "type": "string"
                        },
                        "key_metrics": {
                          "type": "object"
                        },
                        "risks": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "outlook": {
                          "type": "string"
                        }
                      }
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "model": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Unknown symbol"
          }
        },
        "x-402": {
          "price_usdc": 0.03,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/analyze/crypto/{symbol}": {
      "get": {
        "operationId": "analyzeCrypto",
        "summary": "AI crypto analysis",
        "description": "AI-powered cryptocurrency analysis with price data, market position, momentum across timeframes, risk factors, and outlook. Powered by Claude Haiku. Costs $0.02 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "Crypto ticker symbol (e.g. BTC, ETH, SOL)",
            "schema": {
              "type": "string",
              "example": "BTC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AI-generated crypto analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "price_usdc": {
                      "type": "number",
                      "example": 0.02
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "momentum": {
                          "type": "string"
                        },
                        "market_position": {
                          "type": "string"
                        },
                        "key_metrics": {
                          "type": "object"
                        },
                        "risks": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "outlook": {
                          "type": "string"
                        }
                      }
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "model": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Unknown crypto symbol"
          }
        },
        "x-402": {
          "price_usdc": 0.02,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/analyze/market": {
      "get": {
        "operationId": "analyzeMarket",
        "summary": "AI market overview",
        "description": "AI-powered daily market briefing covering US stocks (AAPL, TSLA, NVDA, MSFT), crypto market (BTC, ETH, global stats), and top DeFi yields — all synthesized into one structured report. Powered by Claude Haiku. Costs $0.05 USDC.",
        "responses": {
          "200": {
            "description": "AI-generated market overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_usdc": {
                      "type": "number",
                      "example": 0.05
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "stocks": {
                          "type": "object"
                        },
                        "crypto": {
                          "type": "object"
                        },
                        "defi": {
                          "type": "object"
                        },
                        "outlook": {
                          "type": "string"
                        }
                      }
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "model": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.05,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/compare/{symbol1}/{symbol2}": {
      "get": {
        "operationId": "compareAssets",
        "summary": "AI asset comparison",
        "description": "AI-powered head-to-head comparison of two assets (stocks or crypto). Analyzes strengths, weaknesses, key differences, and provides a verdict. Auto-detects asset type. Powered by Claude Haiku. Costs $0.05 USDC.",
        "parameters": [
          {
            "name": "symbol1",
            "in": "path",
            "required": true,
            "description": "First asset symbol (stock or crypto, e.g. AAPL, BTC)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "symbol2",
            "in": "path",
            "required": true,
            "description": "Second asset symbol (stock or crypto, e.g. TSLA, ETH)",
            "schema": {
              "type": "string",
              "example": "TSLA"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AI-generated asset comparison",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbols": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "price_usdc": {
                      "type": "number",
                      "example": 0.05
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "asset1": {
                          "type": "object"
                        },
                        "asset2": {
                          "type": "object"
                        },
                        "verdict": {
                          "type": "string"
                        },
                        "key_differences": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "model": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.05,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/analyze/portfolio/{address}": {
      "get": {
        "operationId": "analyzePortfolio",
        "summary": "AI portfolio analysis",
        "description": "AI-powered on-chain portfolio analysis for any wallet address. Analyzes token holdings from the last 30 days, diversification, risk level, and provides recommendations. Powered by Claude Haiku + Dune Analytics. Costs $0.08 USDC.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Wallet address (0x...)",
            "schema": {
              "type": "string",
              "example": "0xE82EBef57Fa5aF958B8ECB6843D4327d314F59E3"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Blockchain to analyze (default: base)",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum"
              ],
              "default": "base"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AI-generated portfolio analysis",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "token_count": {
                      "type": "integer"
                    },
                    "price_usdc": {
                      "type": "number",
                      "example": 0.08
                    },
                    "analysis": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "diversification": {
                          "type": "string"
                        },
                        "risk_level": {
                          "type": "string"
                        },
                        "risk_factors": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "top_holdings": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "outlook": {
                          "type": "string"
                        }
                      }
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "model": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid wallet address"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.08,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/watch/{symbol}": {
      "get": {
        "operationId": "getWatch",
        "summary": "Change feed (diff since last check)",
        "description": "Returns ONLY what's new for a stock since ?since= — news articles and earnings reports in the window, plus the current quote. Stateless cursor: pass the response's as_of back as ?since next time. has_changes lets pollers early-exit. Built for polling agents. Costs $0.005 USDC.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "US stock ticker (e.g. AAPL)",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "ISO timestamp or epoch of your last check (default 24h ago)",
            "schema": {
              "type": "string",
              "example": "2026-07-28T00:00:00Z"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Changes since the cursor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "since": {
                      "type": "string"
                    },
                    "as_of": {
                      "type": "string"
                    },
                    "has_changes": {
                      "type": "boolean"
                    },
                    "changes": {
                      "type": "object"
                    },
                    "quote": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.005,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/calendar/earnings": {
      "get": {
        "operationId": "getEarningsCalendar",
        "summary": "Upcoming earnings calendar",
        "description": "Upcoming US company earnings — which companies report in a date window, with estimated EPS and revenue. Default next 7 days; filter with from/to (window ≤30d) or symbol. Source: Finnhub. Costs $0.005 USDC.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start date YYYY-MM-DD (default today)",
            "schema": {
              "type": "string",
              "example": "2026-07-29"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End date YYYY-MM-DD (default +7 days, window ≤30d)",
            "schema": {
              "type": "string",
              "example": "2026-08-05"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "description": "Optional ticker filter",
            "schema": {
              "type": "string",
              "example": "AAPL"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Upcoming earnings reports",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "earnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string"
                          },
                          "hour": {
                            "type": "string"
                          },
                          "quarter": {
                            "type": "integer"
                          },
                          "year": {
                            "type": "integer"
                          },
                          "eps_estimate": {
                            "type": "number"
                          },
                          "revenue_estimate": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-402": {
          "price_usdc": 0.005,
          "network": "base",
          "asset": "USDC"
        }
      }
    },
    "/stock/news/batch": {
      "get": {
        "operationId": "getBulkStockNews",
        "summary": "Bulk stock news (2–50 symbols)",
        "description": "Latest news for 2–50 US stocks in ONE call — up to 10 articles each from the last 7 days. Priced per symbol at $0.005 USDC (e.g. 10 symbols = $0.05 USDC). Reuses the per-symbol news cache.",
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "description": "Comma-separated tickers, 2–50 (e.g. AAPL,NVDA,TSLA)",
            "schema": {
              "type": "string",
              "example": "AAPL,NVDA,TSLA"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-symbol news results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "integer"
                    },
                    "returned": {
                      "type": "integer"
                    },
                    "price_usdc": {
                      "type": "number"
                    },
                    "per_symbol_usdc": {
                      "type": "number"
                    },
                    "results": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "articles": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "cache_status": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing/invalid symbols (needs 2–50)"
          },
          "402": {
            "description": "Payment required (x402) — amount = symbol count × $0.005 USDC"
          }
        }
      }
    },
    "/econ/snapshot": {
      "get": {
        "operationId": "getEconSnapshot",
        "summary": "Macro snapshot",
        "description": "US macro dashboard in one call — CPI inflation (YoY), core PCE, fed funds, 10Y/2Y Treasury yields, yield curve, unemployment, GDP growth. FRED data. $0.005 USDC.",
        "responses": {
          "200": {
            "description": "Macro snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "as_of": {
                      "type": "string"
                    },
                    "inflation_cpi_yoy": {
                      "type": "number"
                    },
                    "core_pce_yoy": {
                      "type": "number"
                    },
                    "fed_funds_pct": {
                      "type": "number"
                    },
                    "treasury_10y_pct": {
                      "type": "number"
                    },
                    "treasury_2y_pct": {
                      "type": "number"
                    },
                    "yield_curve_10y2y": {
                      "type": "number"
                    },
                    "unemployment_pct": {
                      "type": "number"
                    },
                    "gdp_growth_pct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    },
    "/econ/yields": {
      "get": {
        "operationId": "getEconYields",
        "summary": "Treasury yield curve",
        "description": "Full US Treasury yield curve (1M–30Y) with rates per tenor, key spreads (10Y-2Y, 10Y-3M, 30Y-5Y, 5Y-2Y), and recession inversion flags. FRED data. $0.005 USDC.",
        "responses": {
          "200": {
            "description": "Yield curve with spreads and inversion flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "as_of": {
                      "type": "string"
                    },
                    "curve": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tenor": {
                            "type": "string"
                          },
                          "months": {
                            "type": "integer"
                          },
                          "rate_pct": {
                            "type": "number"
                          },
                          "date": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "spreads": {
                      "type": "object"
                    },
                    "inverted": {
                      "type": "boolean"
                    },
                    "inversion": {
                      "type": "object"
                    },
                    "signal": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    },
    "/econ/inflation": {
      "get": {
        "operationId": "getEconInflation",
        "summary": "Inflation calculator",
        "description": "Cumulative US CPI inflation between two years, with the inflation-adjusted dollar value. FRED data. $0.003 USDC.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Start year (e.g. 2010)",
            "schema": {
              "type": "string",
              "example": "2010"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End year (default latest)",
            "schema": {
              "type": "string",
              "example": "2026"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "description": "Dollar amount to adjust (default 100)",
            "schema": {
              "type": "number",
              "example": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cumulative inflation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "cumulative_inflation_pct": {
                      "type": "number"
                    },
                    "amount_in": {
                      "type": "number"
                    },
                    "amount_adjusted": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing/invalid from"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    },
    "/econ/{indicator}": {
      "get": {
        "operationId": "getEconIndicator",
        "summary": "Macro indicator",
        "description": "Single US macro indicator (cpi, core-cpi, pce, fedfunds, unemployment, gdp, treasury10y, treasury2y, yield-curve, sentiment, payrolls, mortgage30) — latest value, YoY change, 12-point history. FRED data. $0.003 USDC.",
        "parameters": [
          {
            "name": "indicator",
            "in": "path",
            "required": true,
            "description": "Indicator name",
            "schema": {
              "type": "string",
              "example": "cpi"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Indicator series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "indicator": {
                      "type": "string"
                    },
                    "series_id": {
                      "type": "string"
                    },
                    "latest": {
                      "type": "object"
                    },
                    "yoy_change_pct": {
                      "type": "number"
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402)"
          },
          "404": {
            "description": "Unknown indicator"
          }
        }
      }
    }
  }
}
