# Stock Price (Finnhub)

> Stock Price (Finnhub) is a paid API for AI agents from ZeroClick x402 Service Registry at stocks.withzero.ai, paid per call via MPP, $0.005/call, status unknown (last checked 2026-10-10, last successful call 2026-07-15).

Fetches real-time stock quotes and historical OHLCV timeseries data for stocks, ETFs, forex, crypto, and indices via Finnhub

## Facts

- Endpoint: POST https://stocks.withzero.ai/run?utm_source=zero.xyz
- Price: $0.005/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Last successful call: 2026-07-15
- Success rate: 61% of calls made through Zero
- Rating: 4.7 / 5 from 1 review
- Activations on Zero: 18
- Provider: ZeroClick x402 Service Registry
- Website: https://withzero.ai
- Tags: finance, stock, stocks, price, finnhub, market, timeseries, quote, equities
- Canonical page: https://www.zero.xyz/c/zeroclick-x402-service-registry-stock-price-finnhub-3fb4dd48
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NJV28wwUjFY5dR2MOZiAT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability zeroclick-x402-service-registry-stock-price-finnhub-3fb4dd48 -d '<json body>'
```

Example prompt: What's the current price of AAPL on NASDAQ right now — is the market open, and how much has it changed today in percent?

## When to prefer this

Use this endpoint when you need real-time stock quotes or historical OHLCV candlestick data for equities, ETFs, crypto, forex, or indices via Finnhub. Prefer it over the Crypto Prices (Binance) endpoint when you want stock or forex data, or when you need OHLCV timeseries rather than just a spot price. Well-suited for portfolio tracking, charting, technical analysis inputs, or answering ad-hoc 'what's the stock price of X' questions.

## Known failure modes

- Unknown or invalid ticker symbol returns an error or empty response
- Unsupported exchange or ambiguous symbol without exchange disambiguation may return wrong instrument
- Date range outside available history may return empty values array
- Malformed date format (not YYYY-MM-DD) causes a request error
- outputsize exceeding 5000 or below 1 is rejected by schema validation
- Crypto pair format (e.g. BTC/USD) may behave differently from equity tickers

## How this service works

Stock quotes via Finnhub and historical timeseries via Twelve Data. Input: `action` (quote/timeseries), `symbol` (e.g. AAPL, MSFT, TSLA), optional `exchange` (e.g. NASDAQ, NYSE). For timeseries: `interval` (1min/5min/15min/30min/45min/1h/2h/4h/1day/1week/1month, default 1day), `outputsize` (1-5000 data points, default 30), `start_date` and `end_date` (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS). quote returns: symbol, name, price, open, high, low, close, volume, change, percent_change, is_market_open, exchange, currency. timeseries returns: symbol, interval, currency, values array of {datetime, open, high, low, close, volume}. Covers stocks, ETFs, forex, crypto, and indices. Use uppercase ticker symbols.

## Output

For a quote action: returns symbol, company name, current price, open, high, low, previous close, volume, price change, percent change, market open status, exchange, and currency. For a timeseries action: returns symbol, interval, currency, and an array of OHLCV bars each containing datetime, open, high, low, close, and volume, ordered most recent first.

## Example request

```json
{
 "action": "quote",
 "symbol": "AAPL"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "symbol"
 ],
 "properties": {
  "action": {
   "enum": [
    "quote",
    "timeseries"
   ],
   "type": "string",
   "default": "quote",
   "description": "quote: real-time price; timeseries: historical OHLCV data"
  },
  "symbol": {
   "type": "string",
   "maxLength": 20,
   "minLength": 1,
   "description": "Stock ticker symbol (e.g. AAPL, MSFT, BTC/USD)"
  },
  "end_date": {
   "type": "string",
   "description": "End date for timeseries (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)"
  },
  "exchange": {
   "type": "string",
   "description": "Exchange name to disambiguate (e.g. NASDAQ, NYSE)"
  },
  "interval": {
   "enum": [
    "1min",
    "5min",
    "15min",
    "30min",
    "45min",
    "1h",
    "2h",
    "4h",
    "1day",
    "1week",
    "1month"
   ],
   "type": "string",
   "default": "1day",
   "description": "Timeseries interval (default 1day)"
  },
  "outputsize": {
   "type": "integer",
   "default": 30,
   "maximum": 5000,
   "minimum": 1,
   "description": "Number of data points to return for timeseries (default 30)"
  },
  "start_date": {
   "type": "string",
   "description": "Start date for timeseries (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)"
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "action",
  "symbol"
 ],
 "properties": {
  "low": {
   "type": "number",
   "description": "Day low"
  },
  "high": {
   "type": "number",
   "description": "Day high"
  },
  "name": {
   "type": "string",
   "description": "Company name"
  },
  "open": {
   "type": "number",
   "description": "Open price"
  },
  "close": {
   "type": "number",
   "description": "Previous close"
  },
  "price": {
   "type": "number",
   "description": "Current price"
  },
  "action": {
   "type": "string",
   "description": "Action performed"
  },
  "change": {
   "type": "number",
   "description": "Price change"
  },
  "symbol": {
   "type": "string",
   "description": "Stock symbol"
  },
  "values": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "datetime",
     "open",
     "high",
     "low",
     "close"
    ],
    "properties": {
     "low": {
      "type": "number",
      "description": "Low price"
     },
     "high": {
      "type": "number",
      "description": "High price"
     },
     "open": {
      "type": "number",
      "description": "Open price"
     },
     "close": {
      "type": "number",
      "description": "Close price"
     },
     "volume": {
      "type": "number",
      "description": "Volume"
     },
     "datetime": {
      "type": "string",
      "description": "Datetime of the bar"
     }
    },
    "additionalProperties": false
   },
   "description": "OHLCV timeseries data (most recent first)"
  },
  "volume": {
   "type": "number",
   "description": "Volume"
  },
  "currency": {
   "type": "string",
   "description": "Currency code"
  },
  "exchange": {
   "type": "string",
   "description": "Exchange name"
  },
  "interval": {
   "type": "string",
   "description": "Timeseries interval"
  },
  "is_market_open": {
   "type": "boolean",
   "description": "Whether market is currently open"
  },
  "percent_change": {
   "type": "number",
   "description": "Percent price change"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zeroclick-x402-service-registry-stock-price-finnhub-3fb4dd48/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stocks.withzero.ai](https://www.zero.xyz/host/stocks.withzero.ai/llms.txt)
