{"uid":"cap_5zRj2jY6T3dvdWyjNxDCV","slug":"exponential-moving-average-ema-indicator-d7c4fdb9","name":"Exponential Moving Average (EMA) Indicator","description":"Get the exponential moving average (EMA) for a ticker symbol over a given time range. Can't find what you're looking for? POST feedback to /feedback, no charge.","url":"https://agent.massive.com/v1/indicators/ema/:stockTicker","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 exponential moving average (EMA) 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."},"window":{"type":"integer","default":50,"description":"The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average."},"adjusted":{"type":"boolean","default":true,"description":"Whether or not the aggregates used to calculate the exponential moving average 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."},"series_type":{"enum":["open","high","low","close"],"type":"string","default":"close","description":"The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to calculate the exponential moving average (EMA)."},"timestamp.gt":{"type":"string","description":"Range by timestamp."},"timestamp.lt":{"type":"string","description":"Range by timestamp."},"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":null,"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_9zLqSjGnGHVfpYHhBflMG","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 the exponential moving average for a stock ticker over a configurable time window and timespan","exampleAgentPrompt":"What's the 20-day EMA for AAPL using daily close prices for the last 30 results, in ascending order?","exampleUseCases":[{"title":"Golden cross trend detection","prompt":"Pull the 50-day and 200-day EMA for SPY using daily close prices — I want to check if a golden cross is forming. Give me the last 20 results in ascending order."},{"title":"Short-term momentum scalping","prompt":"Get me the 10-period EMA for TSLA on an hourly timespan using close prices, last 50 data points descending — I'm looking for short-term momentum signals."},{"title":"Backtesting EMA crossover strategy","prompt":"I need the 12-day and 26-day EMA values for MSFT over the past year, daily close prices, up to 365 results in ascending order so I can backtest a crossover strategy."}],"resultDescription":"Returns a time-ordered series of EMA values for the requested ticker, each entry containing a timestamp and the computed EMA price. Supports filtering by date range, configuring the smoothing window, timespan granularity, price series type (open/high/low/close), and split-adjustment. Results can be paginated up to 5000 entries.","failureModes":["Invalid or unsupported ticker symbol returns an error or empty results","Window size too large for available data history returns sparse or empty series","Case-sensitive ticker mismatch causes no results (e.g. 'aapl' instead of 'AAPL')","Timestamp range with no market data (weekends, holidays) may return empty results","Exceeding max limit of 5000 returns a validation error","Unavailable timespan for a given ticker (e.g. minute-level data not available for OTC)"],"whenToPreferThis":"Use this endpoint when you need exponential moving averages for technical analysis of US stocks or OTC tickers with configurable windows and timespans. Prefer EMA over SMA when you want more weight placed on recent prices. Choose this over the Simple Moving Average sibling endpoint when responsiveness to recent price changes matters (e.g. momentum or trend-following strategies). Best for agents performing technical charting, trend detection, or quantitative backtesting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:49:16.368Z","isFirstParty":false}