---
title: "Moving average convergence divergence"
method: GET
path: "/macd"
tags: ["technical_indicator"]
---

# Moving average convergence divergence

`GET /macd`

This endpoint calculates the Moving Average Convergence Divergence (MACD) for a specified financial instrument. It returns the MACD line, signal line, and histogram values, which help users identify potential trend reversals and trading opportunities by analyzing the relationship between two moving averages.

## Query parameters

- `symbol` string
- `isin` string
- `figi` string
- `cusip` string
- `interval` '1min' | '5min' | '15min' | '30min' | '45min' | '1h' | '2h' | '4h' | '8h' | '1day' | '1week' | '1month', required
- `outputsize` integer
- `exchange` string
- `mic_code` string
- `country` string
- `type` 'American Depositary Receipt' | 'Bond' | 'Bond Fund' | 'Closed-end Fund' | 'Common Stock' | 'Depositary Receipt' | 'Digital Currency' | 'ETF' | 'Exchange-Traded Note' | 'Global Depositary Receipt' | 'Limited Partnership' | 'Mutual Fund' | 'Physical Currency' | 'Preferred Stock' | 'REIT' | 'Right' | 'Structured Product' | 'Trust' | 'Unit' | 'Warrant'
- `timezone` string
- `start_date` string
- `end_date` string
- `date` string
- `order` 'asc' | 'desc'
- `prepost` boolean
- `format` 'JSON' | 'CSV'
- `delimiter` string
- `dp` integer
- `previous_close` boolean
- `adjust` 'all' | 'splits' | 'dividends' | 'none'
- `series_type` 'close' | 'open' | 'high' | 'low' | 'volume'
- `fast_period` integer
- `slow_period` integer
- `signal_period` integer
- `include_ohlc` true | false

## Response `200`

- object
  - `meta` object, required — Json object with request general information
    - `symbol` string, required — The ticker symbol of an instrument for which data was requested.
    - `interval` string, required — The time gap between consecutive data points.
    - `currency` string — The currency of a traded instrument.
    - `exchange_timezone` string — The timezone of the exchange where the instrument is traded.
    - `exchange` string — The exchange name where the instrument is traded.
    - `mic_code` string — The Market Identifier Code (MIC) of the exchange where the instrument is traded.
    - `type` string, required — The asset class to which the instrument belongs.
    - `indicator` object, required — Technical indicator information
      - `name` string, required — Name of the technical indicator
      - `series_type` string, required — Price type on which technical indicator is calculated
      - `fast_period` integer, required — Fast period value
      - `slow_period` integer, required — Slow period value
      - `signal_period` integer, required — Signal period value
  - `values` object[], required — Array of time series data points
    - `datetime` string, required — Datetime in local market time for equities and in UTC for forex and cryptocurrencies referring to when the bar with specified interval was opened
    - `macd` string, required — MACD value
    - `macd_signal` string, required — MACD signal line value
    - `macd_hist` string, required — MACD histogram value
    - `open` string — Price at the opening of current bar. Returned when `include_ohlc` is `true`.
    - `high` string — Highest price which occurred during the current bar. Returned when `include_ohlc` is `true`.
    - `low` string — Lowest price which occurred during the current bar. Returned when `include_ohlc` is `true`.
    - `close` string — Close price at the end of the bar. Returned when `include_ohlc` is `true`.
    - `volume` string — Trading volume which occurred during the current bar. Returned when `include_ohlc` is `true`.
  - `status` string, required — Response status

## Other responses

- `400`
- `401`
- `403`
- `404`
- `414`
- `429`
- `500`

---

[API](https://skmtc.net/twelvedata/apis/twelve-data-api.md) · [All operations](https://skmtc.net/twelvedata/apis/twelve-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twelvedata/twelve-data-api/revisions/c4a12725cdb5/schema)
