# x402stock EMA Indicator

> x402stock EMA Indicator is a paid API for AI agents from agents.x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Returns Exponential Moving Average (EMA) time series for a given ticker symbol, with configurable window, timespan, series type, and limit.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/indicators/ema/:ticker?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-ema-indicator-41a7ac3f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SsoPcmPUxbbgw6dQSo52d

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 x402stock-ema-indicator-41a7ac3f
```

Example prompt: What's the 20-day EMA for AAPL using daily close prices? Give me the last 50 data points.

## When to prefer this

Use this endpoint when you need a ready-computed EMA time series without running the calculation yourself, especially for AI agents that pay per-call in USDC via x402 with no API key setup. Prefer this over raw price endpoints when you need EMA directly for technical analysis signals (crossovers, trend filters, momentum). Ideal for low-frequency tasks where $0.01/call economics make sense; consider caching results if you need repeated lookups of the same ticker/window.

## Known failure modes

- Invalid or unsupported ticker symbol returns an error or empty series
- Payment failure via x402 protocol results in 402 Payment Required with no data
- Window or limit values outside allowed ranges (e.g. window > 2000) rejected with validation error
- Unsupported timespan or series_type enum values return a 400 error
- Insufficient historical data for the requested window/limit combination may yield a shorter series
- Network timeouts if upstream market data provider is slow

## How this service works

Exponential Moving Average time series. Tune with `?window=`, `?timespan=`, `?series_type=`, `?limit=`. From x402stock, a pay-per-call market & economic data API for AI agents. No API key or account; pay in USDC via x402.

## Output

A time series of EMA values for the requested ticker, including timestamps and computed EMA readings at each interval. The number of returned data points is bounded by the `limit` parameter (default 30, max 5000), computed over the specified `window` (default 50), `timespan` (default daily), and `series_type` (default close). Price data may be split/dividend adjusted based on the `adjusted` flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "ticker": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 30,
       "maximum": 5000,
       "exclusiveMinimum": 0
      },
      "window": {
       "type": "integer",
       "default": 50,
       "maximum": 2000,
       "exclusiveMinimum": 0
      },
      "adjusted": {
       "type": "boolean",
       "default": true
      },
      "timespan": {
       "enum": [
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
       ],
       "type": "string",
       "default": "day"
      },
      "series_type": {
       "enum": [
        "open",
        "high",
        "low",
        "close"
       ],
       "type": "string",
       "default": "close"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-ema-indicator-41a7ac3f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
