NAV Navbar

Getting Started

Welcome to the twelvedata API! You can use our API to access twelvedata API endpoints, which can get information on time series and technical indicators in our databases.

code & output ${examples} can be found in this section

Authentication

You can use our demo requests from the documentation to familiarize yourself with our API. For full access, you’ll have to obtain a personal free API Key.

Endpoints

All endpoints are prefixed with https://api.twelvedata.com

Parameters

Roadmap

We continuously work to make twelvedata API the only place where all users can obtain the necessary financial data. If you have any questions or ideas about improvement, you can email us at [email protected]

Libraries and integrations

Here, we will publish libraries created to get the most of twelvedata API. Below is the list of most popular libraries. A full list can be found on GitHub.

Language URL

Support

You can check our support page for the FAQ section. If you can’t find the question, you can email us at [email protected]

Reference Data

Reference Data returns general data that can be used to enhance your project generalization.

Stocks List

This API call returns an array of symbols available at twelvedata API. This list is updated daily.

HTTP request example

https://api.twelvedata.com/stocks

This request will return JSON with the following structure

[
  {
    "symbol": "AAPL",
    "name": "Apple Inc",
    "exchange": "NASDAQ",
    "country": "United States",
    "type": "COMMON_STOCK"
  },
  {
    "symbol": "AAT",
    "name": "American Assets Trust Inc",
    "exchange": "NYSE",
    "country": "United States",
    "type": "REIT"
  },
  {...}
]

HTTP route

/stocks

API Parameters

Parameter Details
format • Parameter is optional
• Value can be CSV or JSON
• Default JSON

Response

Key Description
symbol symbol which can be used when making requests
name full name of instrument
type common issue type

JSON request example

https://api.twelvedata.com/stocks

Downloadable CSV example

https://api.twelvedata.com/stocks?output=CSV

Stock Exchanges List

This API call return array of stock exchanges available at twelvedata API. This list is daily updated.

HTTP request example

https://api.twelvedata.com/stock_exchanges

This request will return JSON with the following structure

[
  {
    "name": "NASDAQ",
    "country": "United States"
  },
  {
    "name": "NYSE",
    "country": "United States"
  },
  {...}
]

HTTP route

/stock_exchanges

API Parameters

Parameter Details
format • Parameter is optional
• Value can be CSV or JSON
• Default JSON

Response

Key Description
name name of stock exchange
country country to which stock exchange belongs to

JSON request example

https://api.twelvedata.com/stock_exchanges

Downloadable CSV example

https://api.twelvedata.com/stock_exchanges?format=CSV

Forex Pairs List

This API call return array of forex pairs available at twelvedata API. This list is daily updated.

HTTP request example

https://api.twelvedata.com/forex_pairs

This request will return JSON with the following structure

[
  {
    "pair": "EUR/USD",
    "currency_group": "Major",
    "currency_base": "Euro",
    "currency_quote": "US Dollar"
  },
  {
    "pair": "XAU/USD",
    "currency_group": "Exotic",
    "currency_base": "Gold Spot",
    "currency_quote": "US Dollar"
  },
  {...}
]

HTTP route

/forex_pairs

API Parameters

Parameter Details
format • Parameter is optional
• Value can be CSV or JSON
• Default JSON

Response

Key Description
pair currency pair according to ISO 4217 standard codes with slash(/) delimiter
currency_group group to which currency pair belongs to, could be: Major, Minor, Exotic and Exotic-Cross
currency_base base currency name according to ISO 4217 standard
currency_quote quote currency name according to ISO 4217 standard

JSON request example

https://api.twelvedata.com/forex_pairs

Downloadable CSV example

https://api.twelvedata.com/forex_pairs?format=CSV

Cryptocurrencies List

This API call return array of cryptocurrency pairs available at twelvedata API. This list is daily updated.

HTTP request example

https://api.twelvedata.com/cryptocurrencies

This request will return JSON with the following structure

[
  {
    "pair": "BTC/USD",
    "available_exchanges": ["ABCC", "Allcoin", "BTC-Alpha", "BTCTurk", "Bibox", "BigONE", "Binance", "Bit-Z", "BitForex", "BitMEX", "BitMart", "BitMax", "BitStamp", "Bitex.la", "Bitfinex", "Bitibu", "Bitinka", "Bitlish", "Bitrue", "Bittrex", "Btcwinex", "C2CX", "CBX", "CEX.IO", "COINEGG", "Cobinhood", "CoinAll", "CoinField", "CoinHub", "CoinTiger", "Coinbase Pro", "Coinbene", "CoinsBank", "Coinsbit", "CryptalDash", "DragonEX", "EXX", "Exmo", "Exrates", "GDAX", "Gate.io", "Gemini", "HitBTC", "Huobi", "IDAX", "IDCM", "Independent Reserve", "Kraken", "Kryptono", "Kucoin", "LBank", "LakeBTC", "Livecoin", "OKCoin", "OKEx", "OOOBTC", "Panxora", "Poloniex", "QUOINE", "SIMEX", "Tidex", "Upbit", "YoBit", "ZB.COM", "bitFlyer", "itBit", "n.exchange", "p2pb2b", "xBTCe"],
    "currency_base": "Bitcoin",
    "currency_quote": "US Dollar"
  },
  {
    "pair": "ETH/BTC",
    "available_exchanges": ["ABCC", "Allcoin", "BTC Indonesia", "BTC Markets", "BTC-Alpha", "BXThailand", "Bibox", "BigONE", "Bilaxy", "Binance", "Bit-Z", "BitBay", "BitForex", "BitMart", "BitStamp", "Bitbank", "Bitci.com", "BiteBTC", "Bitfinex", "Bitibu", "Bitlish", "Bittrex", "Btcwinex", "CBX", "CEX.IO", "COINEGG", "Cobinhood", "CoinAll", "CoinExchange", "CoinMex", "CoinTiger", "Coinbase Pro", "Coinbene", "Coinsbit", "EXX", "Exmo", "Exrates", "Fatbtc", "GDAX", "GOPAX", "Gate.io", "Gemini", "HitBTC", "Hotbit", "Huobi", "IDAX", "IDCM", "Kraken", "Kryptono", "Kucoin", "LBank", "LakeBTC", "Livecoin", "OKEx", "Panxora", "Poloniex", "QUOINE", "SIMEX", "STEX", "TOKOK", "Tidex", "Upbit", "Vebitcoin", "YoBit", "ZB.COM", "Zaif", "bitFlyer", "p2pb2b", "xBTCe"],
    "currency_base": "Ethereum",
    "currency_quote": "Bitcoin"
  },
  {...}
]

HTTP route

/cryptocurrencies

API Parameters

Parameter Details
format • Parameter is optional
• Value can be CSV or JSON
• Default JSON

Response

Key Description
pair cryptocurrency pair codes with slash(/) delimiter
available_exchanges array of exchanges where requested cryptocurrency is traded and available at twelvedata API
currency_base base cryptocurrency name
currency_quote quote cryptocurrency name

JSON request example

https://api.twelvedata.com/cryptocurrencies

Downloadable CSV example

https://api.twelvedata.com/cryptocurrencies?format=CSV

Cryptocurrency Exchanges List

This API call return array of cryptocurrency exchanges available at twelvedata API. This list is daily updated.

HTTP request example

https://api.twelvedata.com/cryptocurrency_exchanges

This request will return JSON with the following structure

[
  {
    "name": "Binance",
  },
  {
    "name": "Upbit",
  },
  {
    "name": "Huobi",
  },
  {
    "name": "Bittrex",
  },
  {
    "name": "Bithumb",
  },
  {...}
]

HTTP route

/cryptocurrency_exchanges

API Parameters

Parameter Details
format • Parameter is optional
• Value can be CSV or JSON
• Default JSON

Response

Key Description
name name of cryptocurrency exchange

JSON request example

https://api.twelvedata.com/cryptocurrency_exchanges

Downloadable CSV example

https://api.twelvedata.com/cryptocurrency_exchanges?format=CSV

Time Series

Time Series returns OHLC prices in real-time for the selected interval.

Stocks

