# x402stock.xyz EMA Indicator

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

Returns Exponential Moving Average (EMA) values for a given stock ticker over a configurable timespan, window, and price series.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/indicators/ema/AAPL
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-xyz-106c4ff5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iBVcF8uKS6mYKJuV6GFRs

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-xyz-106c4ff5
```

Example prompt: What's the 50-day EMA for AAPL using daily close prices, adjusted, for the last 30 data points?

## When to prefer this

Use this endpoint when you need Exponential Moving Average technical indicator data for US-listed equities, especially when building trading signals, trend analysis, or chart overlays. Prefer this over simple moving averages when you want more weight given to recent prices. Costs $0.02 USDC per call via x402 micropayment protocol.

## Known failure modes

- Invalid ticker symbol returns empty or error response
- Window size exceeding 2000 causes validation error
- Limit exceeding 5000 causes validation error
- Invalid timespan enum value causes bad request
- Unsupported series_type value causes validation error
- Payment not fulfilled (x402 payment required) returns 402

## 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 symbol, source, as-of date, and a data object with the indicator name (EMA), count of values, and an array of timestamp/value pairs representing the EMA series.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "limit": 30,
   "window": 50,
   "adjusted": true,
   "timespan": "day",
   "series_type": "close"
  }
 }
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "timespan",
      "window",
      "series_type",
      "adjusted",
      "limit"
     ],
     "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
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "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": 
… (truncated)
```

## More

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