image

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.

This guide covers GET /v1/markets/indicators/macd only. Send one ticker per request. There is no time_period parameter on MACD. You set fast_period, slow_period, and signal_period instead.

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/macd

Documentation: MACD indicator

The sample request uses daily closes with fast_period=12, slow_period=26, signal_period=9, and limit=50 for ticker=AAPL. That combination is enough to confirm the three output keys and the meta fields.

Parameters

  • ticker: Required. One ticker per request. The example is AAPL. If you need another name, make a second request.
  • interval: 1m, 5m, 15m, 30m, 1d, 1wk, 1mo, or 3mo. Documented ranges: 1m about 1 day; 5m, 15m, and 30m about 1 month; 1d and 1wk about 5 years; 1mo and 3mo about 10 years. The example uses 1d. Intraday intervals cover a shorter window than daily or weekly.
  • series_type: open, close, high, or low. The example uses close. Match it to the price series you actually chart.
  • fast_period: Example 12. There is no time_period on this endpoint.
  • slow_period: Example 26.
  • signal_period: Example 9. Period control is only through fast_period, slow_period, and signal_period.
  • limit: Example 50. The docs default is 50. Raise or lower it only after the first page of points parses cleanly.

Python Example

The script requests MACD for AAPL on daily closes and prints timestamp, MACD, MACD_Signal, and MACD_Hist for the first few points. Send a Bearer token from your Mboum API key.

import requests

url = "https://api.mboum.com/v1/markets/indicators/macd"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {
    "ticker": "AAPL",
    "interval": "1d",
    "series_type": "close",
    "fast_period": "12",
    "slow_period": "26",
    "signal_period": "9",
    "limit": "50",
}

response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
for point in response.json().get("body", [])[:5]:
    print(point["timestamp"], point["MACD"], point["MACD_Signal"], point["MACD_Hist"])

Understanding the Response

A successful response has meta and body. The indicator label is Moving Average Convergence/Divergence (MACD). body is a list. The shortened example below shows the key names. Values in the body item are placeholders for shape only.

{
  "meta": {
    "symbol": "AAPL",
    "interval": "1d",
    "series_type": "close",
    "indicator": "Moving Average Convergence/Divergence (MACD)",
    "fast_period": 12,
    "slow_period": 26,
    "signal_period": 9
  },
  "body": [
    {
      "timestamp": "...",
      "MACD": "...",
      "MACD_Signal": "...",
      "MACD_Hist": "..."
    }
  ]
}

Read timestamp, MACD, MACD_Signal, and MACD_Hist together so the histogram stays aligned with the two lines on the same timestamp. When you store rows, keep the key names exactly as returned.

Key Fields

  • symbol, interval, series_type, and indicator: Meta for the request. The sample indicator is Moving Average Convergence/Divergence (MACD), the symbol is AAPL, the interval is 1d, and the series type is close.
  • fast_period, slow_period, and signal_period: The period trio echoed in meta. The sample uses 12, 26, and 9. This endpoint does not return a time_period field.
  • timestamp, MACD, and MACD_Signal: The shared time plus the MACD line and the signal line. Keep those key names as returned.
  • MACD_Hist: The histogram. Read it next to MACD and MACD_Signal. Do not rename those keys.

Practical Use Cases

Reading the three series together

Call the endpoint with ticker=AAPL, interval=1d, series_type=close, fast_period=12, slow_period=26, signal_period=9, and limit=50. Confirm meta.indicator and the three period fields match what you sent. Print timestamp, MACD, MACD_Signal, and MACD_Hist for the first few body items and plot or store them without renaming keys.

Changing the chart settings

Once the three series parse on daily closes, change interval or the period trio only when your chart settings change. Keep one ticker per request. Pick interval with the documented history ranges in mind.

Learn more or explore other endpoints: MACD indicator

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 Compare Analyst Target Estimates with the Mboum API Oct 16, 2026

How to Compare Analyst Target Estimates with the Mboum API

Analyst target estimates sit next to last price so you can compare where the mean, high, and low targets sit relative to the current quote.

How to Search Tickers with the v2 Mboum API Oct 15, 2026

How to Search Tickers with the v2 Mboum API

Ticker search turns a partial string into a list of symbols you can feed into quotes, history, or options calls.