Ae · Twelvedata · Get · Time · Series

0.50积分/次
ae_twelvedata_get_time_series

获取金融工具的历史价格时间序列,包括开高低收及适用时的成交量;可选择周期、日期范围和复权方式。

效率工具加密货币
0.50积分/次

价格说明

0.50积分/次

API 调用

通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。

cURL
curl --request POST \
  --url 'https://api.agentearth.ai/v1/tools/run' \
  --header 'Authorization: Bearer $AGENTEARTH_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "tool": "ae_twelvedata_get_time_series",
  "input": {
    "dp": "-1",
    "date": "xxx",
    "isin": "xxx",
    "type": "xxx",
    "cusip": "xxx",
    "order": "desc",
    "adjust": "splits",
    "format": "JSON",
    "symbol": "xxx",
    "country": "xxx",
    "end_date": "xxx",
    "exchange": "xxx",
    "interval": "xxx",
    "mic_code": "xxx",
    "timezone": "Exchange",
    "delimiter": ";",
    "outputsize": "30",
    "start_date": "xxx",
    "previous_close": "false"
  }
}'
请求方式
POST
接口地址
/v1/tools/run
鉴权方式
Bearer Token
超时时间
60 秒
当前版本
—
响应示例
{
  "error_no": 0,
  "error_msg": "",
  "result": [
    {
      "type": "text",
      "text": "xxx"
    }
  ],
  "platform_annotations": {
    "source": "AgentEarth",
    "platform_note": "xxx",
    "platform_suggestion": "xxx"
  }
}

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
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-1
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`—
isinstring否ISIN of the instrument. Use a real non-empty identifier; if this instrument is unavailable by ISIN, resolve its ticker symbol first.—
typeenum (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—
cusipstring否CUSIP of the instrument. Use a real non-empty identifier; if this instrument is unavailable by CUSIP, resolve its ticker symbol first.—
orderenum (asc | desc)否Sorting order of the outputdesc
adjustenum (all | splits | dividends | none)否Adjusting mode for pricessplits
formatenum (JSON | CSV)否The format of the response dataJSON
symbolstring否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.—
countrystring否The country where the instrument is traded, e.g., `United States` or `US`—
end_datestring否The ending date and time for data selection, see `start_date` description for details.—
exchangestring否Exchange where instrument is traded—
intervalenum (1min | 5min | 15min | 30min | 45min | 1h | 2h | 4h | 8h | 1day | 1week | 1month)是Interval between two consecutive points in time series—
mic_codestring否Market Identifier Code (MIC) under ISO 10383 standard—
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>Exchange
delimiterstring否The separator used in the CSV response data;
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 maximum30
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>—
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 objectfalse