{"uid":"cap_IVpur9_aEByGp5UYHb6u2","slug":"x402stock-macd-indicator-b79154ee","name":"x402stock MACD Indicator","description":"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.","url":"https://agents.x402stock.xyz/api/v1/indicators/macd/:ticker?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CZB3dcBcBDYOAglqNdrWa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns MACD time series (value, signal line, histogram) for a given ticker with configurable windows and timespan","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Momentum check before earnings","prompt":"Get me the MACD for TSLA on daily candles with the default 12/26/9 windows for the last 60 bars — I want to see if momentum is accelerating into earnings."},{"title":"Swing trade signal on weekly chart","prompt":"Fetch the weekly MACD for SPY using short window 12, long window 26, and signal window 9 — show me the last 20 data points so I can spot any histogram trend reversals."},{"title":"Crypto momentum analysis","prompt":"What does the hourly MACD look like for BTC/USD right now? Use default windows and give me 50 data points based on close prices so I can assess short-term momentum."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T00:34:50.887Z","isFirstParty":false,"canonicalSlug":"x402stock-macd-indicator-b79154ee"}