{"uid":"cap_UqwQ2qtoxwXdVy2UnzOew","slug":"signals-ellva-ai-e3b424ca","name":"signals.ellva.ai SMA Indicator","description":"Daily Simple Moving Average (SMA) trend indicator for US-listed equities and ETFs. Returns the current SMA value, the last daily close, percent distance of price from the average, and an above/below/at trend signal. Useful for trend analysis, support/resistance, MA crossovers, swing trading, and AI-driven trading agents. Configurable lookback (2-200 trading days, default 20; common 20/50/100/200). Data from Alpaca Markets.","url":"https://signals.ellva.ai/v1/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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["ticker"],"properties":{"period":{"type":"integer","default":20,"maximum":200,"minimum":2,"description":"SMA lookback period in trading days. Default 20 (~1 trading month). Common values: 20, 50, 100, 200. Range 2-200."},"ticker":{"type":"string","description":"US-listed equity or ETF ticker symbol (e.g. SPY, QQQ, AAPL, NVDA, MSFT, TSLA, ARKK). Case-insensitive; alphanumeric, up to 10 characters."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"period":20,"ticker":"SPY"}}},"response":{"sma":731.5377,"period":20,"signal":"above","ticker":"SPY","timestamp":"2026-05-25T04:31:52.486790+00:00","last_close":745.67,"closes_used":60,"distance_pct":1.9319}},"exampleRequest":{"period":20,"ticker":"SPY"},"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6EPUr_ga8_NO6kmDTTS2-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the Simple Moving Average (SMA) value, last close price, percent distance from average, and an above/below/at trend signal for a US-listed equity or ETF ticker.","exampleAgentPrompt":"What's the 50-day simple moving average for NVDA right now, and is the current price above or below it?","exampleUseCases":null,"resultDescription":"Returns a JSON object containing: the computed SMA value (float), the lookback period used, the last daily close price, the number of closes used in the calculation, the percent distance of the close from the SMA, a trend signal string ('above', 'below', or 'at'), and a UTC timestamp of the calculation.","failureModes":["Invalid or unrecognized ticker symbol returns an error","Period outside 2-200 range returns a validation error","Market data unavailable for the ticker (e.g. delisted or OTC securities) may return an error","API returns stale data if Alpaca Markets data feed is delayed","Non-US-listed securities will not be found"],"whenToPreferThis":"Use this endpoint when you need a fast, inexpensive per-call SMA computation with a built-in trend signal for US equities or ETFs. Ideal for AI trading agents, swing trading logic, and trend-following strategies where you need both the raw SMA value and a directional signal. Best when paired with the sibling RSI endpoint for combined momentum and trend analysis. Prefer this over building your own SMA computation when you want Alpaca Markets daily close data with configurable lookback periods (20/50/100/200 days) without managing raw OHLCV data pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:34:40.888Z","isFirstParty":false}