Skip to main content
Glama

Twelve Data MCP Server

Official
by twelvedata

GetTimeSeriesMacd

Calculate Moving Average Convergence Divergence (MACD) to analyze momentum, identify trend reversals, and discover trading opportunities using historical time series data for stocks, forex, and cryptocurrencies.

Instructions

The Moving Average Convergence Divergence (MACD) is a momentum indicator that measures the difference between two moving averages, with a signal line used to identify potential trend reversals and trading opportunities.

Input Schema

NameRequiredDescriptionDefault
paramsYes

Input Schema (JSON Schema)

{ "$defs": { "GetTimeSeriesMacdRequest": { "description": "The Moving Average Convergence Divergence (MACD) is a momentum indicator that measures the difference between two moving averages, with a signal line used to identify potential trend reversals and trading opportunities.", "properties": { "adjust": { "default": "splits", "description": "Adjusting mode for prices", "title": "Adjust", "type": "string" }, "apikey": { "default": "demo", "description": "API key", "examples": [ "demo" ], "title": "Apikey", "type": "string" }, "country": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The country where the instrument is traded, e.g., <code>United States</code> or <code>US</code>.", "examples": [ "United States" ], "title": "Country" }, "cusip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The CUSIP of an instrument for which data is requested", "examples": [ "594918104" ], "title": "Cusip" }, "date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Specifies the exact date to get the data for. Could be the exact date, e.g. `2021-10-27`, or in human language `today` or `yesterday`", "examples": [ "2021-10-27" ], "title": "Date" }, "delimiter": { "default": ";", "description": "The separator used in the CSV response data", "title": "Delimiter", "type": "string" }, "dp": { "default": -1, "description": "Specifies the number of decimal places for floating values.\nShould be in range [0, 11] inclusive.\nBy default, the number of decimal places is automatically determined based on the values provided.", "title": "Dp", "type": "integer" }, "end_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The ending date and time for data selection, see `start_date` description for details.", "examples": [ "2024-08-22 16:04:05" ], "title": "End Date" }, "exchange": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Exchange where instrument is traded", "examples": [ "NASDAQ" ], "title": "Exchange" }, "fast_period": { "default": 12, "description": "Number of periods for fast moving average. Takes values in the range from `1` to `800`", "title": "Fast Period", "type": "integer" }, "figi": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The FIGI of an instrument for which data is requested", "examples": [ "BBG01293F5X4" ], "title": "Figi" }, "format": { "default": "JSON", "description": "The format of the response data", "title": "Format", "type": "string" }, "include_ohlc": { "default": false, "description": "Specify if OHLC values should be added in the output", "title": "Include Ohlc", "type": "boolean" }, "interval": { "description": "Interval between two consecutive points in time series", "examples": [ "1min", "5min", "15min", "30min", "45min", "1h", "2h", "4h", "5h", "1day", "1week", "1month" ], "title": "Interval", "type": "string" }, "isin": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Filter by international securities identification number (ISIN)", "examples": [ "US0378331005" ], "title": "Isin" }, "mic_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Market Identifier Code (MIC) under ISO 10383 standard", "examples": [ "XNAS" ], "title": "Mic Code" }, "order": { "default": "desc", "description": "Sorting order of the output", "title": "Order", "type": "string" }, "outputsize": { "default": 30, "description": "Number of data points to retrieve. Supports values in the range from `1` to `5000`. Default `30` when no date parameters are set, otherwise set to maximum", "title": "Outputsize", "type": "integer" }, "prepost": { "default": false, "description": "Returns quotes that include pre-market and post-market data. Only for `Pro` and above plans.\nAvailable at the `1min`, `5min`, `15min`, and `30min` intervals for all US equities.\nOpen, high, low, close values are supplied without volume.", "title": "Prepost", "type": "boolean" }, "previous_close": { "default": false, "description": "A boolean parameter to include the previous closing price in the time_series data. If true, adds previous bar close price value to the current object.", "title": "Previous Close", "type": "boolean" }, "series_type": { "default": "close", "description": "Price type on which technical indicator is calculated", "title": "Series Type", "type": "string" }, "signal_period": { "default": 9, "description": "The time period used for generating the signal line.", "title": "Signal Period", "type": "integer" }, "slow_period": { "default": 26, "description": "Number of periods for slow moving average. Takes values in the range from `1` to `800`", "title": "Slow Period", "type": "integer" }, "start_date": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Can be used separately and together with `end_date`. Format `2006-01-02` or `2006-01-02 15:04:05`\n\nDefault location:\n<ul>\n<li>Forex and Cryptocurrencies - <code>UTC</code></li>\n<li>Stocks - where exchange is located (e.g. for AAPL it will be <code>America/New_York</code>)</li>\n</ul>\nBoth parameters take into account if <code>timezone</code> parameter is provided.<br/>\nIf <code>timezone</code> is given then, <code>start_date</code> and <code>end_date</code> will be used in the specified location\n\nExamples:\n<ul>\n<li>1. <code>&symbol=AAPL&start_date=2019-08-09 15:50:00&</code><br/>\nReturns all records starting from 2019-08-09 15:50:00 New York time up to current date</li>\n<li>2. <code>&symbol=EUR/USD&timezone=Asia/Singapore&start_date=2019-08-09 15:50:00&</code><br/>\nReturns all records starting from 2019-08-09 15:50:00 Singapore time up to current date</li>\n<li>3. <code>&symbol=ETH/BTC&timezone=Europe/Zurich&start_date=2019-08-09 15:50:00&end_date=2019-08-09 15:55:00&...</code><br/>\nReturns all records starting from 2019-08-09 15:50:00 Zurich time up to 2019-08-09 15:55:00</li>\n</ul>", "examples": [ "2024-08-22 15:04:05" ], "title": "Start Date" }, "symbol": { "description": "Symbol ticker of the instrument. E.g. `AAPL`, `EUR/USD`, `ETH/BTC`, ...", "examples": [ "AAPL" ], "title": "Symbol", "type": "string" }, "timezone": { "default": "Exchange", "description": "Timezone at which output datetime will be displayed. Supports:\n<ul>\n<li>1. <code>Exchange</code> for local exchange time</li>\n<li>2. <code>UTC</code> for datetime at universal UTC standard</li>\n<li>3. Timezone name according to the IANA Time Zone Database. E.g. <code>America/New_York</code>, <code>Asia/Singapore</code>. Full list of timezones can be found <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" target=\"blank\">here</a>.</li>\n</ul>\n<i>Take note that the IANA Timezone name is case-sensitive</i>", "title": "Timezone", "type": "string" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The asset class to which the instrument belongs", "examples": [ "Common Stock" ], "title": "Type" } }, "required": [ "symbol", "interval" ], "title": "GetTimeSeriesMacdRequest", "type": "object" } }, "properties": { "params": { "$ref": "#/$defs/GetTimeSeriesMacdRequest" } }, "required": [ "params" ], "title": "GetTimeSeriesMacdArguments", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/twelvedata/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server