Twelve Data Get Time Series Linear Reg Intercept
0.5积分/次
ae_twelvedata_get_time_series_linear_reg_intercept
计算证券时间序列线性回归线的纵轴截距,获取趋势的基准值。
0.5积分/次
价格说明
0.5积分/次
| 条件 | 费用 |
|---|---|
| 每次调用 | 0.5积分/次 |
工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
dp | integer | 否 | 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 | 否 | 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 | 条件必填 | 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) | 否 | The asset class to which the instrument belongs | — |
cusip | string | 条件必填 | 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) | 否 | Sorting order of the output | desc |
adjust | enum (all | splits | dividends | none) | 否 | Adjusting mode for prices | splits |
format | enum (JSON | CSV) | 否 | The format of the response data | JSON |
symbol | string | 条件必填 | 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 | 否 | The country where the instrument is traded, e.g., `United States` or `US` | — |
end_date | string | 否 | The ending date and time for data selection, see `start_date` description for details. | — |
exchange | string | 否 | Exchange where instrument is traded | — |
interval | enum (1min | 5min | 15min | 30min | 45min | 1h | 2h | 4h | 8h | 1day | 1week | 1month) | 是 | Interval between two consecutive points in time series | — |
mic_code | string | 否 | Market Identifier Code (MIC) under ISO 10383 standard | — |
timezone | string | 否 | 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 | 否 | The separator used in the CSV response data | ; |
outputsize | integer | 否 | 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 | 否 | 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 current date</li> </ul> | — |
series_type | enum (close | open | high | low | volume) | 否 | Price type on which technical indicator is calculated | open |
time_period | integer | 否 | Number of periods to average over. Takes values in the range from `1` to `800` | 9 |
include_ohlc | boolean | 否 | Specify if OHLC values should be added in the output | false |
previous_close | boolean | 否 | 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 |
调用示例
复制请求代码,查看对应的返回示例。
POST
/agent-api/v1/tool/executeX-Api-Key请求代码request.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_twelvedata_get_time_series_linear_reg_intercept' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"exchange": "NASDAQ",
"interval": "1min",
"symbol": "AAPL"
}
}'返回示例response.json
{
"meta": {
"currency": "USD",
"exchange": "NASDAQ",
"exchange_timezone": "America/New_York",
"indicator": {
"name": "LINEARREGINTERCEPT - Linear Regression Intercept",
"series_type": "close",
"time_period": 9
},
"interval": "1min",
"type": "Common Stock"
},
"status": "ok",
"values": [
{
"datetime": "2026-09-22 15:59:00",
"linearregintercept": "339.93057"
}
]
}返回示例仅展示部分内容,不代表完整响应;复制内容为合法 JSON。