This API call returns meta and time series for equities. "meta" is the object consisting of general information about the requested symbol. "time_series" is the array of objects ordered by time descending with Open, High, Low, Close prices + Volume.

HTTP request example

https://api.twelvedata.com/time_series?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "currency":"USD",
      "type":"COMMON_STOCK",
      "exchange_timezone":"America/New_York",
      "exchange":"NASDAQ"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "close":"201.05000",
         "high":"201.25599",
         "low":"200.85199",
         "open":"200.93999",
         "volume":"472287"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "close":"200.93499",
         "high":"201.13000",
         "low":"200.83999",
         "open":"201.02999",
         "volume":"209854"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "close":"201.02000",
         "high":"201.07000",
         "low":"200.91000",
         "open":"201.02000",
         "volume":"149032"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "close":"201.03340",
         "high":"201.25999",
         "low":"201.03340",
         "open":"201.11999",
         "volume":"178892"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "close":"201.13000",
         "high":"201.75999",
         "low":"201.07000",
         "open":"201.75999",
         "volume":"372886"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/time_series

API Parameters

Parameter Details
symbol • Required parameter
• Name of instrument you want to request
• For preffered stocks use dot(.) delimiter
E.g. BRK.A or BRK.B will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Exchange where instrument is traded
• Exchanges list is available at /stock_exchanges endpoint
• Type string
country • Parameter is optional
• Country where instrument is traded
• Countries list is available at /stock_exchanges endpoint
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime at local exchange time referring to when the bar with specified interval was opened
close close price at the end of the bar
high highest price which occurred during the current bar
low lowest price which occurred during the current bar
open price at the opening of current bar
volume trading volume which occurred during the current bar

JSON request example

https://api.twelvedata.com/time_series?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/time_series?symbol=MSFT&interval=1day&outputsize=12&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/time_series?symbol=CSCO&interval=5min&format=CSV&apikey=demo

Forex

This API call returns meta and time series for Foreign Exchange(Forex). Meta object consists of general information about requested currency pair. Time series is the array of objects order by time desceding with Open, High, Low and Close prices.

HTTP request example

