{
  "openapi": "3.1.0",
  "info": {
    "title": "NoJunk Stocks",
    "version": "1.0.0",
    "description": "Stock, ETF, index, FX and commodity quotes, OHLCV history and computed statistics (returns, volatility, drawdown, RSI, moving averages). Pay per call with USDC on Base (x402). No API key.",
    "x-guidance": "Market data for AI agents, paid per call in USDC on Base via x402; you are only charged when a result is returned (400/404/413/502 are free). GET with query parameters or POST a JSON body. Symbols are Yahoo Finance style, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F. /quote {symbol} ($0.001) -> price, change, changePercent, previousClose, dayHigh, dayLow, volume, fiftyTwoWeekHigh/Low, currency, exchange, name, marketState, asOf. /quotes {symbols: comma list or array, 1-20} ($0.003) -> the same fields per symbol in results[], unknown symbols as {ok: false, error: \"not found\"}. /history {symbol, range?: 1d|5d|1mo|3mo|6mo|1y|2y|5y|max (default 1mo), interval?: 1m|5m|15m|1h|1d|1wk|1mo (default 1d)} ($0.002) -> candles [{t, o, h, l, c, v, adj}] oldest first plus dividends, splits and summary {first, last, changePercent, high, low, avgVolume}; 1m bars only for range 1d/5d, other intraday bars only up to 1mo. /stats {symbol} ($0.002) -> from one year of daily bars: returns {1w, 1m, 3m, 6m, 1y} in percent, volatilityAnnualizedPct (stdev of daily log returns x sqrt(252)), maxDrawdownPct, sma {sma20, sma50, sma200: {value, priceAbove}}, rsi14, fiftyTwoWeek {high, low, distanceFromHighPct, distanceFromLowPct}, avgVolume30d. Data comes from Yahoo Finance's public chart endpoint; exchange quotes may be delayed. Every response carries a notice field: informational use only, not investment advice. Best for: checking a price before acting, pulling candles for your own analysis, quick technical screens (RSI, moving averages, drawdown, volatility) without an API key."
  },
  "servers": [
    {
      "url": "https://nojunk-stocks.mick8511.workers.dev"
    }
  ],
  "paths": {
    "/quote": {
      "get": {
        "operationId": "quote",
        "summary": "Latest quote for one stock, ETF, index, crypto, FX pair or commodity future",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "quote"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "description": "Long name, falling back to short name"
                    },
                    "shortName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "price": {
                      "type": "number",
                      "description": "Latest regular-session price"
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "price - previousClose"
                    },
                    "changePercent": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percent change vs previous close"
                    },
                    "previousClose": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "dayHigh": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "dayLow": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "volume": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "fiftyTwoWeekHigh": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "fiftyTwoWeekLow": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 code, e.g. USD"
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exchange code, e.g. NMS, NYQ, CCC"
                    },
                    "exchangeName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instrumentType": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                    },
                    "marketState": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "PRE, REGULAR, POST, CLOSED"
                    },
                    "asOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time of the latest price (UTC)"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "name",
                    "price",
                    "change",
                    "changePercent",
                    "previousClose",
                    "currency",
                    "exchange",
                    "marketState",
                    "asOf",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or no price data (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      },
      "post": {
        "operationId": "quotePost",
        "summary": "Latest quote for one stock, ETF, index, crypto, FX pair or commodity future",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "quote"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9.^=-]{1,12}$",
                    "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
                  }
                },
                "required": [
                  "symbol"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "description": "Long name, falling back to short name"
                    },
                    "shortName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "price": {
                      "type": "number",
                      "description": "Latest regular-session price"
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "price - previousClose"
                    },
                    "changePercent": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Percent change vs previous close"
                    },
                    "previousClose": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "dayHigh": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "dayLow": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "volume": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "fiftyTwoWeekHigh": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "fiftyTwoWeekLow": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 code, e.g. USD"
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exchange code, e.g. NMS, NYQ, CCC"
                    },
                    "exchangeName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instrumentType": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                    },
                    "marketState": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "PRE, REGULAR, POST, CLOSED"
                    },
                    "asOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time of the latest price (UTC)"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "name",
                    "price",
                    "change",
                    "changePercent",
                    "previousClose",
                    "currency",
                    "exchange",
                    "marketState",
                    "asOf",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or no price data (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      }
    },
    "/quotes": {
      "get": {
        "operationId": "quotes",
        "summary": "Latest quotes for up to 20 symbols in one call",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "quotes"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "1-20 symbols as a comma-separated string or a JSON array"
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "found": {
                      "type": "integer",
                      "description": "How many symbols returned a quote"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string",
                            "description": "Long name, falling back to short name"
                          },
                          "shortName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "price": {
                            "type": "number",
                            "description": "Latest regular-session price"
                          },
                          "change": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "price - previousClose"
                          },
                          "changePercent": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percent change vs previous close"
                          },
                          "previousClose": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "dayHigh": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "dayLow": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "volume": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "fiftyTwoWeekHigh": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "fiftyTwoWeekLow": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "currency": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 4217 code, e.g. USD"
                          },
                          "exchange": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Exchange code, e.g. NMS, NYQ, CCC"
                          },
                          "exchangeName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "instrumentType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                          },
                          "marketState": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "PRE, REGULAR, POST, CLOSED"
                          },
                          "asOf": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time of the latest price (UTC)"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "error": {
                            "type": "string",
                            "description": "Present when ok is false: not found | unavailable"
                          }
                        },
                        "required": [
                          "symbol",
                          "ok"
                        ]
                      },
                      "description": "Same order as requested"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "count",
                    "found",
                    "results",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "None of the symbols were found (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      },
      "post": {
        "operationId": "quotesPost",
        "summary": "Latest quotes for up to 20 symbols in one call",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "quotes"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbols": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9.^=-]{1,12}$",
                          "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
                        },
                        "minItems": 1,
                        "maxItems": 20
                      }
                    ],
                    "description": "1-20 symbols as a comma-separated string or a JSON array"
                  }
                },
                "required": [
                  "symbols"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "found": {
                      "type": "integer",
                      "description": "How many symbols returned a quote"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string",
                            "description": "Long name, falling back to short name"
                          },
                          "shortName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "price": {
                            "type": "number",
                            "description": "Latest regular-session price"
                          },
                          "change": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "price - previousClose"
                          },
                          "changePercent": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Percent change vs previous close"
                          },
                          "previousClose": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "dayHigh": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "dayLow": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "volume": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "fiftyTwoWeekHigh": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "fiftyTwoWeekLow": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "currency": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 4217 code, e.g. USD"
                          },
                          "exchange": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Exchange code, e.g. NMS, NYQ, CCC"
                          },
                          "exchangeName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "instrumentType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                          },
                          "marketState": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "PRE, REGULAR, POST, CLOSED"
                          },
                          "asOf": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time of the latest price (UTC)"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "error": {
                            "type": "string",
                            "description": "Present when ok is false: not found | unavailable"
                          }
                        },
                        "required": [
                          "symbol",
                          "ok"
                        ]
                      },
                      "description": "Same order as requested"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "count",
                    "found",
                    "results",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "None of the symbols were found (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      }
    },
    "/history": {
      "get": {
        "operationId": "history",
        "summary": "OHLCV candles with adjusted close, dividends, splits and a summary for a range and interval",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "history"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "How far back to go"
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Bar size. 1m only with range 1d/5d; 5m/15m/1h only with range 1d/5d/1mo"
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "range": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "string"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exchange IANA time zone"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "candles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "t": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Bar start (UTC)"
                          },
                          "o": {
                            "type": "number"
                          },
                          "h": {
                            "type": "number"
                          },
                          "l": {
                            "type": "number"
                          },
                          "c": {
                            "type": "number"
                          },
                          "v": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "adj": {
                            "type": "number",
                            "description": "Adjusted close (equals c when Yahoo gives no adjustment)"
                          }
                        },
                        "required": [
                          "t",
                          "o",
                          "h",
                          "l",
                          "c",
                          "v",
                          "adj"
                        ]
                      },
                      "description": "Oldest first; bars with missing OHLC are dropped"
                    },
                    "dividends": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "amount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "amount"
                        ]
                      }
                    },
                    "splits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "numerator": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "denominator": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "ratio": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "e.g. 4:1"
                          }
                        },
                        "required": [
                          "date"
                        ]
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        },
                        "bars": {
                          "type": "integer"
                        },
                        "first": {
                          "type": "number",
                          "description": "First close"
                        },
                        "last": {
                          "type": "number",
                          "description": "Last close"
                        },
                        "changePercent": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "high": {
                          "type": "number"
                        },
                        "low": {
                          "type": "number"
                        },
                        "avgVolume": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "bars",
                        "first",
                        "last",
                        "changePercent",
                        "high",
                        "low",
                        "avgVolume"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "description": "Long name, falling back to short name"
                        },
                        "shortName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "price": {
                          "type": "number",
                          "description": "Latest regular-session price"
                        },
                        "change": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "price - previousClose"
                        },
                        "changePercent": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Percent change vs previous close"
                        },
                        "previousClose": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "dayHigh": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "dayLow": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "volume": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "fiftyTwoWeekHigh": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "fiftyTwoWeekLow": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "currency": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ISO 4217 code, e.g. USD"
                        },
                        "exchange": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Exchange code, e.g. NMS, NYQ, CCC"
                        },
                        "exchangeName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "instrumentType": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                        },
                        "marketState": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "PRE, REGULAR, POST, CLOSED"
                        },
                        "asOf": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the latest price (UTC)"
                        }
                      },
                      "description": "Latest quote fields for the symbol"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "range",
                    "interval",
                    "count",
                    "candles",
                    "dividends",
                    "splits",
                    "summary",
                    "meta",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or no bars for that range/interval (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      },
      "post": {
        "operationId": "historyPost",
        "summary": "OHLCV candles with adjusted close, dividends, splits and a summary for a range and interval",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "history"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9.^=-]{1,12}$",
                    "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
                  },
                  "range": {
                    "type": "string",
                    "enum": [
                      "1d",
                      "5d",
                      "1mo",
                      "3mo",
                      "6mo",
                      "1y",
                      "2y",
                      "5y",
                      "max"
                    ],
                    "default": "1mo",
                    "description": "How far back to go"
                  },
                  "interval": {
                    "type": "string",
                    "enum": [
                      "1m",
                      "5m",
                      "15m",
                      "1h",
                      "1d",
                      "1wk",
                      "1mo"
                    ],
                    "default": "1d",
                    "description": "Bar size. 1m only with range 1d/5d; 5m/15m/1h only with range 1d/5d/1mo"
                  }
                },
                "required": [
                  "symbol"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "range": {
                      "type": "string"
                    },
                    "interval": {
                      "type": "string"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Exchange IANA time zone"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "candles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "t": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Bar start (UTC)"
                          },
                          "o": {
                            "type": "number"
                          },
                          "h": {
                            "type": "number"
                          },
                          "l": {
                            "type": "number"
                          },
                          "c": {
                            "type": "number"
                          },
                          "v": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "adj": {
                            "type": "number",
                            "description": "Adjusted close (equals c when Yahoo gives no adjustment)"
                          }
                        },
                        "required": [
                          "t",
                          "o",
                          "h",
                          "l",
                          "c",
                          "v",
                          "adj"
                        ]
                      },
                      "description": "Oldest first; bars with missing OHLC are dropped"
                    },
                    "dividends": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "amount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "amount"
                        ]
                      }
                    },
                    "splits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "numerator": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "denominator": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "ratio": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "e.g. 4:1"
                          }
                        },
                        "required": [
                          "date"
                        ]
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        },
                        "bars": {
                          "type": "integer"
                        },
                        "first": {
                          "type": "number",
                          "description": "First close"
                        },
                        "last": {
                          "type": "number",
                          "description": "Last close"
                        },
                        "changePercent": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "high": {
                          "type": "number"
                        },
                        "low": {
                          "type": "number"
                        },
                        "avgVolume": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "bars",
                        "first",
                        "last",
                        "changePercent",
                        "high",
                        "low",
                        "avgVolume"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "description": "Long name, falling back to short name"
                        },
                        "shortName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "price": {
                          "type": "number",
                          "description": "Latest regular-session price"
                        },
                        "change": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "price - previousClose"
                        },
                        "changePercent": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Percent change vs previous close"
                        },
                        "previousClose": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "dayHigh": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "dayLow": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "volume": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "fiftyTwoWeekHigh": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "fiftyTwoWeekLow": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "currency": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ISO 4217 code, e.g. USD"
                        },
                        "exchange": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Exchange code, e.g. NMS, NYQ, CCC"
                        },
                        "exchangeName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "instrumentType": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "EQUITY, ETF, INDEX, CRYPTOCURRENCY, CURRENCY, FUTURE, MUTUALFUND"
                        },
                        "marketState": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "PRE, REGULAR, POST, CLOSED"
                        },
                        "asOf": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the latest price (UTC)"
                        }
                      },
                      "description": "Latest quote fields for the symbol"
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "range",
                    "interval",
                    "count",
                    "candles",
                    "dividends",
                    "splits",
                    "summary",
                    "meta",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or no bars for that range/interval (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      }
    },
    "/stats": {
      "get": {
        "operationId": "stats",
        "summary": "Computed statistics from one year of daily bars: returns, volatility, drawdown, SMA 20/50/200, RSI 14, 52-week distance",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "stats"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "price": {
                      "type": "number",
                      "description": "Latest price used for the price-above-SMA flags and 52-week distances"
                    },
                    "asOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "lastCloseDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "bars": {
                      "type": "integer",
                      "description": "Daily bars used"
                    },
                    "from": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "returns": {
                      "type": "object",
                      "properties": {
                        "1w": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "1m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "3m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "6m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "1y": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "1w",
                        "1m",
                        "3m",
                        "6m",
                        "1y"
                      ],
                      "description": "Percent change of the close over each calendar window; null when the history does not reach back far enough"
                    },
                    "volatilityAnnualizedPct": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Sample standard deviation of daily log returns x sqrt(252), in percent"
                    },
                    "maxDrawdownPct": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Largest peak-to-trough decline of the close over the period, in percent (negative or 0)"
                    },
                    "sma": {
                      "type": "object",
                      "properties": {
                        "sma20": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        },
                        "sma50": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        },
                        "sma200": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        }
                      },
                      "required": [
                        "sma20",
                        "sma50",
                        "sma200"
                      ],
                      "description": "Simple moving averages of the close; value is null when there are fewer bars than the period"
                    },
                    "rsi14": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Wilder RSI over 14 daily bars, 0-100"
                    },
                    "fiftyTwoWeek": {
                      "type": "object",
                      "properties": {
                        "high": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "low": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "distanceFromHighPct": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "(price / high - 1) x 100, 0 or negative"
                        },
                        "distanceFromLowPct": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "(price / low - 1) x 100"
                        }
                      },
                      "required": [
                        "high",
                        "low",
                        "distanceFromHighPct",
                        "distanceFromLowPct"
                      ]
                    },
                    "avgVolume30d": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "name",
                    "price",
                    "lastClose",
                    "lastCloseDate",
                    "bars",
                    "returns",
                    "volatilityAnnualizedPct",
                    "maxDrawdownPct",
                    "sma",
                    "rsi14",
                    "fiftyTwoWeek",
                    "avgVolume30d",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or not enough daily history (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      },
      "post": {
        "operationId": "statsPost",
        "summary": "Computed statistics from one year of daily bars: returns, volatility, drawdown, SMA 20/50/200, RSI 14, 52-week distance",
        "tags": [
          "Finance",
          "Stocks",
          "Market Data",
          "stats"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.002000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9.^=-]{1,12}$",
                    "description": "Ticker symbol, 1-12 characters of A-Z 0-9 . ^ = - e.g. AAPL, BRK-B, ^GSPC, BTC-USD, EURUSD=X, GC=F (case-insensitive)"
                  }
                },
                "required": [
                  "symbol"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exchange": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "price": {
                      "type": "number",
                      "description": "Latest price used for the price-above-SMA flags and 52-week distances"
                    },
                    "asOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "lastCloseDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "bars": {
                      "type": "integer",
                      "description": "Daily bars used"
                    },
                    "from": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "returns": {
                      "type": "object",
                      "properties": {
                        "1w": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "1m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "3m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "6m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "1y": {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "1w",
                        "1m",
                        "3m",
                        "6m",
                        "1y"
                      ],
                      "description": "Percent change of the close over each calendar window; null when the history does not reach back far enough"
                    },
                    "volatilityAnnualizedPct": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Sample standard deviation of daily log returns x sqrt(252), in percent"
                    },
                    "maxDrawdownPct": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Largest peak-to-trough decline of the close over the period, in percent (negative or 0)"
                    },
                    "sma": {
                      "type": "object",
                      "properties": {
                        "sma20": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        },
                        "sma50": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        },
                        "sma200": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "priceAbove": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "priceAbove"
                          ]
                        }
                      },
                      "required": [
                        "sma20",
                        "sma50",
                        "sma200"
                      ],
                      "description": "Simple moving averages of the close; value is null when there are fewer bars than the period"
                    },
                    "rsi14": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Wilder RSI over 14 daily bars, 0-100"
                    },
                    "fiftyTwoWeek": {
                      "type": "object",
                      "properties": {
                        "high": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "low": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "distanceFromHighPct": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "(price / high - 1) x 100, 0 or negative"
                        },
                        "distanceFromLowPct": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "(price / low - 1) x 100"
                        }
                      },
                      "required": [
                        "high",
                        "low",
                        "distanceFromHighPct",
                        "distanceFromLowPct"
                      ]
                    },
                    "avgVolume30d": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "source": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string",
                      "description": "Informational-use notice; not investment advice"
                    },
                    "fetched_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "symbol",
                    "name",
                    "price",
                    "lastClose",
                    "lastCloseDate",
                    "bars",
                    "returns",
                    "volatilityAnnualizedPct",
                    "maxDrawdownPct",
                    "sma",
                    "rsi14",
                    "fiftyTwoWeek",
                    "avgVolume30d",
                    "source",
                    "notice",
                    "fetched_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters (no charge)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Symbol not found or not enough daily history (no charge)"
          },
          "413": {
            "description": "Request body too large (no charge)"
          },
          "502": {
            "description": "Data source unreachable, timed out (8 s per attempt) or returned an error (no charge)"
          }
        }
      }
    }
  }
}