image

A simple moving average smooths a price series over a fixed window.

Send one ticker plus interval, series type, time period, and limit, then read timestamped SMA points. The docs list a default limit of 50 when you do not override it. This is a single-ticker indicator call.

To access this endpoint, you must obtain an API key: Get your API key

The Endpoint

Method: GET

Endpoint: https://api.mboum.com/v1/markets/indicators/sma

Documentation: SMA indicator

GET /v1/markets/indicators/sma returns the simple moving average for one ticker. The sample request is ticker=AAPL, interval=1d, series_type=close, time_period=50, and limit=50.

Parameters

  • ticker: Required. One ticker per request. The example is AAPL. This endpoint is not a batch quote call.
  • interval: Required. Allowed values and approximate ranges:
    • 1m — about 1 day
    • 5m — about 1 month
    • 15m — about 1 month
    • 30m — about 1 month
    • 1d — about 5 years
    • 1wk — about 5 years
    • 1mo — about 10 years
    • 3mo — about 10 years
  • series_type: The price series that feeds the average. Use open, close, high, or low. The example uses close.
  • time_period: The window length. The example is 50.
  • limit: How many points to return. The example is 50. The docs say the default limit is 50.

Python Example

The script requests a 50-day SMA on daily closes for AAPL and prints each timestamp and SMA. Send a Bearer token from your Mboum API key.

import requests

url = "https://api.mboum.com/v1/markets/indicators/sma"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
    "ticker": "AAPL",
    "interval": "1d",
    "series_type": "close",
    "time_period": 50,
    "limit": 50,
}

response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
payload = response.json()
for item in payload["body"]:
    print(item["timestamp"], item["SMA"])

Understanding the Response

A successful response has meta and body. Meta echoes the request so you can confirm the series. Each body item is one SMA point. The shortened example below is one point.

{
  "meta": {
    "symbol": "AAPL",
    "interval": "1d",
    "series_type": "close",
    "indicator": "Simple Moving Average (SMA)",
    "time_period": 50
  },
  "body": [
    {
      "timestamp": 1700000000,
      "SMA": 185.12
    }
  ]
}

Walk the body in order and pair each timestamp with its SMA value. That is the full series this endpoint returns for the parameters you sent. If the plot looks shorter or longer than you expected, check limit and whether the interval’s available history matches the window you had in mind.

Key Fields

  • symbol, interval, series_type, indicator, and time_period: Meta for the request that produced the series. In the sample, the indicator is Simple Moving Average (SMA), the symbol is AAPL, the interval is 1d, the series type is close, and the time period is 50.
  • timestamp: The point’s time. The shortened example uses 1700000000.
  • SMA: The simple moving average at that timestamp. The shortened example uses 185.12.

Practical Use Cases

A 50-day close average

Use daily bars when you want a multi-year SMA context. Set interval=1d, series_type=close, and time_period=50. Keep limit=50 if that return size is enough. Confirm meta shows the same symbol, interval, series type, and time period, then print each timestamp and SMA.

Matching the interval to the window

A 1m interval covers about one day of candles, while 1d covers about five years. The same time_period number means very different calendar spans depending on the interval. Switch to a minute interval only when you need intraday smoothing, and always send exactly one ticker.

Learn more or explore other endpoints: SMA indicator

How to Read Congressional Insider Trades with the Mboum API Oct 19, 2026

How to Read Congressional Insider Trades with the Mboum API

Congressional trade disclosures put the member name, symbol, transaction type, and USD value on the same row.

How to Calculate MACD with the Mboum API Oct 18, 2026

How to Calculate MACD with the Mboum API

MACD is the Moving Average Convergence/Divergence indicator you use when you need the MACD line, the signal line, and the histogram for one ticker on a shared timestamp grid.

How to Calculate an Exponential Moving Average with the Mboum API Oct 17, 2026

How to Calculate an Exponential Moving Average with the Mboum API

An exponential moving average weights recent prices more heavily than a simple average over the same window.

How to Calculate a Simple Moving Average with the Mboum API Oct 17, 2026

How to Calculate a Simple Moving Average with the Mboum API

A simple moving average smooths a price series over a fixed window.