latestSwagger 2.02026-08-12187723.0 MB

c4a12725cdb5

technical_indicator

Normalized average true range

The Normalized Average True Range (NATR) endpoint provides a volatility indicator that calculates the average range of price movement over a specified period, expressed as a percentage of the security's price. This data allows users to compare volatility levels across different securities easily. The endpoint returns a time series of NATR values, which can be used to assess and compare the price volatility of various financial instruments.

get/natr

Query parameters

symbolstring

Symbol ticker of the instrument. E.g. AAPL, EUR/USD, ETH/BTC, ...

isinstring

Filter by international securities identification number (ISIN). ISIN access is activating in the <a href="https://twelvedata.com/account/add-ons">Data add-ons</a> section

figistring

The FIGI of an instrument for which data is requested. This parameter is available on the <a href="https://twelvedata.com/pricing">Ultra</a> plan (individual) and the <a href="https://twelvedata.com/pricing-business">Enterprise</a> plan (business) and above.

cusipstring

The CUSIP of an instrument for which data is requested. CUSIP access is activating in the <a href="https://twelvedata.com/account/add-ons">Data add-ons</a> section

interval'1min' | '5min' | '15min' | '30min' | '45min' | '1h' | '2h' | '4h' | '8h' | '1day' | '1week' | '1month' required

Interval between two consecutive points in time series

outputsizeinteger

Number of data points to retrieve. Supports values in the range from 1 to 5000. Default 30 when no date parameters are set, otherwise set to maximum

exchangestring

Exchange where instrument is traded

mic_codestring

Market Identifier Code (MIC) under ISO 10383 standard

countrystring

The country where the instrument is traded, e.g., United States or US

type'American Depositary Receipt' | 'Bond' | 'Bond Fund' | 'Closed-end Fund' | 'Common Stock' | 'Depositary Receipt' | 'Digital Currency' | 'ETF' | 'Exchange-Traded Note' | 'Global Depositary Receipt' | 'Limited Partnership' | 'Mutual Fund' | 'Physical Currency' | 'Preferred Stock' | 'REIT' | 'Right' | 'Structured Product' | 'Trust' | 'Unit' | 'Warrant'

The asset class to which the instrument belongs

timezonestring

Timezone at which output datetime will be displayed. Supports:

<ul> <li>1. <code>Exchange</code> for local exchange time</li> <li>2. <code>UTC</code> for datetime at universal UTC standard</li> <li>3. Timezone name according to the IANA Time Zone Database. E.g. <code>America/New_York</code>, <code>Asia/Singapore</code>. Full list of timezones can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="blank">here</a></li> </ul> <p>Interval Limitation: The timezone parameter is only applicable for intraday intervals (less than 1 day). For intervals of 1day, 1week, or 1month, the timezone parameter is ignored, and data is strictly returned in the Exchange local time.</p> <i>Take note that the IANA Timezone name is case-sensitive</i>
start_datestring

Can be used separately and together with end_date. Format 2006-01-02 or 2006-01-02T15:04:05

Default location:

<ul> <li>Forex and Cryptocurrencies - <code>UTC</code></li> <li>Stocks - where exchange is located (e.g. for AAPL it will be <code>America/New_York</code>)</li> </ul> Both parameters take into account if <code>timezone</code> parameter is provided.<br/> If <code>timezone</code> is given then, <code>start_date</code> and <code>end_date</code> will be used in the specified location

Examples:

<ul> <li>1. <code>&symbol=AAPL&start_date=2019-08-09T15:50:00&…</code><br/> Returns all records starting from 2019-08-09T15:50:00 New York time up to current date</li> <li>2. <code>&symbol=EUR/USD&timezone=Asia/Singapore&start_date=2019-08-09T15:50:00&…</code><br/> Returns all records starting from 2019-08-09T15:50:00 Singapore time up to current date</li> <li>3. <code>&symbol=ETH/BTC&timezone=Europe/Zurich&start_date=2019-08-09T15:50:00&end_date=2019-08-09T15:55:00&...</code><br/> Returns all records starting from 2019-08-09T15:50:00 Zurich time up to 2019-08-09T15:55:00</li> </ul>
end_datestring

The ending date and time for data selection, see start_date description for details.

datestring

Specifies the exact date to get the data for. Could be the exact date, e.g. 2021-10-27, or in human language today or yesterday

order'asc' | 'desc'

Sorting order of the output

prepostboolean

Returns quotes that include pre-market and post-market data. Only for the Pro plan (individual) and Venture plan (business) and above. Available at the 1min, 5min, 15min, and 30min intervals for US equities. Open, high, low, close values are supplied without volume

format'JSON' | 'CSV'

The format of the response data

delimiterstring

The separator used in the CSV response data

dpinteger

Specifies the number of decimal places for floating values. Should be in range [0, 11] inclusive. By default, the number of decimal places is automatically determined based on the values provided

previous_closeboolean

A boolean parameter to include the previous closing price in the time_series data. If true, adds previous bar close price value to the current object

adjust'all' | 'splits' | 'dividends' | 'none'

Adjusting mode for prices

time_periodinteger

Number of periods to average over. Takes values in the range from 1 to 800

include_ohlctrue | false

Specify if OHLC values should be added in the output

Response

statusstring required

Response status

Example response

{
  "meta": {
    "symbol": "AAPL",
    "interval": "1min",
    "currency": "USD",
    "exchange_timezone": "America/New_York",
    "exchange": "NASDAQ",
    "mic_code": "XNAS",
    "type": "Common Stock",
    "indicator": {
      "name": "NATR - Normalized Average True Range",
      "time_period": 14
    }
  },
  "values": [
    {
      "datetime": "2019-08-09 15:59:00",
      "natr": "0.09862",
      "open": "148.73500",
      "high": "148.86000",
      "low": "148.73000",
      "close": "148.85001",
      "volume": "624277"
    }
  ],
  "status": "ok"
}