NAV Navbar

Getting Started

Welcome to the Twelve Data API! You can use this API to access world financial markets including stocks, forex, and cryptocurrencies. All data is available in real-time and historical formats. With Twelve Data API you 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 Twelve Data 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 api@twelvedata.com

Libraries and integrations

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

Language URL
Python twelvedata-python

Support

You can check our support page for the FAQ section. If you can’t find the question, you can email us at support@twelvedata.com

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 Twelve Data 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 Twelve Data 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 Twelve Data 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 Twelve Data 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 Twelve Data 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 Twelve Data 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",
      "exchange_timezone": "America/New_York",
      "exchange": "NASDAQ",
      "type": "COMMON_STOCK"
   },
   "values":[
      {
         "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"
   },
   "values":[
      {
         "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"
   },
   "values":[
      {
         "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 the 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "AD - Chaikin A/D Line"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ad ad 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

ADD

Composite of values of two specified time series.

This API call returns "meta" and "time_series" values of ADD. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ADD - Arithmetic Addition",
      "series_type_1": "open",
      "series_type_2": "close"
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "add":"402.10798"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "add":"401.97"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "add":"401.98001"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "add":"402.2934"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "add":"402.83"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/add

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
add add value

JSON request example

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

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

Downloadable CSV example

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

ADOSC

Chaikin A/D Oscillator(ADOSC) is an indicator, which finds the relationship between increasing and decreasing 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ADOSC - Chaikin A/D Oscillator",
      "fast_period": 12,
      "slow_period": 26
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
adosc adosc 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ADX - Average Directional Index",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
adx adx 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 the ADX indicator. ADXR quantifies momentum change in the ADX.

This API call returns "meta" and "time_series" values of ADXR. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ADXR - Average. Directional Movement Rating",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
adxr adxr 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "APO - Absolute Price Oscillator",
      "fast_period": 12,
      "ma_type": "SMA",
      "series_type": "close",
      "slow_period": 26
   },
   "values":[
      {
         "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
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
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 referring to when the bar with specified interval was opened
apo apo 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 the beginning of a new trend and its strength.

This API call returns "meta" and "time_series" values of AROON. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "AROON - Aroon Indicator",
      "time_period": 14
   },
   "values":[
      {
         "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 referring 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 trends and whether they will continue.

This API call returns "meta" and "time_series" values of AROONOSC. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "AROONOSC - Aroon Oscillator",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
aroonosc aroonosc 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 a specified time period.

This API call returns "meta" and "time_series" values of ATR. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ATR - Average True Range",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
atr atr 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 the formula: (open + high + low + close) / 4.

This API call returns "meta" and "time_series" values of AVGPRICE. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "AVGPRICE - Average Price"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
avgprice avgprice 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. The volatility size parameter depends on standard deviation.

This API call returns "meta" and "time_series" values of BBANDS. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "BBANDS - Bollinger Band®",
      "ma_type": "SMA",
      "sd": 2,
      "series_type": "close",
      "time_period": 20
   },
   "values":[
      {
         "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
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
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
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 referring to when the bar with specified interval was opened
lower_band lower_band value
middle_band middle_band value
upper_band upper_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

BETA

Statistic Beta function.

This API call returns "meta" and "time_series" values of BETA. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "BETA - Beta",
      "series_type_1": "open",
      "series_type_2": "close",
      "time_period": 9
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "beta":"-0.05742"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "beta":"-0.31826"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "beta":"-0.60342"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "beta":"-0.4949"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "beta":"-0.24952"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/beta

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
beta beta value

JSON request example

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

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

Downloadable CSV example

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

BOP

Balance Of Power(BOP) measures the 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "BOP - Balance of Power"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
bop bop 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 trends and assess current critical conditions.

This API call returns "meta" and "time_series" values of CCI. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "CCI - Commodity Channel Index",
      "time_period": 20
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
cci cci 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) transforms input data with the mathematical ceil function.

This API call returns "meta" and "time_series" values of CEIL. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "CEIL - Vector CEIL",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ceil 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "CMO - Chande Momentum Oscillator",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
cmo cmo 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

CORREL

Measures linear correlation between two time series. Takes values in the range from -1 to 1, where -1 is total negative correlation, 0 is no correlation, and 1 is total positive correlation.

This API call returns "meta" and "time_series" values of CORREL. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "CORREL - Pearson's Correlation Coefficient",
      "series_type_1": "open",
      "series_type_2": "close",
      "time_period": 9
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "correl":"0.93282"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "correl":"0.94333"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "correl":"0.94225"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "correl":"0.9415"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "correl":"0.93658"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/correl

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
correl correl value

JSON request example

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

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

Downloadable CSV example

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

DEMA

Double Exponential Moving Average(DEMA) is 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "DEMA - Double Exponential Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
dema dema 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

DIV

Division of values of two specified time series.

This API call returns "meta" and "time_series" values of DIV. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "DIV - Arithmetic Division",
      "series_type_1": "open",
      "series_type_2": "close"
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "div":"1.00201"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "div":"1.00144"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "div":"1.0008"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "div":"1.00113"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "div":"1.00343"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/div

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
div div value

JSON request example

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

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

Downloadable CSV example

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

DX

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

This API call returns "meta" and "time_series" values of DX. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "DX - Directional Movement Index",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
dx dx 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) 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "EMA - Exponential Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ema ema 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 inputs data with the mathematical exponent function.

This API call returns "meta" and "time_series" values of EXP. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "EXP - Exponential",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
exp exp 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) transforms input data with the mathematical floor function.

This API call returns "meta" and "time_series" values of FLOOR. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "FLOOR - Vector FLOOR",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
floor 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) translated from Japanese means "average bar". It can be used to detect market trends and predict future price fluctuations.

This API call returns "meta" and "time_series" values of HEIKINASHICANDLES. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HEIKINASHICANDLES - Heikin-Ashi Candles"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
heikincloses heikincloses value
heikinhighs heikinhighs value
heikinlows heikinlows value
heikinopens heikinopens 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HLC3 - High, Low, Close Average Values"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
hlc3 hlc3 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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_DCPERIOD - Hilbert Transform Dominant Cycle Period",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ht_dcperiod ht_dcperiod 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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_DCPHASE - Hilbert Transform Dominant Cycle Phase",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ht_dcphase ht_dcphase 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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_PHASOR - Hilbert Transform Phasor Components",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring 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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_SINE - Hilbert Transform SineWave",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ht_leadsine ht_leadsine value
ht_sine ht_sine 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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_TRENDLINE - Hilbert Transform Instantaneous Trendline",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ht_trendline ht_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 read 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "HT_TRENDMODE - Hilbert Transform Trend vs Cycle Mode",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ht_trendmode ht_trendmode 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "KAMA - Kaufman's Adaptive Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
kama kama 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LINEARREG - Linear Regression",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
linearreg linearreg 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LINEARREGANGLE - Linear Regression Angle",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
linearregangle linearregangle 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LINEARREGINTERCEPT - Linear Regression Intercept",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
linearregintercept linearregintercept 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LINEARREGSLOPE - Linear Regression Slope",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
linearregslope linearregslope 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LN - Natural Logarithm to the base of constant e",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
ln ln 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "LOG10 - Logarithm to base 10",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
log10 log10 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MA - Moving Average",
      "ma_type": "SMA",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
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 referring to when the bar with specified interval was opened
ma ma 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MACD - Moving Average Convergence Divergence",
      "fast_period": 12,
      "series_type": "close",
      "signal_period": 9,
      "slow_period": 26
   },
   "values":[
      {
         "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
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
signal_period • Parameter is optional
• Number of periods to be plotted on MACD line. Must be at least 1
• Type int; Default 9
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 referring to when the bar with specified interval was opened
macd macd value
macd_hist macd_hist value
macd_signal macd_signal 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MACDEXT - Moving Average Convergence Divergence Extended",
      "fast_ma_type": "SMA",
      "fast_period": 12,
      "series_type": "close",
      "signal_ma_type": "SMA",
      "signal_period": 9,
      "slow_ma_type": "SMA",
      "slow_period": 26
   },
   "values":[
      {
         "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
fast_ma_type • Parameter is optional
• Type of Moving Average to be used on Fast Period
• Type string; Default SMA
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
signal_ma_type • Parameter is optional
• Type of Moving Average to be used on Signal 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
slow_ma_type • Parameter is optional
• Type of Moving Average to be used on Slow 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
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 referring to when the bar with specified interval was opened
macd macd value
macd_hist macd_hist value
macd_signal macd_signal 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 the Hilbert Transform Discriminator. More about MAMA can be read here.

This API call returns "meta" and "time_series" values of MAMA. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MAMA - MESA Adaptive Moving Average",
      "fast_limit": 0.5,
      "series_type": "close",
      "slow_limit": 0.05
   },
   "values":[
      {
         "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
fast_limit • Parameter is optional
• Type double; Default 0.5
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
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 referring to when the bar with specified interval was opened
fama fama value
mama mama 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MAX - Highest value over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
max max 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MAXINDEX - Index of highest value over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MEDPRICE - Median Price"
   },
   "values":[
      {
         "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
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 referring to when the bar with specified interval was opened
medprice medprice 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MFI - Money Flow Index",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
mfi mfi 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MIDPOINT - MidPoint over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
midpoint midpoint 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MIDPRICE - Midpoint Price over period",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
midprice midprice 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MIN - Lowest value over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
min min 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MININDEX - Index of lowest value over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MINMAX - Lowest and highest values over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
max max value
min min 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MINMAXINDEX - Indexes of lowest and highest values over period",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
maxidx maxidx value
minidx minidx 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MINUS_DI - Minus Directional Indicator",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
minus_di minus_di 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MINUS_DM - Minus Directional Movement",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
minus_dm minus_dm 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 the current price with the previous price N timeperiods ago.

This API call returns "meta" and "time_series" values of MOM. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MOM - Momentum",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
mom mom 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

MULT

Multiplication of values of two specified time series.

This API call returns "meta" and "time_series" values of MULT. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "MULT - Arithmetic Multiply",
      "series_type_1": "open",
      "series_type_2": "close"
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "mult":"40422.66609"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "mult":"40394.94944"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "mult":"40396.97591"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "mult":"40459.98128"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "mult":"40567.88357"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/mult

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
mult mult value

JSON request example

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

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

Downloadable CSV example

https://api.twelvedata.com/mult?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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "NATR - Normalized Average True Range",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
natr natr 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "OBV - On Balance Volume",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
obv obv 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

PERCENT_B

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

This API call returns "meta" and "time_series" values of PERCENT_B. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "PERCENT_B - %B Indicator",
      "ma_type": "SMA",
      "sd": 2,
      "series_type": "close",
      "time_period": 20
   },
   "values":[
      {
         "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
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
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
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 referring 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

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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "PLUS_DI - Plus Directional Indicator",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
plus_di plus_di 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "PLUS_DM - Plus Directional Movement",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
plus_dm plus_dm 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 the relationship between two Moving Averages(MA) as a percentage.

This API call returns "meta" and "time_series" values of PPO. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "PPO - Percentage Price Oscillator",
      "fast_period": 12,
      "ma_type": "SMA",
      "series_type": "close",
      "slow_period": 26
   },
   "values":[
      {
         "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
fast_period • Parameter is optional
• Number of periods for fast moving average. Must be at least 1
• Type int; Default 12
ma_type • Parameter is optional
• Type of Moving Average to be used
• Type string; Default SMA
series_type • Parameter is optional
• Price type on which technical indicator is calculated
• Supports: open, high, low and close
• Type string; Default close
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 referring to when the bar with specified interval was opened
ppo ppo 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 the rate of change between the 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ROC - Rate of change",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
roc roc 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 the rate of change in % between the current price and price n timeperiods ago. Formula: (price - prevPrice) / prevPrice.

This API call returns "meta" and "time_series" values of ROCP. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ROCP - Rate of change percentage",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
rocp rocp 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 the ratio between the current price and price n timeperiods ago. Formula: (price / prevPrice).

This API call returns "meta" and "time_series" values of ROCR. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ROCR - Rate of change ratio",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
rocr rocr 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 the ratio with 100 scale between the current price and price n timeperiods ago. Formula: (price / prevPrice) * 100.

This API call returns "meta" and "time_series" values of ROCR100. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ROCR100 - Rate of change ratio 100 scale",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
rocr100 rocr100 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 change 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "RSI - Relative Strength Index",
      "series_type": "close",
      "time_period": 14
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
rsi rsi 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SAR - Parabolic SAR",
      "acceleration": 0.02,
      "maximum": 0.2
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
sar 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

SAREXT

Parabolic SAR Extended(SAREXT) inherits the idea of classic SAR indicator but adds more flexibility in setting parameters.

This API call returns "meta" and "time_series" values of SAREXT. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SAREXT - Parabolic SAR Extended",
      "acceleration_limit_long": 0.02,
      "acceleration_limit_short": 0.02,
      "acceleration_long": 0.02,
      "acceleration_max_long": 0.2,
      "acceleration_max_short": 0.2,
      "acceleration_short": 0.02,
      "offset_on_reverse": 0,
      "start_value": 0
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sarext":"-201.54365"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sarext":"-201.71956"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sarext":"-201.92195"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sarext":"-202.117"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sarext":"-202.31643"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sarext

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_limit_long • Required parameter
• Type double; Default 0.02
acceleration_limit_short • Required parameter
• Type double; Default 0.02
acceleration_long • Required parameter
• Type double; Default 0.02
acceleration_max_long • Required parameter
• Type double; Default 0.2
acceleration_max_short • Required parameter
• Type double; Default 0.2
acceleration_short • Required parameter
• Type double; Default 0.02
offset_on_reverse • Required parameter
• Type double; Default 0
start_value • Required parameter
• Type double; Default 0
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 referring to when the bar with specified interval was opened
sarext sarext value

JSON request example

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

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

Downloadable CSV example

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

SMA

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

This API call returns "meta" and "time_series" values of SMA. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SMA - Simple Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
sma sma 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) transforms input data with square root.

This API call returns "meta" and "time_series" values of SQRT. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SQRT - Square Root",
      "series_type": "close"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
sqrt sqrt 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. This might be important when assessing risks.

This API call returns "meta" and "time_series" values of STDDEV. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "STDDEV - Standard Deviation",
      "sd": 2,
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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
sd • Parameter is optional
• Number of standard deviations. Must be at least 1
• Type double; Default 2
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 referring to when the bar with specified interval was opened
stddev stddev 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "STOCH - Stochastic Oscillator",
      "fast_k_period": 14,
      "slow_d_period": 3,
      "slow_dma_type": "SMA",
      "slow_k_period": 1,
      "slow_kma_type": "SMA"
   },
   "values":[
      {
         "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_d_period • Parameter is optional
• Type int; Default 3
slow_dma_type • Parameter is optional
• Type of Moving Average to be used on Slow DMA Period
• Type string; Default SMA
slow_k_period • Parameter is optional
• Type int; Default 1
slow_kma_type • Parameter is optional
• Type of Moving Average to be used on Slow KMA 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 referring to when the bar with specified interval was opened
slow_d slow_d value
slow_k slow_k 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "STOCHF - Stochastic Fast",
      "fast_d_period": 3,
      "fast_dma_type": "SMA",
      "fast_k_period": 14
   },
   "values":[
      {
         "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_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
fast_k_period • Parameter is optional
• 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 referring to when the bar with specified interval was opened
fast_d fast_d value
fast_k fast_k 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 the STOCH and RSI indicators. It is used to determine the level of overbought and oversold as well as current market trends of an asset.

This API call returns "meta" and "time_series" values of STOCHRSI. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "STOCHRSI - Stochastic RSI",
      "fast_d_period": 3,
      "fast_dma_type": "SMA",
      "fast_k_period": 3,
      "series_type": "close",
      "time_period": 14
   },
   "values":[
      {
         "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
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
fast_k_period • Parameter is optional
• Type int; Default 3
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 referring to when the bar with specified interval was opened
fast_d fast_d value
fast_k fast_k 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

SUB

Subtraction of values of two specified time series.

This API call returns "meta" and "time_series" values of SUB. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SUB - Arithmetic Subtraction",
      "series_type_1": "open",
      "series_type_2": "close"
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sub":"0.404"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sub":"0.29001"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sub":"0.16"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sub":"0.22659"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sub":"0.68999"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sub

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_1 • Parameter is optional
• Price type used as the first part of technical indicator
• Supports: open, high, low and close
• Type string; Default open
series_type_2 • Parameter is optional
• Price type used as the second part of technical indicator
• 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 referring to when the bar with specified interval was opened
sub sub value

JSON request example

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

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

Downloadable CSV example

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

SUM

Summation of values of two specified time series.

This API call returns "meta" and "time_series" values of SUM. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

HTTP request example

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

This request will return JSON with the following structure

{
   "meta":{
      "symbol": "AAPL",
      "interval": "1min",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "SUM - Vector Summation",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "datetime":"2019-08-09 15:59:00",
         "sum":"1812.70842"
      },
      {
         "datetime":"2019-08-09 15:58:00",
         "sum":"1813.84842"
      },
      {
         "datetime":"2019-08-09 15:57:00",
         "sum":"1815.22842"
      },
      {
         "datetime":"2019-08-09 15:56:00",
         "sum":"1816.66002"
      },
      {
         "datetime":"2019-08-09 15:55:00",
         "sum":"1818.28662"
      },
      {...}
   ],
   "status":"ok"
}

HTTP route

/sum

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 referring to when the bar with specified interval was opened
sum sum value

JSON request example

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

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

Downloadable CSV example

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

T3MA

Triple Exponential Moving Average(T3MA) makes better smoothing of moving average than the classical TEMA indicator by extending the lookback period and applying other enhanced parameters.

This API call returns "meta" and "time_series" values of T3MA. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "T3MA - T3MA",
      "series_type": "close",
      "time_period": 9,
      "v_factor": 0.7
   },
   "values":[
      {
         "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
• Volume factor between 0 and 1 to determine how the moving averages responds
• 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 referring 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) smooths out price fluctuations, making it more trend detection and more transparent without the lag.

This API call returns "meta" and "time_series" values of TEMA. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "TEMA - Triple Exponential Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
tema tema 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) is usually 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "TRANGE - True Range"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
trange trange 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) 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "TRIMA - Triangular Moving Average",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
trima trima 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 the last points of multiple regression trendlines.

This API call returns "meta" and "time_series" values of TSF. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "TSF - Time Series Forecast",
      "series_type": "close",
      "time_period": 9
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
tsf tsf 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 consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "TYPPRICE - Typical Price"
   },
   "values":[
      {
         "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 referring to when the bar with specified interval was opened
typprice typprice 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 the quality of overbought and oversold signals.

This API call returns "meta" and "time_series" values of ULTOSC. "meta" object consist of general information about the requested technical indicator. "time_series" is the array of objects ordered by time descending updated in real-time.

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",
      "currency": "USD",
      "exchange_timezone": "America/New_York",
      "exchange": "NYSE",
      "type": "COMMON_STOCK",
      "indicator": "ULTOSC - Ultimate Oscillator",
      "time_period_1": 7,
      "time_period_2": 14,
      "time_period_3": 28
   },
   "values":[
      {
         "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 referring to when the bar wi