{"uid":"cap_Lpj-KOX8GikfHYD-Hb1zj","slug":"massive-x402-api-macd-indicator-2aa68675","name":"Massive x402 API – MACD Indicator","description":"US stock market data, sold per request over x402. Every path here answers 402 with the payment terms in the PAYMENT-REQUIRED header, and answers with the data once the payment settles. No account, no API key, no subscription.","url":"https://agent.massive.com/v1/indicators/macd/%7BstockTicker%7D","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":{"type":"json","example":{"status":"OK","results":{"values":[{"value":145.3613333333,"signal":106.9811666667,"histogram":38.3801666667,"timestamp":1517562000016},{"value":143.8374874833,"signal":102.7386283473,"histogram":41.098859136,"timestamp":1517562001016}],"underlying":{"url":"https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"}},"next_url":"https://api.massive.com/v1/indicators/macd/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy","request_id":"a47d1beb8c11b6ae897ab76cdbbf35a3"}},"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_j_Fsb9jmpXkRd3Kg67i3g","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) technical indicator data for a given US stock ticker, paid per-request via x402 micropayment.","exampleAgentPrompt":"Pull the daily MACD indicator for AAPL using a 12-day short window, 26-day long window, and close prices — give me the last 20 data points in descending order.","exampleUseCases":[{"title":"Momentum signal detection for swing trading","prompt":"Get me the last 30 daily MACD values for TSLA using close prices so I can check for recent bullish crossovers."},{"title":"Weekly MACD trend for portfolio review","prompt":"Fetch the weekly MACD data for SPY for the past year — short window 12, long window 26 — ordered oldest to newest, so I can chart the trend."},{"title":"Custom window MACD for quant strategy","prompt":"Pull hourly MACD data for NVDA using a short window of 8 and a long window of 21, based on close prices, for the last 50 data points."}],"resultDescription":"A JSON object containing an array of MACD result entries, each with a MACD value, signal line value, histogram value, and Unix millisecond timestamp. Also includes a URL to the underlying aggregate data used for the calculation and a next_url cursor for pagination.","failureModes":["Payment not settled — request returns 402 with payment terms if x402 payment is not provided or fails","Invalid ticker symbol — may return an error or empty results if the ticker does not exist","Out-of-range limit — values above 5000 are rejected","Invalid timespan enum — only minute/hour/day/week/month/quarter/year are accepted","Invalid timestamp format — must be YYYY-MM-DD or millisecond epoch","No data available — some tickers or date ranges may have no aggregate data to compute MACD from"],"whenToPreferThis":"Use this endpoint when you need MACD technical indicator data for US equities without requiring an account, API key, or subscription — ideal for pay-per-use agent workflows where you only need occasional or on-demand technical analysis. Prefer this over subscription-based data providers when cost-per-call economics are favorable and when you need flexible parameterization of windows, timespans, and price series types.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:43:57.131Z","isFirstParty":false}