https://api.twelvedata.com/time_series?symbol=EUR/USD&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"EUR/USD",
      "interval":"1min",
      "currency_base":"Euro",
      "currency_quote":"US Dollar",
      "type":"PHYSICAL_CURRENCY"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 20:59:00",
         "close":"1.12020",
         "high":"1.12020",
         "low":"1.11989",
         "open":"1.12000"
      },
      {
         "datetime":"2019-08-09 20:58:00",
         "close":"1.12010",
         "high":"1.12010",
         "low":"1.12004",
         "open":"1.12004"
      },
      {
         "datetime":"2019-08-09 20:57:00",
         "close":"1.12004",
         "high":"1.12020",
         "low":"1.12004",
         "open":"1.12010"
      },
      {
         "datetime":"2019-08-09 20:56:00",
         "close":"1.12010",
         "high":"1.12024",
         "low":"1.12010",
         "open":"1.12024"
      },
      {
         "datetime":"2019-08-09 20:55:00",
         "close":"1.12020",
         "high":"1.12024",
         "low":"1.12004",
         "open":"1.12010"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/time_series

API Parameters

Parameter Details
symbol • Required parameter
• Currency pair you want to request
• Slash(/) delimiter is used
E.g. EUR/USD or CAD/JPY will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in UTC referring to when the bar with specified interval was opened
close close price at the end of the bar
high highest price which occurred during the current bar
low lowest price which occurred during the current bar
open price at the opening of current bar

JSON request example

https://api.twelvedata.com/time_series?symbol=EUR/USD&interval=1min&apikey=demo

https://api.twelvedata.com/time_series?symbol=USD/JPY&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/time_series?symbol=GBP/USD&interval=15min&format=CSV&apikey=demo

Cryptocurrency

This API call returns meta and time series for cryptocurrencies. Meta object consists of general information about requested currency pair. Time series is the array of objects ordered by time desceding with Open, High, Low and Close prices.

HTTP request example

https://api.twelvedata.com/time_series?symbol=BTC/USD&exchange=Binance&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"BTC/USD",
      "interval":"1min",
      "currency_base":"Bitcoin",
      "currency_quote":"US Dollar",
      "exchange":"Binance",
      "type":"DIGITAL_CURRENCY"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 17:01:00",
         "close":"11786.45996",
         "high":"11786.45996",
         "low":"11786.45996",
         "open":"11786.45996"
      },
      {
         "datetime":"2019-08-09 17:00:00",
         "close":"11783.84960",
         "high":"11783.84960",
         "low":"11783.84960",
         "open":"11783.84960"
      },
      {
         "datetime":"2019-08-09 16:59:00",
         "close":"11791.19042",
         "high":"11791.19042",
         "low":"11791.19042",
         "open":"11791.19042"
      },
      {
         "datetime":"2019-08-09 16:58:00",
         "close":"11798.42968",
         "high":"11791.19042",
         "low":"11798.42968",
         "open":"11798.42968"
      },
      {
         "datetime":"2019-08-09 16:57:00",
         "close":"11814.45996",
         "high":"11814.45996",
         "low":"11814.45996",
         "open":"11814.45996"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/time_series

API Parameters

Parameter Details
symbol • Required parameter
• Cryptocurrency pair you want to request
• Slash(/) delimiter is used
E.g. BTC/USD or XRP/ETH will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Exchange where cryptocurrency is traded
• Exchanges list is available at /cryptocurrency_exchanges endpoint
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in UTC referring to when the bar with specified interval was opened
close close price at the end of the bar
high highest price which occurred during the current bar
low lowest price which occurred during the current bar
open price at the opening of current bar

JSON request example

https://api.twelvedata.com/time_series?symbol=BTC/USD&exchange=Binance&interval=1min&apikey=demo

https://api.twelvedata.com/time_series?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/time_series?symbol=ETH/BTC&exchange=Huobi&interval=30min&format=CSV&apikey=demo

Technical Indicators

Technical indicators return real-time values of select indicators at selected intervals.

Chaikin A/D Line(AD) calculates Advance/Decline of an asset. This indicator belongs to the group of Volume Indicators.

This API call returns meta and time series values of AD. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ad?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"AD - Chaikin A/D Line",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ad":"2262629.83773"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ad":"2271951.53983"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ad":"2344317.27255"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ad":"2288433.82567"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ad":"2467325.82567"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ad

API Parameters

Parameter Details
symbol • Required parameter
• Name of instrument you want to request
• For preffered stocks use dot(.) delimiter
E.g. BRK.A or BRK.B will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ad chaikin a/d line value

JSON request example

https://api.twelvedata.com/ad?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ad?symbol=XOM&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ad?symbol=GS&interval=30min&format=CSV&apikey=demo

ADOSC

Chaikin A/D Oscillator(ADOSC) is an indicator of indicator which has an idea to find relationship between increasing and deacreasing volume with price fluctuations. The Chaikin Oscillator measures the momentum of the Accumulation/Distribution Line(ADL) using two Exponential Moving Averages of varying length to the line(MACD).

This API call returns meta and time series values of ADOSC. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/adosc?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ADOSC - Chaikin A/D Oscillator",
      "fast_period":12,
      "slow_period":26
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "adosc":"-233315.15185"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "adosc":"-214691.54601"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "adosc":"-188747.38536"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "adosc":"-160255.93296"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "adosc":"-115869.53282"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/adosc

API Parameters

Parameter Details
symbol • Required parameter
• Name of instrument you want to request
• For preffered stocks use dot(.) delimiter
E.g. BRK.A or BRK.B will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
slow_period • Parameter is optional
• Number of periods for slow moving average. Must be at least 1
• Type int; Default 26
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
adosc chaikin a/d oscillator value

JSON request example

https://api.twelvedata.com/adosc?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/adosc?symbol=XOM&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/adosc?symbol=GS&interval=30min&format=CSV&apikey=demo

ADX

Average Directional Movement Index(ADX) is used to decide if the price trend is strong.

This API call returns meta and time series values of ADX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/adx?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ADX - Average Directional Movement Index",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "adx":"49.22897"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "adx":"47.73058"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "adx":"44.90916"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "adx":"41.9312"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "adx":"38.83754"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/adx

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
adx average directional movement index value

JSON request example

https://api.twelvedata.com/adx?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/adx?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/adx?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ADXR

Average Directional Movement Index Rating(ADXR) is a smoothed version of ADX indicator. ADXR quantifies momentum change in the ADX.

This API call returns meta and time series values of ADXR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/adxr?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ADXR - Average Directional Movement Index Rating",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "adxr":"37.43665"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "adxr":"36.83599"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "adxr":"35.58524"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "adxr":"34.41498"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "adxr":"33.21139"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/adxr

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
adxr average directional movement index rating value

JSON request example

https://api.twelvedata.com/adxr?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/adxr?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/adxr?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

APO

Absolute Price Oscillator(APO) calculates the difference between two price moving averages.

This API call returns meta and time series values of APO. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/apo?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"APO - Absolute Price Oscillator",
      "time_period":9,
      "fast_period":12,
      "slow_period":26,
      "ma_type":"ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "apo":"-0.54508"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "apo":"-0.47169"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "apo":"-0.39004"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "apo":"-0.3087"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "apo":"-0.23315"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/apo

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
slow_period • Parameter is optional
• Number of periods for slow moving average. Must be at least 1
• Type int; Default 26
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
apo absolute price oscillator value

JSON request example

https://api.twelvedata.com/apo?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/apo?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/apo?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

AROON

Aroon Indicator(AROON) is used to identify if the price is trending. It can also spot beginning of new trend and it's strength.

This API call returns meta and time series values of AROON. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/aroon?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"AROON - Aroon Indicator",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "aroon_down":"92.85714",
         "aroon_up":"0.0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "aroon_down":"100.0",
         "aroon_up":"7.14286"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "aroon_down":"100.0",
         "aroon_up":"0.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "aroon_down":"100.0",
         "aroon_up":"0.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "aroon_down":"100.0",
         "aroon_up":"7.14286"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/aroon

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
aroon_down aroon_down value
aroon_up aroon_up value

JSON request example

https://api.twelvedata.com/aroon?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/aroon?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/aroon?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

AROONOSC

Aroon Oscillator(AROONOSC) uses classic Aroon(Aroon Up and Aroon down) to measure the strength of persisting trend and it's chances to persist.

This API call returns meta and time series values of AROONOSC. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/aroonosc?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"AROONOSC - Aroon Oscillator",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "aroonosc":"-92.85714"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "aroonosc":"-92.85714"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "aroonosc":"-100.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "aroonosc":"-100.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "aroonosc":"-92.85714"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/aroonosc

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
aroonosc aroon oscillator value

JSON request example

https://api.twelvedata.com/aroonosc?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/aroonosc?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/aroonosc?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ATR

Average True Range(ATR) is used to measure market volatility by decomposing all asset prices over specified time period.

This API call returns meta and time series values of ATR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/atr?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ATR - Average True Range",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "atr":"0.19828"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "atr":"0.18246"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "atr":"0.17419"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "atr":"0.17528"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "atr":"0.17133"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/atr

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
atr average true range value

JSON request example

https://api.twelvedata.com/atr?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/atr?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/atr?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

AVGPRICE

Average Price(AVGPRICE) uses formula: (open + high + low + close) / 4.

This API call returns meta and time series values of AVGPRICE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/avgprice?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"AVGPRICE - Average Price",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "avgprice":"201.02449"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "avgprice":"200.98375"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "avgprice":"201.005"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "avgprice":"201.1117"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "avgprice":"201.43"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/avgprice

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
avgprice average price value

JSON request example

https://api.twelvedata.com/avgprice?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/avgprice?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/avgprice?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

BBANDS

Bollinger Bands(BBANDS) are volatility bands located above and below a moving average. Volatility size parameter depends on standard deviation.

This API call returns meta and time series values of BBANDS. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/bbands?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"BBANDS - Bollinger Bands",
      "series_type":"series_type",
      "time_period":20,
      "sd":2,
      "ma_type":"ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "upper_band":"203.36511",
         "middle_band":"202.04999",
         "lower_band":"200.73486"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "upper_band":"203.39936",
         "middle_band":"202.13499",
         "lower_band":"200.87061"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "upper_band":"203.38227",
         "middle_band":"202.22324",
         "lower_band":"201.0642"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "upper_band":"203.32938",
         "middle_band":"202.30173",
         "lower_band":"201.27409"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "upper_band":"203.23305",
         "middle_band":"202.38007",
         "lower_band":"201.52709"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/bbands

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 20
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
upper_band upper_band value
middle_band middle_band value
lower_band lower_band value

JSON request example

https://api.twelvedata.com/bbands?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/bbands?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/bbands?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

%B

%B Indicator(%B) measures position of an asset price relative to upper and lower Bollinger Bands.

This API call returns meta and time series values of %B. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/percent_b?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"%B - %B Indicator",
      "series_type":"series_type",
      "time_period":20,
      "sd":2,
      "ma_type":"ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "percent_b":"0.11981"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "percent_b":"0.02546"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "percent_b":"-0.01907"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "percent_b":"-0.11711"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "percent_b":"-0.23276"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/percent_b

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 20
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
percent_b percent_b value

JSON request example

https://api.twelvedata.com/percent_b?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/percent_b?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/percent_b?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

BOP

Balance Of Power(BOP) measures relative strength between buyers and sellers by assessing the ability of move price to an extreme level.

This API call returns meta and time series values of BOP. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/bop?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"BOP - Balance Of Power",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "bop":"0.27231"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "bop":"-0.32758"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "bop":"0.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "bop":"-0.38215"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "bop":"-0.91305"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/bop

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
bop balance of power value

JSON request example

https://api.twelvedata.com/bop?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/bop?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/bop?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

CCI

Commodity Channel Index(CCI) is a universal indicator that can help to identify new trend and assess current critical conditions.

This API call returns meta and time series values of CCI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/cci?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"CCI - Commodity Channel Index",
      "time_period":20
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "cci":"-122.30794"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "cci":"-152.88827"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "cci":"-180.08234"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "cci":"-206.65411"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "cci":"-225.40021"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/cci

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 20
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
cci commodity channel index value

JSON request example

https://api.twelvedata.com/cci?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/cci?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/cci?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

CEIL

Vector CEIL(CEIL) transform input data with mathematical ceil function.

This API call returns meta and time series values of CEIL. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ceil?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"CEIL - Vector CEIL",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ceil":"201.0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ceil":"202.0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ceil

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ceil vector ceil value

JSON request example

https://api.twelvedata.com/ceil?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ceil?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ceil?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

CMO

Chande Momentum Oscillator(CMO) is used to show overbought and oversold conditions.

This API call returns meta and time series values of CMO. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/cmo?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"CMO - Chande Momentum Oscillator",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "cmo":"-71.24979"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "cmo":"-91.96597"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "cmo":"-91.27229"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "cmo":"-91.16542"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "cmo":"-90.41306"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/cmo

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
cmo chande momentum oscillator value

JSON request example

https://api.twelvedata.com/cmo?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/cmo?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/cmo?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

CEIL

Vector CEIL(CEIL) transform input data with mathematical ceil function.

This API call returns meta and time series values of CEIL. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ceil?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"CEIL - Vector CEIL",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ceil":"201.0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ceil":"202.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ceil":"202.0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ceil

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ceil vector ceil value

JSON request example

https://api.twelvedata.com/ceil?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ceil?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ceil?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

DEMA

Double Exponential Moving Average(DEMA) it used to eliminate lag. It does this by taking two Exponential Moving Averages(EMA)).

This API call returns meta and time series values of DEMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/dema?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"DEMA - Double Exponential Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "dema":"200.93371"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "dema":"200.98742"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "dema":"201.13274"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "dema":"201.30494"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "dema":"201.5495"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/dema

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
dema double exponential moving average value

JSON request example

https://api.twelvedata.com/dema?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/dema?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/dema?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

DX

Directional Movement Index(DX) identifies in which direction the price is moving.

This API call returns meta and time series values of DX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/dx?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"DX - Directional Movement Index",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "dx":"68.70803"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "dx":"84.40905"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "dx":"83.62259"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "dx":"82.14874"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "dx":"81.69497"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/dx

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
dx directional movement index value

