{"uid":"cap_jt4hEsNe2ekrLzC3xtP-k","slug":"x402stock-xyz-d1c1e49e","name":"x402stock.xyz 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://x402stock.xyz/api/v1/indicators/macd/AAPL","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"},"queryParams":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["timespan","series_type","adjusted","short_window","long_window","signal_window","limit"],"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}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ticker","data","source","as_of"],"properties":{"data":{"type":"object","required":["indicator","count","values"],"properties":{"count":{"type":"number"},"values":{"type":"array","items":{"type":"object","required":["timestamp","value"],"properties":{"value":{"type":"number"},"signal":{"type":"number"},"histogram":{"type":"number"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"indicator":{"type":"string"}},"additionalProperties":false},"as_of":{"type":"string"},"source":{"type":"string","const":"x402stock"},"ticker":{"type":"string"},"feedback":{"type":"object","required":["endpoint","method","free","note"],"properties":{"free":{"type":"boolean"},"note":{"type":"string"},"method":{"type":"string","const":"POST"},"endpoint":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"limit":30,"adjusted":true,"timespan":"day","long_window":26,"series_type":"close","short_window":12,"signal_window":9}}},"response":{"data":{"count":30,"values":[{"value":10.391555804023028,"signal":9.777064363321957,"histogram":0.6144914407010713,"timestamp":"2026-05-29T04:00:00.000Z"},{"value":10.424239282449093,"signal":9.623441503146688,"histogram":0.800797779302405,"timestamp":"2026-05-28T04:00:00.000Z"},{"value":10.268511805350045,"signal":9.423242058321087,"histogram":0.8452697470289579,"timestamp":"2026-05-27T04:00:00.000Z"},{"value":10.08940492650214,"signal":9.211924621563846,"histogram":0.8774803049382953,"timestamp":"2026-05-26T04:00:00.000Z"},{"value":9.970626256750847,"signal":8.992554545329272,"histogram":0.9780717114215758,"timestamp":"2026-05-22T04:00:00.000Z"},{"value":9.624103281806356,"signal":8.748036617473877,"histogram":0.8760666643324786,"timestamp":"2026-05-21T04:00:00.000Z"},{"value":9.431790636960045,"signal":8.529019951390756,"histogram":0.9027706855692887,"timestamp":"2026-05-20T04:00:00.000Z"},{"value":9.32812190645501,"signal":8.303327279998435,"histogram":1.0247946264565755,"timestamp":"2026-05-19T04:00:00.000Z"},{"value":9.39408477178921,"signal":8.047128623384289,"histogram":1.3469561484049208,"timestamp":"2026-05-18T04:00:00.000Z"},{"value":9.456690686862487,"signal":7.71038958628306,"histogram":1.7463011005794273,"timestamp":"2026-05-15T04:00:00.000Z"},{"value":9.155701281201573,"signal":7.273814311138202,"histogram":1.8818869700633707,"timestamp":"2026-05-14T04:00:00.000Z"},{"value":8.84402823934056,"signal":6.803342568622359,"histogram":2.040685670718201,"timestamp":"2026-05-13T04:00:00.000Z"},{"value":8.250379691520322,"signal":6.293171150942808,"histogram":1.9572085405775148,"timestamp":"2026-05-12T04:00:00.000Z"},{"value":7.787062749516679,"signal":5.803869015798428,"histogram":1.9831937337182506,"timestamp":"2026-05-11T04:00:00.000Z"},{"value":7.298290030820908,"signal":5.308070582368865,"histogram":1.9902194484520432,"timestamp":"2026-05-08T04:00:00.000Z"},{"value":6.503117723964522,"signal":4.810515720255854,"histogram":1.692602003708668,"timestamp":"2026-05-07T04:00:00.000Z"},{"value":5.992288812682887,"signal":4.387365219328686,"histogram":1.6049235933542008,"timestamp":"2026-05-06T04:00:00.000Z"},{"value":5.245997528644466,"signal":3.9861343209901356,"histogram":1.2598632076543304,"timestamp":"2026-05-05T04:00:00.000Z"},{"value":4.556207598418723,"signal":3.671168519076553,"histogram":0.8850390793421701,"timestamp":"2026-05-04T04:00:00.000Z"},{"value":4.357876340589996,"signal":3.44990874924101,"histogram":0.9079675913489864,"timestamp":"2026-05-01T04:00:00.000Z"},{"value":3.704328061098181,"signal":3.2229168514037627,"histogram":0.4814112096944183,"timestamp":"2026-04-30T04:00:00.000Z"},{"value":3.7112634852944666,"signal":3.102564048980158,"histogram":0.6086994363143088,"timestamp":"2026-04-29T04:00:00.000Z"},{"value":3.7862790487553184,"signal":2.9503891899015806,"histogram":0.8358898588537378,"timestamp":"2026-04-28T04:00:00.000Z"},{"value":3.771971218136173,"signal":2.741416725188146,"histogram":1.0305544929480268,"timestamp":"2026-04-27T04:00:00.000Z"},{"value":4.014480551154804,"signal":2.483778101951139,"histogram":1.5307024492036652,"timestamp":"2026-04-24T04:00:00.000Z"},{"value":3.914345473645369,"signal":2.101102489650223,"histogram":1.813242983995146,"timestamp":"2026-04-23T04:00:00.000Z"},{"value":3.488291676916731,"signal":1.6477917436514364,"histogram":1.8404999332652945,"timestamp":"2026-04-22T04:00:00.000Z"},{"value":2.9202260428824616,"signal":1.1876667603351128,"histogram":1.7325592825473488,"timestamp":"2026-04-21T04:00:00.000Z"},{"value":2.8654189820913416,"signal":0.7545269396982756,"histogram":2.110892042393066,"timestamp":"2026-04-20T04:00:00.000Z"},{"value":2.0532773302148257,"signal":0.22680392910000896,"histogram":1.8264734011148167,"timestamp":"2026-04-17T04:00:00.000Z"}],"indicator":"macd"},"as_of":"2026-05-29T04:00:00.000Z","source":"massive","ticker":"AAPL"}},"exampleRequest":{"limit":30,"adjusted":true,"timespan":"day","long_window":26,"series_type":"close","short_window":12,"signal_window":9},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_ch6d1Uh19iWPnw23tGQ9K","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 (Moving Average Convergence Divergence) technical indicator values for a given stock ticker, including histogram and signal line data.","exampleAgentPrompt":"Can you pull the MACD for AAPL using daily close prices with standard 12/26/9 windows, adjusted for splits, and give me the last 30 data points?","exampleUseCases":null,"resultDescription":"Returns a JSON object with the ticker symbol, source, as-of date, and a data block containing the indicator name ('MACD'), count of values, and an array of timestamped MACD entries each with value (MACD line), signal, and histogram fields.","failureModes":["Invalid or unknown ticker symbol returns empty data or 404","Unsupported timespan enum value returns validation error","window parameters exceeding maximum of 2000 return error","Insufficient historical data for the requested window sizes yields fewer results than limit","Payment failure (402) if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need MACD technical indicator data for US-listed equities and want configurable short/long/signal windows plus multiple timespans. Prefer this over raw price APIs when the goal is momentum or trend analysis without computing the indicator yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:07.277Z","isFirstParty":false}