{"uid":"cap_b7dH_qHrJ_Li-RYXXPQt9","slug":"simple-moving-average-sma-technical-indicator-c3524300","name":"Simple Moving Average (SMA) Technical Indicator","description":"Simple Moving Average (SMA) technical indicator for any ticker — trend-smoothing analytics for stocks, crypto, forex and options.","url":"https://marketdata.use.x402atlas.com/sma","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"},"queryParams":{"type":"object","required":["ticker"],"properties":{"limit":{"type":"integer","maximum":50000,"minimum":1,"description":"Max points returned"},"order":{"enum":["asc","desc"],"type":"string","description":"Result ordering"},"ticker":{"type":"string","description":"Asset-prefixed ticker, e.g. AAPL, X:BTCUSD"},"window":{"type":"integer","maximum":50000,"minimum":1,"description":"Lookback window size"},"timespan":{"enum":["minute","hour","day","week","month","quarter","year"],"type":"string","description":"Aggregate window unit used to compute the indicator"},"series_type":{"enum":["open","high","low","close"],"type":"string","description":"Price field used to compute the indicator"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["queried_at","ticker","indicator","points"],"properties":{"points":{"type":"array","items":{"type":"object","required":["time","value"],"properties":{"time":{"type":"string","format":"date-time","description":"Reading timestamp."},"value":{"type":"number","description":"Indicator value."}}},"description":"Normalized indicator readings, oldest or newest first per `order`."},"ticker":{"type":"string","description":"Echo of the requested ticker."},"timespan":{"type":"string","description":"Echo of the requested timespan, if any."},"indicator":{"type":"string","description":"Which indicator this response is for."},"queried_at":{"type":"string","format":"date-time","description":"UTC timestamp when this bridge queried the upstream."}}}}}}},"responseSchema":{"type":"json","example":{"points":[{"time":"2024-01-02T00:00:00Z","value":182.34}],"ticker":"AAPL","indicator":"sma","queried_at":"2024-01-02T12:00:00Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","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.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aHssOqaHFgS5ayHA4OHxN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns SMA trend-smoothing values for any stock, crypto, forex, or options ticker over a configurable lookback window and timespan.","exampleAgentPrompt":"What's the 50-day simple moving average for AAPL using the daily close price — give me the last 30 data points in descending order.","exampleUseCases":[{"title":"Bitcoin 200-day SMA trend","prompt":"Can you pull the 200-day simple moving average for Bitcoin over the past 6 months using daily close prices? I want to see whether BTC is currently trading above or below that long-term trend line."},{"title":"Hourly SMA for EUR/USD","prompt":"Show me a 20-period simple moving average for EUR/USD on an hourly timespan — I need the last 48 data points so I can spot any short-term trend direction in that forex pair."},{"title":"NVDA 50-day moving average check","prompt":"Is NVDA currently above or below its 50-day moving average? Pull the daily close-based SMA for the last 60 days so I can see where the stock sits relative to that trend line right now."}],"resultDescription":"A time series of SMA values computed over the specified window size and timespan for the given ticker, returned as an array of timestamp-value pairs. Includes computed moving average readings based on the chosen series type (open, high, low, or close).","failureModes":["Missing required 'ticker' parameter returns 400 validation error","Invalid ticker symbol returns empty results or 404","Window size outside valid range causes parameter error","Payment not provided or insufficient USDC balance returns 402 Payment Required","Timespan value not in allowed enum causes rejection","Limit value outside 1-5000 range causes validation error"],"whenToPreferThis":"Use this endpoint when you need trend-smoothing analysis via SMA for any supported asset class (stocks, crypto, forex, options). Prefer this over raw OHLC endpoints when you want pre-computed moving averages rather than raw candlestick data. Choose this over RSI when the user needs trend direction rather than momentum/overbought-oversold signals.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:48.937Z","isFirstParty":false}