JSON request example

https://api.twelvedata.com/dx?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/dx?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/dx?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

EMA

Exponential Moving Average(EMA) it places greater importance on recent data points than the normal Moving Average(MA).

This API call returns meta and time series values of EMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ema?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"EMA - Exponential Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ema":"201.38109"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ema":"201.46387"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ema":"201.59608"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ema":"201.7401"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ema":"201.91678"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ema

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ema exponential moving average value

JSON request example

https://api.twelvedata.com/ema?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ema?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ema?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

EXP

Exponential(EXP) transform input data with mathematical exponent function.

This API call returns meta and time series values of EXP. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/exp?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"EXP - Exponential",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "exp":"2.0649375034375067e+87"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "exp":"1.8406052690732023e+87"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "exp":"2.003911823447668e+87"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "exp":"2.030939306863562e+87"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "exp":"2.2369241889576382e+87"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/exp

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
exp exponential value

JSON request example

https://api.twelvedata.com/exp?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/exp?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/exp?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

FLOOR

Vector FLOOR(FLOOR) transform input data with mathematical floor function.

This API call returns meta and time series values of FLOOR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/floor?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"FLOOR - Vector FLOOR",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "floor":"201.0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "floor":"200.0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "floor":"201.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "floor":"201.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "floor":"201.0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/floor

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
floor vector floor value

JSON request example

https://api.twelvedata.com/floor?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/floor?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/floor?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HEIKINASHICANDLES

Heikin-Ashi Candles(HEIKINASHICANDLES) translating from Japanese it means "average bar". It can be used detect market trends and predict future price fluctuations..

This API call returns meta and time series values of HEIKINASHICANDLES. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/heikinashicandles?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HEIKINASHICANDLES - Heikin-Ashi Candles",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "heikinhighs":"201.25599",
         "heikinopens":"200.9825",
         "heikincloses":"201.02449",
         "heikinlows":"200.85199"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "heikinhighs":"201.13",
         "heikinopens":"201.02",
         "heikincloses":"200.98375",
         "heikinlows":"200.84"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "heikinhighs":"201.07001",
         "heikinopens":"201.0767",
         "heikincloses":"201.005",
         "heikinlows":"200.91"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "heikinhighs":"201.25999",
         "heikinopens":"201.445",
         "heikincloses":"201.1117",
         "heikinlows":"201.0334"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "heikinhighs":"201.75999",
         "heikinopens":"201.77",
         "heikincloses":"201.43",
         "heikinlows":"201.07001"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/heikinashicandles

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
heikinhighs heikinhighs value
heikinopens heikinopens value
heikincloses heikincloses value
heikinlows heikinlows value

JSON request example

https://api.twelvedata.com/heikinashicandles?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/heikinashicandles?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/heikinashicandles?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HLC3

High, Low, Close Average(HLC3) gives alternative candlesticks patter. Every element is defined as follows: (high + low + close) / 3.

This API call returns meta and time series values of HLC3. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/hlc3?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HLC3 - High, Low, Close Average",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "hlc3":"201.05266"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "hlc3":"200.96833"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "hlc3":"201.00001"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "hlc3":"201.10893"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "hlc3":"201.32"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/hlc3

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
hlc3 high, low, close average value

JSON request example

https://api.twelvedata.com/hlc3?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/hlc3?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/hlc3?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_DCPERIOD

Hilbert Transform Dominant Cycle Period(HT_DCPERIOD) is part of Hilbert Transforms concepts. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_DCPERIOD. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_dcperiod?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_DCPERIOD - Hilbert Transform Dominant Cycle Period",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ht_dcperiod":"28.12565"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ht_dcperiod":"27.7569"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ht_dcperiod":"27.72609"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ht_dcperiod":"27.26459"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ht_dcperiod":"27.00303"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_dcperiod

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ht_dcperiod hilbert transform dominant cycle period value

JSON request example

https://api.twelvedata.com/ht_dcperiod?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_dcperiod?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_dcperiod?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_DCPHASE

Hilbert Transform Dominant Cycle Phase(HT_DCPHASE) is part of Hilbert Transforms concepts. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_DCPHASE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_dcphase?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_DCPHASE - Hilbert Transform Dominant Cycle Phase",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ht_dcphase":"-38.50975"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ht_dcphase":"-44.28698"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ht_dcphase":"310.07743"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ht_dcphase":"306.54431"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ht_dcphase":"299.8704"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_dcphase

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ht_dcphase hilbert transform dominant cycle phase value

JSON request example

https://api.twelvedata.com/ht_dcphase?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_dcphase?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_dcphase?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_PHASOR

Hilbert Transform Phasor Components(HT_PHASOR) is part of Hilbert Transforms concepts. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_PHASOR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_phasor?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_PHASOR - Hilbert Transform Phasor Components",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "in_phase":"-0.56826",
         "quadrature":"-0.43318"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "in_phase":"-0.61937",
         "quadrature":"-0.09941"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "in_phase":"-0.60477",
         "quadrature":"-0.16807"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "in_phase":"-0.57758",
         "quadrature":"-0.19125"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "in_phase":"-0.52678",
         "quadrature":"-0.33813"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_phasor

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
in_phase in_phase value
quadrature quadrature value

JSON request example

https://api.twelvedata.com/ht_phasor?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_phasor?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_phasor?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_SINE

Hilbert Transform SineWave(HT_SINE) is part of Hilbert Transforms concepts. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_SINE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_sine?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_SINE - Hilbert Transform SineWave",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ht_sine":"-0.62265",
         "ht_leadsine":"0.11303"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ht_sine":"-0.69825",
         "ht_leadsine":"0.01244"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ht_sine":"-0.76518",
         "ht_leadsine":"-0.08581"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ht_sine":"-0.8034",
         "ht_leadsine":"-0.14704"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ht_sine":"-0.86715",
         "ht_leadsine":"-0.261"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_sine

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ht_sine ht_sine value
ht_leadsine ht_leadsine value

JSON request example

https://api.twelvedata.com/ht_sine?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_sine?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_sine?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_TRENDLINE

Hilbert Transform Instantaneous Trendline(HT_TRENDLINE) comes from the concept of Digital Signal Processing (DSP). It creates complex signals from the simple chart data. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_TRENDLINE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_trendline?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_TRENDLINE - Hilbert Transform Instantaneous Trendline",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ht_trendline":"202.26597"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ht_trendline":"202.31889"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ht_trendline":"202.37263"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ht_trendline":"202.42115"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ht_trendline":"202.4659"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_trendline

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ht_trendline hilbert transform instantaneous trendline value

JSON request example

https://api.twelvedata.com/ht_trendline?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_trendline?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_trendline?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

HT_TRENDMODE

Hilbert Transform Trend vs Cycle Mode(HT_TRENDMODE) is part of Hilbert Transforms concepts. You can reed more about it in the Rocket Science for Traders book by John F. Ehlers.

This API call returns meta and time series values of HT_TRENDMODE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ht_trendmode?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"HT_TRENDMODE - Hilbert Transform Trend vs Cycle Mode",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ht_trendmode":"0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ht_trendmode":"0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ht_trendmode":"0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ht_trendmode":"0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ht_trendmode":"0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ht_trendmode

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ht_trendmode hilbert transform trend vs cycle mode value

JSON request example

https://api.twelvedata.com/ht_trendmode?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ht_trendmode?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ht_trendmode?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

KAMA

Kaufman's Adaptive Moving Average(KAMA) is a type of Moving Average(MA) that incorporates market noise and volatility.

This API call returns meta and time series values of KAMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/kama?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"KAMA - Kaufman's Adaptive Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "kama":"201.06741"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "kama":"201.07559"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "kama":"201.18807"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "kama":"201.32251"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "kama":"201.5538"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/kama

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
kama kaufman's adaptive moving average value

JSON request example

https://api.twelvedata.com/kama?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/kama?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/kama?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LINEARREG

Linear Regression(LINEARREG) is used to determine trend direction by a straight line.

This API call returns meta and time series values of LINEARREG. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/linearreg?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LINEARREG - Linear Regression",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "linearreg":"200.79327"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "linearreg":"200.83317"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "linearreg":"200.98073"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "linearreg":"201.16126"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "linearreg":"201.39886"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/linearreg

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
linearreg linear regression value

