{"uid":"cap_YYrsQtR4I7dtciQDVoLCy","slug":"macd-indicator-ad5e470e","name":"MACD Indicator","description":"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.","url":"https://agent.massive.com/v1/indicators/macd/:stockTicker","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"],"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":12,"description":"The short window size used to calculate MACD data."},"timestamp.gt":{"type":"string","description":"Range by timestamp."},"timestamp.lt":{"type":"string","description":"Range by timestamp."},"signal_window":{"type":"integer","default":9,"description":"The window size used to calculate the MACD signal line."},"timestamp.gte":{"type":"string","description":"Range by timestamp."},"timestamp.lte":{"type":"string","description":"Range by timestamp."},"expand_underlying":{"type":"boolean","default":false,"description":"Whether or not to include the aggregates used to calculate this indicator in the response."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_upSKL33_1VKcdwhmbVD_S","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 moving average convergence/divergence (MACD) data for a given stock ticker over a configurable time range and window size.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Momentum check for swing trade","prompt":"Get me the last 20 days of MACD data for TSLA using daily close prices so I can see if there's a bullish crossover forming."},{"title":"Algorithmic trading signal pipeline","prompt":"Pull hourly MACD data for SPY going back to 2024-01-01 with a short window of 9 and long window of 21 on close prices — I need up to 500 results in ascending order."},{"title":"Earnings momentum analysis","prompt":"Fetch the weekly MACD data for NVDA for the past year using close prices so I can see how momentum has trended heading into earnings."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:33:36.425Z","isFirstParty":false}