{"uid":"cap_YikEIGj3PSWq5qWxvc2vg","slug":"agents-x402stock-xyz-x402stock-simple-moving-average-sma-time-series-0556ecff","name":"x402stock Simple Moving Average (SMA) Time Series","description":"Simple Moving Average time series. Tune with ?window=, ?timespan=, ?series_type=, ?limit=.","url":"https://agents.x402stock.xyz/api/v1/indicators/sma/{ticker}?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["ticker"],"properties":{"limit":{"type":"integer","default":30,"maximum":5000,"exclusiveMinimum":0},"ticker":{"type":"string","description":"US-listed ticker symbol (uppercase), e.g. AAPL."},"window":{"type":"integer","default":50,"maximum":2000,"exclusiveMinimum":0},"adjusted":{"type":"boolean","default":true},"timespan":{"enum":["minute","hour","day","week","month","quarter","year"],"type":"string","default":"day"},"series_type":{"enum":["open","high","low","close"],"type":"string","default":"close"}}},"responseSchema":{"type":"object","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":{"type":"string","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},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.01","displayCostAsset":"USD","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":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xGXG5lIo7PwpsSAkwnp6g","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agents.x402stock.xyz","brandSlug":"agents-x402stock-xyz-x402","brandBaseUrl":"https://agents.x402stock.xyz","brandDocsUrl":null,"whatItDoes":"Returns a time series of Simple Moving Average (SMA) values for a US-listed stock or ETF ticker, with configurable window, timespan, series type, and limit.","exampleAgentPrompt":"Pull the 50-day simple moving average time series for AAPL on daily bars using close prices, going back 100 data points.","exampleUseCases":[{"title":"Golden cross detection for swing trading","prompt":"Get me the last 200 data points of the 50-day and 200-day daily SMA for SPY using close prices — I want to see if there's a golden cross forming."},{"title":"Short-term momentum check on a single stock","prompt":"What does the 20-day simple moving average look like for NVDA over the past 60 days on daily bars? Use adjusted close prices."},{"title":"Intraday trend filter for algorithmic strategy","prompt":"Fetch the 10-period SMA for TSLA on hourly bars, using close prices, for the last 100 data points — I need it to filter intraday trend direction."}],"resultDescription":"Returns a JSON object containing the ticker symbol, an indicator name string ('SMA'), a count of returned values, and an array of timestamp/value pairs representing the SMA at each bar. Also includes the source ('x402stock') and an as-of timestamp for freshness. Each value entry contains a timestamp and the computed SMA float value.","failureModes":["Invalid or unsupported ticker symbol returns an error or empty dataset","Window size larger than available historical data may return fewer points than requested","Exceeding maximum limit (5000) or window (2000) returns a validation error","Network or payment failure via x402 results in a 402 Payment Required response","Requesting a very short timespan with a very large window may produce no valid SMA values"],"whenToPreferThis":"Choose this endpoint when you need a clean, pre-computed SMA time series for a US-listed equity or ETF without standing up your own calculation pipeline. It is ideal for agents doing technical analysis, trend detection, or signal generation where SMA is the specific indicator needed. Prefer it over raw OHLCV endpoints when you want the smoothed average directly rather than computing it yourself. It supports a wide range of timespans (minute to year) and window sizes, making it flexible for both intraday and long-term strategies.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:40:16.491Z","isFirstParty":false,"canonicalSlug":"agents-x402stock-xyz-x402stock-simple-moving-average-sma-time-series-0556ecff"}