JSON request example

https://api.twelvedata.com/linearreg?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/linearreg?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/linearreg?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LINEARREGANGLE

Linear Regression Angle(LINEARREGANGLE) calculates the angle of the linear regression trendline.

This API call returns meta and time series values of LINEARREGANGLE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/linearregangle?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LINEARREGANGLE - Linear Regression Angle",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "linearregangle":"-8.79357"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "linearregangle":"-10.00332"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "linearregangle":"-10.08348"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "linearregangle":"-9.78514"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "linearregangle":"-8.99228"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/linearregangle

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
linearregangle linear regression angle value

JSON request example

https://api.twelvedata.com/linearregangle?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/linearregangle?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/linearregangle?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LINEARREGINTERCEPT

Linear Regression Intercept(LINEARREGINTERCEPT) calculates the intercept for the linear regression trendline for each data point.

This API call returns meta and time series values of LINEARREGINTERCEPT. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/linearregintercept?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LINEARREGINTERCEPT - Linear Regression Intercept",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "linearregintercept":"202.03082"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "linearregintercept":"202.24426"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "linearregintercept":"202.40337"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "linearregintercept":"202.54097"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "linearregintercept":"202.66483"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/linearregintercept

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
linearregintercept linear regression intercept value

JSON request example

https://api.twelvedata.com/linearregintercept?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/linearregintercept?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/linearregintercept?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LINEARREGSLOPE

Linear Regression Slope(LINEARREGSLOPE) calculates the slope for the linear regression trendline for each data point.

This API call returns meta and time series values of LINEARREGSLOPE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/linearregslope?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LINEARREGSLOPE - Linear Regression Slope",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "linearregslope":"-0.15469"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "linearregslope":"-0.17639"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "linearregslope":"-0.17783"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "linearregslope":"-0.17246"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "linearregslope":"-0.15825"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/linearregslope

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
linearregslope linear regression slope value

JSON request example

https://api.twelvedata.com/linearregslope?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/linearregslope?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/linearregslope?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LN

Natural Logarithm to the base of constant e(LN) transforms all data points with natural logarithm.

This API call returns meta and time series values of LN. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ln?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LN - Natural Logarithm to the base of constant e",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ln":"5.30355"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ln":"5.30298"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ln":"5.3034"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ln":"5.30347"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ln":"5.30395"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ln

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ln natural logarithm to the base of constant e value

JSON request example

https://api.twelvedata.com/ln?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ln?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ln?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

LOG10

Logarithm to base 10(LOG10) transforms all data points with logarithm to base 10.

This API call returns meta and time series values of LOG10. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/log10?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"LOG10 - Logarithm to base 10",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "log10":"2.3033"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "log10":"2.30306"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "log10":"2.30324"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "log10":"2.30327"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "log10":"2.30348"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/log10

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
log10 logarithm to base 10 value

JSON request example

https://api.twelvedata.com/log10?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/log10?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/log10?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MA

Moving Average(MA) is used to smooth out price fluctuations and get rid of market noise.

This API call returns meta and time series values of MA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ma?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MA - Moving Average",
      "series_type":"series_type",
      "time_period":9,
      "ma_type":"ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ma":"201.41205"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ma":"201.53871"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ma":"201.69205"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ma":"201.85111"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ma":"202.03185"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ma

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ma moving average value

JSON request example

https://api.twelvedata.com/ma?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ma?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ma?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MACD

Moving Average Convergence Divergence(MACD) is a trend following momentum indicator which works by subtracting the longer moving average from the shorter one. MACD has an unstable period ~ 100.

This API call returns meta and time series values of MACD. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/macd?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MACD - Moving Average Convergence Divergence",
      "series_type":"series_type",
      "fast_period":12,
      "slow_period":26,
      "signal_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "macd":"-0.3998",
         "macd_signal":"-0.25279",
         "macd_hist":"-0.147"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "macd":"-0.38253",
         "macd_signal":"-0.21604",
         "macd_hist":"-0.16649"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "macd":"-0.34322",
         "macd_signal":"-0.17442",
         "macd_hist":"-0.1688"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "macd":"-0.29671",
         "macd_signal":"-0.13222",
         "macd_hist":"-0.16449"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "macd":"-0.23439",
         "macd_signal":"-0.0911",
         "macd_hist":"-0.14329"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/macd

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
slow_period • Parameter is optional
• Number of periods for slow moving average. Must be at least 1
• Type int; Default 26
signal_period • Parameter is optional
• Number of periods to be plotted on MACD line. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
macd macd value
macd_signal macd_signal value
macd_hist macd_hist value

JSON request example

https://api.twelvedata.com/macd?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/macd?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/macd?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MACDEXT

Moving Average Convergence Divergence Extended(MACDEXT) gives greater control over MACD input parameters. MACDEXT has an unstable period ~ 100.

This API call returns meta and time series values of MACDEXT. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/macdext?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MACDEXT - Moving Average Convergence Divergence Extended",
      "series_type":"series_type",
      "fast_period":12,
      "fast_ma_type":"fast_ma_type",
      "slow_period":26,
      "slow_ma_type":"slow_ma_type",
      "signal_period":9,
      "signal_ma_type":"signal_ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "macd":"-0.54508",
         "macd_signal":"-0.25615",
         "macd_hist":"-0.28894"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "macd":"-0.47169",
         "macd_signal":"-0.19324",
         "macd_hist":"-0.27845"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "macd":"-0.39004",
         "macd_signal":"-0.13498",
         "macd_hist":"-0.25506"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "macd":"-0.3087",
         "macd_signal":"-0.08378",
         "macd_hist":"-0.22492"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "macd":"-0.23315",
         "macd_signal":"-0.03994",
         "macd_hist":"-0.1932"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/macdext

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
fast_ma_type • Parameter is optional
• Type of Moving Average to be used on Fast Period
• Type string; Default SMA
slow_period • Parameter is optional
• Number of periods for slow moving average. Must be at least 1
• Type int; Default 26
slow_ma_type • Parameter is optional
• Type of Moving Average to be used on Slow Period
• Type string; Default SMA
signal_period • Parameter is optional
• Number of periods to be plotted on MACD line. Must be at least 1
• Type int; Default 9
signal_ma_type • Parameter is optional
• Type of Moving Average to be used on Signal Period
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
macd macd value
macd_signal macd_signal value
macd_hist macd_hist value

JSON request example

https://api.twelvedata.com/macdext?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/macdext?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/macdext?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MAMA

MESA Adaptive Moving Average(MAMA) adapts to price fluctuations based on the rate of change of Hilbert Transform Discriminator. More about MAMA can be read here.

This API call returns meta and time series values of MAMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/mama?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MAMA - MESA Adaptive Moving Average",
      "series_type":"series_type",
      "fast_limit":0.5,
      "slow_limit":0.05
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "mama":"201.38887",
         "fama":"202.05517"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "mama":"201.72774",
         "fama":"202.27727"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "mama":"201.79478",
         "fama":"202.29956"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "mama":"201.96391",
         "fama":"202.34923"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "mama":"202.01288",
         "fama":"202.35911"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/mama

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
fast_limit • Parameter is optional
• Type double; Default 0.5
slow_limit • Parameter is optional
• Type double; Default 0.05
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
mama mama value
fama fama value

JSON request example

https://api.twelvedata.com/mama?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/mama?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/mama?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MAX

Highest value over period(MAX).

This API call returns meta and time series values of MAX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/max?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MAX - Highest value over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "max":"202.05"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "max":"202.19"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "max":"202.315"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "max":"202.4516"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "max":"202.66"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/max

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
max highest value over period value

JSON request example

https://api.twelvedata.com/max?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/max?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/max?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MAXINDEX

Index of highest value over period(MAXINDEX).

This API call returns meta and time series values of MAXINDEX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/maxindex?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MAXINDEX - Index of highest value over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "maxidx":"491"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "maxidx":"490"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "maxidx":"489"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "maxidx":"488"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "maxidx":"487"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/maxindex

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
maxidx maxidx value

JSON request example

