Twelve Data Get Time Series Linear Reg Angle
0.5 credits/call
ae_twelvedata_get_time_series_linear_reg_angle
Use Twelve Data to calculate the linear regression angle of an instrument's price series, showing the direction and steepness of its trend.
0.5 credits/call
Pricing
0.5 credits/call
| Condition | Charge |
|---|---|
| Each call | 0.5 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
dp | integer | No | 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 | -1 |
date | string | No | 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` | — |
isin | string | Conditional | ISIN of the instrument. Use a real non-empty identifier; if this instrument is unavailable by ISIN, resolve its ticker symbol first. | — |
type | enum (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) | No | The asset class to which the instrument belongs | — |
cusip | string | Conditional | CUSIP of the instrument. Use a real non-empty identifier; if this instrument is unavailable by CUSIP, resolve its ticker symbol first. | — |
order | enum (asc | desc) | No | Sorting order of the output | desc |
adjust | enum (all | splits | dividends | none) | No | Adjusting mode for prices | splits |
format | enum (JSON | CSV) | No | The format of the response data | JSON |
symbol | string | Conditional | Ticker symbol of the instrument, for example AAPL, EUR/USD or ETH/BTC. Use a real non-empty symbol; a supported ISIN or CUSIP may be used instead when this endpoint accepts it. | — |
country | string | No | The country where the instrument is traded, e.g., `United States` or `US` | — |
end_date | string | No | The ending date and time for data selection, see `start_date` description for details. | — |
exchange | string | No | Exchange where instrument is traded | — |
interval | enum (1min | 5min | 15min | 30min | 45min | 1h | 2h | 4h | 8h | 1day | 1week | 1month) | Yes | Interval between two consecutive points in time series | — |
mic_code | string | No | Market Identifier Code (MIC) under ISO 10383 standard | — |
timezone | string | No | 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> | Exchange |
delimiter | string | No | The separator used in the CSV response data | ; |
outputsize | integer | No | 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 | 30 |
start_date | string | No | 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> | — |
series_type | enum (close | open | high | low | volume) | No | Price type on which technical indicator is calculated | open |
time_period | integer | No | Number of periods to average over. Takes values in the range from `1` to `800` | 9 |
include_ohlc | boolean | No | Specify if OHLC values should be added in the output | false |
previous_close | boolean | No | 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 | false |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_twelvedata_get_time_series_linear_reg_angle' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"exchange": "NASDAQ",
"interval": "1min",
"symbol": "AAPL"
}
}'Response exampleresponse.json
{
"meta": {
"currency": "USD",
"exchange": "NASDAQ",
"exchange_timezone": "America/New_York",
"indicator": {
"name": "LINEARREGANGLE - Linear Regression Angle",
"series_type": "close",
"time_period": 9
},
"interval": "1min",
"type": "Common Stock"
},
"status": "ok",
"values": [
{
"datetime": "2026-09-22 15:59:00",
"linearregangle": "-2.76842"
}
]
}This example shows part of the response. Copied content is valid JSON.

