# MACD Indicator

> MACD Indicator is a paid API for AI agents from agent.massive.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns moving average convergence/divergence (MACD) data for a given stock ticker over a configurable time range and window size.

## Facts

- Endpoint: GET https://agent.massive.com/v1/indicators/macd/:stockTicker
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macd-indicator-ad5e470e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YYrsQtR4I7dtciQDVoLCy

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

Example prompt: Can you pull the daily MACD data for AAPL for the last 30 data points, using the default 12 and 26 window sizes and close prices, ordered from most recent to oldest?

## When to prefer this

Use this endpoint when you need MACD-specific technical analysis data for a stock ticker, especially for momentum and trend-following strategies. Prefer this over a simple moving average (SMA or EMA) endpoint when you need the convergence/divergence relationship between two EMAs and the signal line histogram. Best for algorithmic trading agents, backtesting pipelines, or dashboards that need configurable MACD parameters.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error or empty results
- Timestamp range produces no data (e.g. weekend or holiday dates)
- limit exceeds maximum of 5000 returns a validation error
- Invalid timespan enum value returns a 400 error
- Network or upstream data provider outage causes 5xx errors

## How this service works

Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range. Can't find what you're looking for? POST feedback to /feedback, no charge.

## Output

Returns a time-ordered list of MACD data points for the specified ticker, each containing the MACD value, signal line value, histogram value, and the corresponding timestamp. Supports filtering by date range, time granularity, and window configuration.

## 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"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "stockTicker"
     ],
     "properties": {
      "stockTicker": {
       "type": "string",
       "description": "Specify a case-sensitive ticker symbol for which to get moving average convergence/divergence (MACD) data. For example, AAPL represents Apple Inc."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 10,
       "maximum": 5000,
       "description": "Limit the number of results returned, default is 10 and max is 5000"
      },
      "order": {
       "enum": [
        "asc",
        "desc"
       ],
       "type": "string",
       "default": "desc",
       "description": "The order in which to return the results, ordered by timestamp."
      },
      "adjusted": {
       "type": "boolean",
       "default": true,
       "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits."
      },
      "timespan": {
       "enum": [
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
       ],
       "type": "string",
       "default": "day",
       "description": "The size of the aggregate time window."
      },
      "timestamp": {
       "type": "string",
       "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp."
      },
      "long_window": {
       "type": "integer",
       "default": 26,
       "description": "The long window size used to calculate MACD data."
      },
      "series_type": {
       "enum": [
        "open",
        "high",
        "low",
        "close"
       ],
       "type": "string",
       "default": "close",
       "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to calculate the MACD."
      },
      "short_window": {
       "type": "integer",
       "default
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macd-indicator-ad5e470e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.massive.com](https://www.zero.xyz/host/agent.massive.com/llms.txt)