https://api.twelvedata.com/maxindex?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/maxindex?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/maxindex?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MEDPRICE

Median Price(MEDPRICE).

This API call returns meta and time series values of MEDPRICE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/medprice?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MEDPRICE - Median Price",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "medprice":"201.05399"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "medprice":"200.985"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "medprice":"200.99001"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "medprice":"201.1467"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "medprice":"201.415"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/medprice

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
medprice median price value

JSON request example

https://api.twelvedata.com/medprice?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/medprice?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/medprice?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MFI

Money Flow Index(MFI) is used to identify overbought and oversold levels in an asset. In some cases it can be used to detect divergences, which might be a sign of upcoming trend changes.

This API call returns meta and time series values of MFI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/mfi?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MFI - Money Flow Index",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "mfi":"22.68525"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "mfi":"6.39625"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "mfi":"7.00498"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "mfi":"7.36599"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "mfi":"7.91187"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/mfi

API Parameters

Parameter Details
symbol • Required parameter
• Name of instrument you want to request
• For preffered stocks use dot(.) delimiter
E.g. BRK.A or BRK.B will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
mfi money flow index value

JSON request example

https://api.twelvedata.com/mfi?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/mfi?symbol=XOM&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/mfi?symbol=GS&interval=30min&format=CSV&apikey=demo

MIDPOINT

MidPoint over period(MIDPOINT) is calculated as: (highest value + lowest value) / 2.

This API call returns meta and time series values of MIDPOINT. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/midpoint?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MIDPOINT - MidPoint over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "midpoint":"201.4925"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "midpoint":"201.5625"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "midpoint":"201.6675"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "midpoint":"201.7425"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "midpoint":"201.895"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/midpoint

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
midpoint midpoint over period value

JSON request example

https://api.twelvedata.com/midpoint?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/midpoint?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/midpoint?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MIDPRICE

Midpoint Price over period(MIDPRICE) is calculated as: (highest high + lowest low) / 2.

This API call returns meta and time series values of MIDPRICE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/midprice?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MIDPRICE - Midpoint Price over period",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "midprice":"201.535"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "midprice":"201.595"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "midprice":"201.68501"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "midprice":"201.8417"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "midprice":"201.88"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/midprice

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
midprice midpoint price over period value

JSON request example

https://api.twelvedata.com/midprice?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/midprice?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/midprice?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MIN

Lowest value over period(MIN).

This API call returns meta and time series values of MIN. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/min?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MIN - Lowest value over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "min":"200.935"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "min":"200.935"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "min":"201.02"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "min":"201.0334"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "min":"201.13"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/min

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
min lowest value over period value

JSON request example

https://api.twelvedata.com/min?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/min?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/min?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MININDEX

Index of lowest value over period(MININDEX).

This API call returns meta and time series values of MININDEX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/minindex?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MININDEX - Index of lowest value over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "minidx":"498"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "minidx":"498"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "minidx":"497"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "minidx":"496"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "minidx":"495"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/minindex

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
minidx minidx value

JSON request example

https://api.twelvedata.com/minindex?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/minindex?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/minindex?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MINMAX

Lowest and highest values over period(MINMAX).

This API call returns meta and time series values of MINMAX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/minmax?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MINMAX - Lowest and highest values over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "min":"200.935",
         "max":"202.05"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "min":"200.935",
         "max":"202.19"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "min":"201.02",
         "max":"202.315"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "min":"201.0334",
         "max":"202.4516"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "min":"201.13",
         "max":"202.66"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/minmax

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
min min value
max max value

JSON request example

https://api.twelvedata.com/minmax?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/minmax?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/minmax?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MINMAXINDEX

Indexes of lowest and highest values over period(MINMAXINDEX).

This API call returns meta and time series values of MINMAXINDEX. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/minmaxindex?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MINMAXINDEX - Indexes of lowest and highest values over period",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "minidx":"498",
         "maxidx":"491"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "minidx":"498",
         "maxidx":"490"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "minidx":"497",
         "maxidx":"489"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "minidx":"496",
         "maxidx":"488"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "minidx":"495",
         "maxidx":"487"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/minmaxindex

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
minidx minidx value
maxidx maxidx value

JSON request example

https://api.twelvedata.com/minmaxindex?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/minmaxindex?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/minmaxindex?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MINUS_DI

Minus Directional Indicator(MINUS_DI) is a component of the Average Directional Index(ADX) and it measures the existence of downtrend.

This API call returns meta and time series values of MINUS_DI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/minus_di?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MINUS_DI - Minus Directional Indicator",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "minus_di":"46.60579"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "minus_di":"57.93427"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "minus_di":"64.13795"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "minus_di":"62.85341"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "minus_di":"69.49652"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/minus_di

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
minus_di minus directional indicator value

JSON request example

https://api.twelvedata.com/minus_di?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/minus_di?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/minus_di?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MINUS_DM

Minus Directional Movement(MINUS_DM) is calculated as: Previous Low - Low.

This API call returns meta and time series values of MINUS_DM. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/minus_dm?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MINUS_DM - Minus Directional Movement",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "minus_dm":"0.96291"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "minus_dm":"1.08327"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "minus_dm":"1.13992"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "minus_dm":"1.14359"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "minus_dm":"1.24536"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/minus_dm

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
minus_dm minus directional movement value

JSON request example

https://api.twelvedata.com/minus_dm?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/minus_dm?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/minus_dm?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

MOM

Momentum(MOM) compares current price with the previous price N timeperiods ago.

This API call returns meta and time series values of MOM. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/mom?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"MOM - Momentum",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "mom":"-1.14"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "mom":"-1.38"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "mom":"-1.43159"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "mom":"-1.6266"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "mom":"-1.5347"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/mom

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
mom momentum value

JSON request example

https://api.twelvedata.com/mom?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/mom?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/mom?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

NATR

Normalized Average True Range(NATR) is used to compare and analyze across different price levels due to its normalized quality, which might be more effective than the original ATR.

This API call returns meta and time series values of NATR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/natr?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"NATR - Normalized Average True Range",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "natr":"0.09862"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "natr":"0.0908"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "natr":"0.08665"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "natr":"0.08719"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "natr":"0.08518"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/natr

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
natr normalized average true range value

JSON request example

https://api.twelvedata.com/natr?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/natr?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/natr?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

OBV

On Balance Volume(OBV) is a momentum indicator which uses volume flow to forecast upcoming price changes.

This API call returns meta and time series values of OBV. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/obv?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"OBV - On Balance Volume",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "obv":"540374.0"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "obv":"68087.0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "obv":"277941.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "obv":"426973.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "obv":"605865.0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/obv

API Parameters

Parameter Details
symbol • Required parameter
• Name of instrument you want to request
• For preffered stocks use dot(.) delimiter
E.g. BRK.A or BRK.B will be correct
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
obv on balance volume value

JSON request example

https://api.twelvedata.com/obv?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/obv?symbol=XOM&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/obv?symbol=GS&interval=30min&format=CSV&apikey=demo

PLUS_DI

Plus Directional Indicator(PLUS_DI) is a component of the Average Directional Index(ADX) and it measures the existence of uptrend.

This API call returns meta and time series values of PLUS_DI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/plus_di?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"PLUS_DI - Plus Directional Indicator",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "plus_di":"7.69578"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "plus_di":"1.98638"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "plus_di":"2.35103"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "plus_di":"2.58362"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "plus_di":"2.95115"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/plus_di

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
plus_di plus directional indicator value

JSON request example

https://api.twelvedata.com/plus_di?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/plus_di?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/plus_di?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

PLUS_DM

Plus Directional Movement(PLUS_DM) is calculated as: High - Previous High.

This API call returns meta and time series values of PLUS_DM. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/plus_dm?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"PLUS_DM - Plus Directional Movement",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "plus_dm":"0.159"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "plus_dm":"0.03714"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "plus_dm":"0.04178"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "plus_dm":"0.04701"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "plus_dm":"0.05288"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/plus_dm

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
plus_dm plus directional movement value

JSON request example

https://api.twelvedata.com/plus_dm?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/plus_dm?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/plus_dm?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

PPO

Percentage Price Oscillator(PPO) shows relationship between two Moving Averages(MA) as a percentage.

