# x402stock MACD Indicator

> x402stock MACD 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-22).

Returns MACD time series (value, signal line, histogram) for a given ticker with configurable windows and timespan

## Facts

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

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-macd-indicator-b79154ee
```

Example prompt: Pull the daily MACD for AAPL using the standard 12/26/9 settings and give me the last 30 data points so I can check whether there's a bullish crossover forming.

## When to prefer this

Use this endpoint when you need MACD technical indicator data specifically — including the full MACD line, signal line, and histogram — with flexible window and timespan configuration. Prefer this over raw OHLCV endpoints when the agent needs momentum/trend-following signals ready-to-use without computing EMAs manually. No API key required; pays per call in USDC via x402.

## Known failure modes

- Invalid or unknown ticker symbol returns an error
- Request for too many data points beyond limit cap (5000) rejected
- Invalid timespan enum value returns validation error
- Network or payment failure via x402 protocol prevents data retrieval
- Insufficient historical data for requested window sizes

## How this service works

MACD time series with value, signal line, and histogram. Tune with `?short_window=`, `?long_window=`, `?signal_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 time-ordered array of MACD data points, each containing a timestamp, the MACD line value (difference between short and long EMA), the signal line value (EMA of MACD), and the histogram value (MACD minus signal). Parameters like short_window, long_window, signal_window, timespan, series_type, and limit control the calculation and data range.

## 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
      },
      "adjusted": {
       "type": "boolean",
       "default": true
      },
      "timespan": {
       "enum": [
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
       ],
       "type": "string",
       "default": "day"
      },
      "long_window": {
       "type": "integer",
       "default": 26,
       "maximum": 2000,
       "exclusiveMinimum": 0
      },
      "series_type": {
       "enum": [
        "open",
        "high",
        "low",
        "close"
       ],
       "type": "string",
       "default": "close"
      },
      "short_window": {
       "type": "integer",
       "default": 12,
       "maximum": 2000,
       "exclusiveMinimum": 0
      },
      "signal_window": {
       "type": "integer",
       "default": 9,
       "maximum": 2000,
       "exclusiveMinimum": 0
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-macd-indicator-b79154ee/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)
