# x402stock EMA (Exponential Moving Average) Indicator

> x402stock EMA (Exponential Moving Average) 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-08).

Returns exponential moving average (EMA) values for a given ticker symbol over a specified timespan and window

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/indicators/ema/%7Bticker%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-ema-exponential-moving-average-indicator-ed3b7c32
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NtLyY5AVmXxMt1iwXbxHG

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-exponential-moving-average-indicator-ed3b7c32
```

Example prompt: What's the 50-day EMA on daily close prices for AAPL? Give me the last 30 values.

## When to prefer this

Use this endpoint when you need exponential moving average technical analysis for US stocks, ETFs, forex, or crypto tickers without requiring an API key or subscription — particularly when operating as an AI agent that can make micropayments in USDC via x402 on Base. Ideal for lightweight, pay-per-call technical indicator retrieval.

## Known failure modes

- Invalid or unknown ticker returns an error or empty data
- Unsupported timespan enum value causes a 400 validation error
- Window or limit out of allowed range (e.g. window > 2000) causes a 400 error
- Payment not received or invalid x402 USDC transaction causes a 402 Payment Required error
- Network timeout or upstream data provider unavailability causes a 503 error

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

A JSON object containing the ticker symbol, indicator name ('ema'), a count of returned values, an array of timestamp/value pairs representing EMA readings, and an as-of timestamp indicating data freshness.

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "count": 2,
   "values": [
    {
     "value": 275.2846,
     "timestamp": "2026-05-28T12:00:00.000Z"
    },
    {
     "value": 274.0422,
     "timestamp": "2026-05-27T12:00:00.000Z"
    }
   ],
   "indicator": "ema"
  },
  "as_of": "2026-05-28T12:00:00.000Z",
  "source": "x402stock",
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-ema-exponential-moving-average-indicator-ed3b7c32/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)