This API call returns meta and time series values of PPO. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ppo?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"PPO - Percentage Price Oscillator",
      "series_type":"series_type",
      "fast_period":10,
      "slow_period":21,
      "ma_type":"ma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ppo":"-0.2696"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ppo":"-0.23323"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ppo":"-0.1928"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ppo":"-0.15255"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ppo":"-0.11518"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ppo

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 10
slow_period • Parameter is optional
• Number of periods for slow moving average. Must be at least 1
• Type int; Default 21
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ppo percentage price oscillator value

JSON request example

https://api.twelvedata.com/ppo?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ppo?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ppo?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ROC

Rate of change(ROC) calculates rate of change between current price and price n timeperiods ago. Formula: ((price / prevPrice) - 1) * 100.

This API call returns meta and time series values of ROC. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/roc?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ROC - Rate of change",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "roc":"-0.56383"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "roc":"-0.68211"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "roc":"-0.70713"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "roc":"-0.80263"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "roc":"-0.75726"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/roc

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
roc rate of change value

JSON request example

https://api.twelvedata.com/roc?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/roc?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/roc?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ROCP

Rate of change percentage(ROCP) calculates rate of change in % between current price and price n timeperiods ago. Formula: (price - prevPrice) / prevPrice.

This API call returns meta and time series values of ROCP. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/rocp?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ROCP - Rate of change percentage",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "rocp":"-0.00564"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "rocp":"-0.00682"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "rocp":"-0.00707"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "rocp":"-0.00803"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "rocp":"-0.00757"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/rocp

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
rocp rate of change percentage value

JSON request example

https://api.twelvedata.com/rocp?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/rocp?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/rocp?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ROCR

Rate of change ratio(ROCR) calculates ratio between current price and price n timeperiods ago. Formula: (price / prevPrice).

This API call returns meta and time series values of ROCR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/rocr?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ROCR - Rate of change ratio",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "rocr":"0.99436"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "rocr":"0.99318"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "rocr":"0.99293"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "rocr":"0.99197"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "rocr":"0.99243"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/rocr

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
rocr rate of change ratio value

JSON request example

https://api.twelvedata.com/rocr?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/rocr?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/rocr?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ROCR100

Rate of change ratio 100 scale(ROCR100) calculates ratio with 100 scale between current price and price n timeperiods ago. Formula: (price / prevPrice) * 100.

This API call returns meta and time series values of ROCR100. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/rocr100?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ROCR100 - Rate of change ratio 100 scale",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "rocr100":"99.43617"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "rocr100":"99.31789"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "rocr100":"99.29287"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "rocr100":"99.19737"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "rocr100":"99.24274"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/rocr100

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
rocr100 rate of change ratio 100 scale value

JSON request example

https://api.twelvedata.com/rocr100?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/rocr100?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/rocr100?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

RSI

Relative Strength Index(RSI) is a momentum indicator which calculates the magnitude of a price changes to assess the overbought and oversold conditions in the price of an asset.

This API call returns meta and time series values of RSI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/rsi?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"RSI - Relative Strength Index",
      "series_type":"series_type",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "rsi":"16.57887"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "rsi":"9.38865"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "rsi":"9.97899"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "rsi":"10.07167"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "rsi":"10.7395"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/rsi

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
rsi relative strength index value

JSON request example

https://api.twelvedata.com/rsi?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/rsi?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/rsi?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

SAR

Parabolic SAR(SAR) is used to identify and spot upcoming asset momentum.

This API call returns meta and time series values of SAR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/sar?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"SAR - Parabolic SAR",
      "acceleration":0.02,
      "maximum":0.2
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sar":"201.54365"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sar":"201.71956"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sar":"201.92195"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sar":"202.117"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sar":"202.31643"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sar

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
acceleration • Parameter is optional
• Type double; Default 0.02
maximum • Parameter is optional
• Type double; Default 0.2
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
sar parabolic sar value

JSON request example

https://api.twelvedata.com/sar?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/sar?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/sar?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

SMA

Simple Moving Average(SMA) is an arithmetic moving average calculated by adding latest closing prices and them dividing them by number of time periods.

This API call returns meta and time series values of SMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/sma?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"SMA - Simple Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sma":"201.41205"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sma":"201.53871"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sma":"201.69205"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sma":"201.85111"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sma":"202.03185"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sma

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
sma simple moving average value

JSON request example

https://api.twelvedata.com/sma?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/sma?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/sma?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

SQRT

Square Root(SQRT) transform input data with square root.

This API call returns meta and time series values of SQRT. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/sqrt?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"SQRT - Square Root",
      "series_type":"series_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sqrt":"14.17921"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sqrt":"14.17515"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sqrt":"14.17815"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sqrt":"14.17862"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sqrt":"14.18203"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sqrt

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
sqrt square root value

JSON request example

https://api.twelvedata.com/sqrt?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/sqrt?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/sqrt?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

STDDEV

Standard Deviation(STDDEV) is used to measure volatility. Might be important when assessing risks.

This API call returns meta and time series values of STDDEV. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/stddev?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"STDDEV - Standard Deviation",
      "series_type":"series_type",
      "time_period":9,
      "sd":2
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "stddev":"0.86613"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "stddev":"0.94696"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "stddev":"0.95317"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "stddev":"0.92898"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "stddev":"0.85204"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/stddev

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
stddev standard deviation value

JSON request example

https://api.twelvedata.com/stddev?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/stddev?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/stddev?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

STOCH

Stochastic Oscillator(STOCH) is used to decide if the price trend is strong.

This API call returns meta and time series values of STOCH. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/stoch?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"STOCH - Stochastic Oscillator",
      "fast_k_period":14,
      "slow_k_period":1,
      "slow_d_period":3,
      "slow_kma_type":"slow_kma_type",
      "slow_dma_type":"slow_dma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "slow_k":"11.35168",
         "slow_d":"7.5293"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "slow_k":"5.10019",
         "slow_d":"3.74541"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "slow_k":"6.13605",
         "slow_d":"3.24291"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "slow_k":"0.0",
         "slow_d":"2.35854"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "slow_k":"3.59267",
         "slow_d":"3.49697"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/stoch

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
fast_k_period • Parameter is optional
• Type int; Default 14
slow_k_period • Parameter is optional
• Type int; Default 1
slow_d_period • Parameter is optional
• Type int; Default 3
slow_kma_type • Parameter is optional
• Type of Moving Average to be used on Slow KMA Period
• Type string; Default SMA
slow_dma_type • Parameter is optional
• Type of Moving Average to be used on Slow DMA Period
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
slow_k slow_k value
slow_d slow_d value

JSON request example

https://api.twelvedata.com/stoch?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/stoch?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/stoch?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

STOCHF

Stochastic Fast(STOCHF) is more sensitive to price changes, therefore it changes direction more quickly.

This API call returns meta and time series values of STOCHF. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/stochf?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"STOCHF - Stochastic Fast",
      "fast_k_period":14,
      "fast_d_period":3,
      "fast_dma_type":"fast_dma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "fast_k":"11.35168",
         "fast_d":"7.5293"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "fast_k":"5.10019",
         "fast_d":"3.74541"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "fast_k":"6.13605",
         "fast_d":"3.24291"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "fast_k":"0.0",
         "fast_d":"2.35854"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "fast_k":"3.59267",
         "fast_d":"3.49697"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/stochf

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
fast_k_period • Parameter is optional
• Type int; Default 14
fast_d_period • Parameter is optional
• Type int; Default 3
fast_dma_type • Parameter is optional
• Type of Moving Average to be used on Fast DMA Period
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
fast_k fast_k value
fast_d fast_d value

JSON request example

https://api.twelvedata.com/stochf?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/stochf?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/stochf?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

STOCHRSI

Stochastic RSI(STOCHRSI) this indicator takes advantages of both indicators STOCH and RSI. It is used to determine level of overbought and oversold as well as current market trend of an asset.

