Contents

- 1 Quick Start
- 2 Filter fields
- 3 Technical Indicator Functions
- 3.1 Split Adjusted Data
- 3.2 Average Volume (avgvol)
- 3.3 Average Volume by Price (avgvolccy)
- 3.4 SMA (Simple Moving Average)
- 3.5 EMA (Exponential Moving Average)
- 3.6 WMA (Weighted Moving Average)
- 3.7 Volatility (Variance between returns)
- 3.8 Relative Strength Index (rsi)
- 3.9 Slope (Linear Regression)
- 3.10 Directional Movement Index (dmi or dx)
- 3.11 Average Directional Movement Index (adx)
- 3.12 Moving Average Convergence/Divergence (macd)
- 3.13 Stochastic Technical Indicator

- 4 Important Notes

## Quick Start

The Technical Indicator API is available under ‘All World Extended’ and ‘All-In-One’ data packages. Each Technical API request consumes 5 API calls. To get technical indicators data for every equity we have in our data set, use the following URL:

https://eodhistoricaldata.com/api/technical/AAPL.US?api_token=YOUR_API_KEY&order=d&fmt=json&from=2017-08-01&to=2020-01-01&function=sma&period=50

**AAPL.US**consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}, then you can use, for example, AAPL.MX for Mexican Stock Exchange. or AAPL.US for NASDAQ. Check the list of supported exchanges to get more information about stock markets we do support.**api_token**– your own API KEY, which you will get after you subscribe to our services.**function**– the function that will be applied to data series to get technical indicator data. The list of possible functions with additional parameters you get below.**period**– the number of data points used to calculate each moving average value. Valid range from 2 to 100000 with the default value – 50.**from**and**to**– you can use these parameters with format ‘YYYY-MM-DD’. For example, if you need to get data only from Jan 5, 2017 to Feb 10, 2017, you need to use from=2017-01-05 and to=2017-02-10.**order**– use ‘a’ for ascending dates (from old to new) and ‘d’ for descending dates (from new to old). By default, dates are shown in ascending order.**fmt**– the output format, could be ‘json’ for JSON and ‘csv’ for CSV output. The default value is ‘json’.

An example of output for SMA function for AAPL

## Filter fields

We also support the ability to get only the last value, just add **‘filter=last_ema’** or **‘filter=last_volume’ **with ‘fmt=json’ and you will get only one number. For example, with this URL:

https://eodhistoricaldata.com/api/technical/AAPL?api_token=YOUR_API_TOKEN&fmt=json&function=ema&filter=last_ema

You will get one value – the last EMA value for AAPL (Apple Inc).

## Technical Indicator Functions

For all functions you can use the following parameters as described above: **to**, **from**, **order** and **fmt**. In addition, you should use **function** parameter, we described the specific usage for each function below.

### Split Adjusted Data

It’s not a technical indicator itself, but we added this function to our API. By default Open, High, Low and Close values (OHLC) we provide in **raw values** and adjust neither for splits nor for dividends. While ‘adjusted_close’ values are adjusted both to splits and dividends. However, if you need only split-adjusted closes, you can use this function to get the desired time series.

API Parameters:

**function** [required] – **splitadjusted**.

### Average Volume (avgvol)

This function returns the **Average Trading Volume**. The average volume of a security over a longer period of time is the total amount traded in that period, divided by the length of the period.

API Parameters:

**function**[required] –**avgvol**.**period**[optional] – the number of data points used to calculate each average trading volume value. Valid range from 2 to 100000 with the default value – 50.

### Average Volume by Price (avgvolccy)

This function returns the **Average Trading Volume** in currency. The average volume in the currency of a security over a longer period of time is the total amount traded in that period multiplied by the price of the security, and divided by the length of the period.

API Parameters:

**function**[required] –**avgvolccy****period**[optional] – the number of data points used to calculate each average trading volume value. Valid range from 2 to 100000 with the default value – 50.

### SMA (Simple Moving Average)

This function returns the **Simple Moving Average** indicator. More information on Wikipedia SMA article.

API Parameters:

**function**[required] –**sma**.**period**[optional] – the number of data points used to calculate each simple moving average value. Valid range from 2 to 100000 with the default value – 50.

### EMA (Exponential Moving Average)

This function returns the **Exponential Moving Average** indicator. More information on Wikipedia EMA article.

API Parameters:

**function**[required] –**ema**.**period**[optional] – the number of data points used to calculate each exponential moving average value. Valid range from 2 to 100000 with the default value – 50.

### WMA (Weighted Moving Average)

This function returns the Weighted Moving Average technical indicator. More information on Wikipedia WMA article.

API Parameters:

**function**[required] –**wma**.**period**[optional] – the number of data points used to calculate each weighted moving average value. Valid range from 2 to 100000 with the default value – 50.

### Volatility (Variance between returns)

This function returns the Volatility, a statistical measure of the dispersion of returns for a given security or market index. More information on the Investopedia Volatility article.

API Parameters:

**function**[required] –**volatility**.**period**[optional] – the number of data points used to calculate each weighted moving average value. Valid range from 2 to 100000 with the default value – 50.

### Relative Strength Index (rsi)

This function returns the **Relative Strength Index (RSI)** technical indicator. More information on Wikipedia RSI article.

API Parameters:

**function**[required] –**rsi**.**period**[optional] – the number of data points used to calculate each relative strength index value. Valid range from 2 to 100000 with the default value – 50.

### Slope (Linear Regression)

This function returns the Linear Regression Slope. More information on Wikipedia Linear Regression article.

API Parameters:

- function [required] –
**slope**. - period [optional] – the number of data points used to calculate each weighted moving average value. Valid range from 2 to 100000 with the default value – 50.

The output:

Returns an array with calculated data or false on failure.

### Directional Movement Index (dmi or dx)

This function returns the Directional Movement Index. More information on Directional Movement Index article.

API Parameters:

- function [required] –
**dmi**. - period [optional] – the number of data points used to calculate each weighted moving average value. Valid range from 2 to 100000 with the default value – 50.

The output:

Returns an array with calculated data or false on failure.

### Average Directional Movement Index (adx)

This function returns the Average Directional Movement Index. More information on Average Directional Movement Index article.

API Parameters:

- function [required] –
**adx**. - period [optional] – the number of data points used to calculate each weighted moving average value. Valid range from 2 to 100000 with the default value – 50.

The output:

Returns an array with calculated data or false on failure.

### Moving Average Convergence/Divergence (macd)

This function returns Moving Average Convergence/Divergence values. More information on Wikipedia MACD article.

API Parameters:

- function [required] –
**macd**. - fast_period [optional] – the default value is 12. Valid range from 2 to 100000.
- slow_period [optional] – the default value is 26. Valid range from 2 to 100000.
- signal_period [optional] – the default value is 9. Valid range from 2 to 100000.

The output:

This function returns MACD values, Signal values, and Divergence values.

### Stochastic Technical Indicator

This function returns Stochastic values. More information on Wikipedia Stochastic Oscillator article.

API Parameters:

- function [required] –
**stochastic**. - fast_kperiod [optional] – Fast K-period, the default value is 14. Valid range from 2 to 100000.
- slow_kperiod [optional] – Slow K-period, the default value is 3. Valid range from 2 to 100000.
- slow_dperiod [optional] – Slow D-period, the default value is 3. Valid range from 2 to 100000.

The output:

This function returns K values and D Values.

## Important Notes

Please note that each API request for Technical API consumes 5 API calls. We are also open to any feedback and ready to add any function you are interested in our Technical API. Just send us an email to support@eodhistoricaldata.com.