Ae · Twelvedata · Get · Quote
0.50积分/次
ae_twelvedata_get_quote
获取金融工具的详细最新行情,包括最新价、开高低收、成交量和涨跌情况。
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_quote",
"input": {
"dp": "5",
"eod": "false",
"isin": "xxx",
"type": "xxx",
"cusip": "xxx",
"format": "JSON",
"symbol": "xxx",
"country": "xxx",
"exchange": "xxx",
"interval": "1day",
"mic_code": "xxx",
"timezone": "Exchange",
"delimiter": ";",
"rolling_period": "24",
"volume_time_period": "9"
}
}'- 请求方式
- 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"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
dp | integer | 否 | Specifies the number of decimal places for floating values Should be in range [0,11] inclusive | 5 |
eod | boolean | 否 | If true, return data for a closed trading day. Only supported when interval is 1day or omitted (defaults to 1day). For any other interval, omit eod or set it to false; eod=true with a non-daily interval returns an upstream error. | false |
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. | — |
format | enum (JSON | CSV) | 否 | Value can be JSON or CSV Default JSON | 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 | 否 | Country where instrument is traded, e.g., `United States` or `US` | — |
exchange | string | 否 | Exchange where instrument is traded | — |
interval | enum (1min | 5min | 15min | 30min | 45min | 1h | 2h | 4h | 8h | 1day | 1week | 1month) | 否 | Interval of the quote. Defaults to 1day when omitted. When eod=true, only 1day is supported; omit eod or set it to false for other intervals. | 1day |
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 | 否 | Specify the delimiter used when downloading the CSV file | ; |
rolling_period | integer | 否 | Number of hours for calculate rolling change at period. By default set to 24, it can be in range [1, 168]. | 24 |
volume_time_period | integer | 否 | Number of periods for Average Volume | 9 |