This API call returns meta and time series values of STOCHRSI. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/stochrsi?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"STOCHRSI - Stochastic RSI",
      "series_type":"series_type",
      "time_period":14,
      "fast_k_period":3,
      "fast_d_period":3,
      "fast_dma_type":"fast_dma_type"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "fast_k":"100.0",
         "fast_d":"33.33333"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "fast_k":"0.0",
         "fast_d":"-0.0"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "fast_k":"0.0",
         "fast_d":"-0.0"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "fast_k":"0.0",
         "fast_d":"0.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "fast_k":"0.0",
         "fast_d":"0.0"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/stochrsi

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
fast_k_period • Parameter is optional
• Type int; Default 3
fast_d_period • Parameter is optional
• Type int; Default 3
fast_dma_type • Parameter is optional
• Type of Moving Average to be used on Fast DMA Period
• Type string; Default SMA
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
fast_k fast_k value
fast_d fast_d value

JSON request example

https://api.twelvedata.com/stochrsi?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/stochrsi?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/stochrsi?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

T3MA

T3MA(T3MA).

This API call returns meta and time series values of T3MA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/t3ma?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"T3MA - T3MA",
      "series_type":"series_type",
      "time_period":9,
      "v_factor":"v_factor"
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "t3ma":"201.56277"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "t3ma":"201.72906"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "t3ma":"201.89968"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "t3ma":"202.06176"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "t3ma":"202.20727"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/t3ma

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
v_factor • Parameter is optional
• Type double; Default 0.7
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
t3ma t3ma value

JSON request example

https://api.twelvedata.com/t3ma?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/t3ma?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/t3ma?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

TEMA

Triple Exponential Moving Average(TEMA) it smooths out price fluctuations, making it more trend detection more transparent without the lag.

This API call returns meta and time series values of TEMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/tema?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"TEMA - Triple Exponential Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "tema":"200.83136"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "tema":"200.8304"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "tema":"200.94958"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "tema":"201.10417"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "tema":"201.36643"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/tema

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
tema triple exponential moving average value

JSON request example

https://api.twelvedata.com/tema?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/tema?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/tema?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

TRANGE

True Range(TRANGE) usually is used as the base when calculating other indicators. TRANGE determines the normal trading range of an asset.

This API call returns meta and time series values of TRANGE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/trange?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"TRANGE - True Range",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "trange":"0.404"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "trange":"0.29001"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "trange":"0.16"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "trange":"0.22659"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "trange":"0.7"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/trange

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
trange true range value

JSON request example

https://api.twelvedata.com/trange?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/trange?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/trange?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

TRIMA

Triangular Moving Average(TRIMA) it smooths out price fluctuations, but places more weight on the prices in middle of the time period.

This API call returns meta and time series values of TRIMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/trima?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"TRIMA - Triangular Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "trima":"201.36415"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "trima":"201.54661"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "trima":"201.72207"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "trima":"201.8914"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "trima":"202.05193"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/trima

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
trima triangular moving average value

JSON request example

https://api.twelvedata.com/trima?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/trima?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/trima?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

TSF

Time Series Forecast(TSF) calculates trend based on last points of multiple regression trendlines.

This API call returns meta and time series values of TSF. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/tsf?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"TSF - Time Series Forecast",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "tsf":"200.63858"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "tsf":"200.65678"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "tsf":"200.8029"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "tsf":"200.9888"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "tsf":"201.24061"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/tsf

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
tsf time series forecast value

JSON request example

https://api.twelvedata.com/tsf?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/tsf?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/tsf?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

TYPPRICE

Typical Price(TYPPRICE).

This API call returns meta and time series values of TYPPRICE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/typprice?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"TYPPRICE - Typical Price",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "typprice":"201.05266"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "typprice":"200.96833"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "typprice":"201.00001"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "typprice":"201.10893"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "typprice":"201.32"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/typprice

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
typprice typical price value

JSON request example

https://api.twelvedata.com/typprice?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/typprice?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/typprice?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

ULTOSC

Ultimate Oscillator(ULTOSC) takes into account three different time periods to enhance quality of overbought and oversold signals.

This API call returns meta and time series values of ULTOSC. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/ultosc?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"ULTOSC - Ultimate Oscillator",
      "time_period_1":7,
      "time_period_2":14,
      "time_period_3":28
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "ultosc":"25.17927"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "ultosc":"20.38183"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "ultosc":"17.95325"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "ultosc":"14.54172"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "ultosc":"16.21497"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/ultosc

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period_1 • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 7
time_period_2 • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
time_period_3 • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 28
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
ultosc ultimate oscillator value

JSON request example

https://api.twelvedata.com/ultosc?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/ultosc?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/ultosc?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

VAR

Variance(VAR) calculates the spread between data points to determine how far are they from the mean.

This API call returns meta and time series values of VAR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/var?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"VAR - Variance",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "var":"0.18755"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "var":"0.22418"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "var":"0.22713"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "var":"0.21575"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "var":"0.18149"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/var

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
var variance value

JSON request example

https://api.twelvedata.com/var?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/var?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/var?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

WCLPRICE

Weighted Close Price(WCLPRICE) usually is used as the base for other indicators for smoothness. Formula: (high + low + close * 2) / 4.

This API call returns meta and time series values of WCLPRICE. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/wclprice?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"WCLPRICE - Weighted Close Price",
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "wclprice":"201.052"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "wclprice":"200.96"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "wclprice":"201.005"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "wclprice":"201.09005"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "wclprice":"201.2725"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/wclprice

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
wclprice weighted close price value

JSON request example

https://api.twelvedata.com/wclprice?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/wclprice?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/wclprice?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

WILLR

Williams %R(WILLR) calculates overbought and oversold levels. It can also be used to find entry and exit signals.

This API call returns meta and time series values of WILLR. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/willr?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"WILLR - Williams %R",
      "time_period":14
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "willr":"-88.64832"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "willr":"-94.89981"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "willr":"-93.86395"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "willr":"-100.0"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "willr":"-96.40733"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/willr

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 14
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
willr williams %r value

JSON request example

https://api.twelvedata.com/willr?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/willr?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/willr?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo

WMA

Weighted Moving Average(WMA) it smooths out price fluctuations, it puts more weight on recent data points and less on past.

This API call returns meta and time series values of WMA. Meta object consists of general information about requested technical indicator. Time series is the array of objects ordered by time desceding updated realtime.

HTTP request example

https://api.twelvedata.com/wma?symbol=AAPL&interval=1min&apikey=your_api_key

This request will return JSON with the following structure

{
   "meta":{
      "symbol":"AAPL",
      "interval":"1min",
      "technical_indicator":"WMA - Weighted Moving Average",
      "series_type":"series_type",
      "time_period":9
   },
   "time_series":[
      {
         "datetime":"2019-08-09 15:59:00",
         "wma":"201.20579"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "wma":"201.30353"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "wma":"201.45494"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "wma":"201.62116"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "wma":"201.82085"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/wma

API Parameters

Parameter Details
symbol • Required parameter
• Instrument symbol, can be any stock, forex or cryptocurrency
E.g. AAPL, EUR/USD, ETH/BTC, ...
• Type string
interval • Required parameter
• Interval between two consecutive points in time series
• Supports: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month
exchange • Parameter is optional
• Only applicable to stocks and cryptocurrencies, otherwise is ignored
• Exchange where instrument is traded
• Type string
country • Parameter is optional
• Only applicable to stocks, otherwise is ignored
• Country where instrument is traded
• Type string
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
time_period • Parameter is optional
• Number of periods to average over. Must be at least 1
• Type int; Default 9
outputsize • Parameter is optional
• Number of last datapoints to retrieve
• Type int; Default 30
format • Parameter is optional
• Value can be CSV or JSON
• Type string; Default JSON
apikey • Required parameter
• Your personal API Key, which you can obtain for free here
• Type string

Response

Key Description
meta json object with request general information
datetime datetime in local market time for equities and in UTC for forex and cryptocurrencies refering to when the bar with specified interval was opened
wma weighted moving average value

JSON request example

https://api.twelvedata.com/wma?symbol=AAPL&interval=1min&apikey=demo

https://api.twelvedata.com/wma?symbol=XRP/ETH&exchange=Upbit&interval=1day&outputsize=24&apikey=demo

Downloadable CSV example

https://api.twelvedata.com/wma?symbol=EUR/USD&interval=30min&format=CSV&apikey=demo