# x402stock EMA Time Series

> x402stock EMA Time Series is a paid API for AI agents from agents.x402stock.xyz, paid per call via MPP, $0.01/call, status unknown (last checked 2026-09-13).

Returns an Exponential Moving Average (EMA) time series for a US-listed stock ticker, configurable by window size, timespan, series type, and result count.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/indicators/ema/{ticker}
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-x402stock-ema-time-series-0e7e1231
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LZRWqFfoSOmXdiGW-HCh3

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 agents-x402stock-xyz-x402stock-ema-time-series-0e7e1231
```

Example prompt: Can you pull the 20-day EMA on daily close prices for NVDA, showing the last 60 data points?

## When to prefer this

Use this endpoint when you need EMA-based trend or momentum data for a US-listed stock or ETF and want configurable window sizes and timespans. Prefer it over SMA endpoints when you need exponentially weighted smoothing that reacts more quickly to recent price changes. Ideal for technical analysis pipelines, signal generation, or charting agents that need pay-per-call access with no API key setup.

## Known failure modes

- Invalid or unlisted ticker symbol returns an error or empty data
- Window or limit values outside allowed ranges (1–2000, 1–5000) rejected
- Unsupported timespan or series_type enum value causes a 422 validation error
- Payment failure or insufficient USDC balance blocks the request via x402
- Ticker with insufficient historical data may return fewer values than requested

## 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

Returns a JSON object containing the ticker, source, as-of timestamp, and a data object with the indicator name, count of values, and an array of timestamped EMA value objects. Each value entry includes the timestamp and computed EMA value. Optional MACD-style signal and histogram fields may also appear.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker"
 ],
 "properties": {
  "limit": {
   "type": "integer",
   "default": 30,
   "maximum": 5000,
   "exclusiveMinimum": 0
  },
  "ticker": {
   "type": "string",
   "description": "US-listed ticker symbol (uppercase), e.g. AAPL."
  },
  "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"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker",
  "data",
  "source",
  "as_of"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "indicator",
    "count",
    "values"
   ],
   "properties": {
    "count": {
     "type": "number"
    },
    "values": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "timestamp",
       "value"
      ],
      "properties": {
       "value": {
        "type": "number"
       },
       "signal": {
        "type": "number"
       },
       "histogram": {
        "type": "number"
       },
       "timestamp": {
        "anyOf": [
         {
          "type": "string"
         },
         {
          "type": "null"
         }
        ]
       }
      },
      "additionalProperties": false
     }
    },
    "indicator": {
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "as_of": {
   "type": "string"
  },
  "source": {
   "type": "string",
   "const": "x402stock"
  },
  "ticker": {
   "type": "string"
  },
  "feedback": {
   "type": "object",
   "required": [
    "endpoint",
    "method",
    "free",
    "note"
   ],
   "properties": {
    "free": {
     "type": "boolean"
    },
    "note": {
     "type": "string"
    },
    "method": {
     "type": "string",
     "const": "POST"
    },
    "endpoint": {
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-x402stock-ema-time-series-0e7e1231/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)
