Google Finance API
Google Finance 报价 API
获取任意股票、指数、ETF、共同基金、货币对或加密货币代码的实时报价:名称、现价、当日涨跌额和涨跌幅、报价货币、交易所和市场状态,以及盘中和参考数据(开盘价、当日最高价和最低价、前收盘价、成交量、市值和 52 周区间)。
POST/v1/run/google_finance.quote
请求数
-
30d
试一试
发出你的第一个请求
示例响应
免费运行只返回前 3 条结果。为密钥充值即可获得完整响应。
{
"data": {
"items": [
{
"asOfUtc": 12.5,
"ask": 12.5,
"assetType": "general",
"averageVolume": 12500,
"bid": 1024,
"change": 12.5,
"changePercent": 12.5,
"currency": "USD",
"dayHigh": 12.5,
"dayLow": 12.5,
"exchange": "example",
"fiftyTwoWeekHigh": 12.5,
"fiftyTwoWeekLow": 12.5,
"marketCap": 12.5,
"marketState": "CA",
"name": "Example title",
"open": 12.5,
"previousClose": 12.5,
"price": 19.99,
"symbol": "example",
"volume": 12500
}
]
},
"found": true,
"reason": "not_found"
}响应类型定义
interface GoogleFinanceQuoteResponse {
data: {
items: {
asOfUtc?: number;
ask?: number;
assetType?: string;
averageVolume?: number;
bid?: number;
change?: number;
changePercent?: number;
currency?: string;
dayHigh?: number;
dayLow?: number;
exchange?: string;
fiftyTwoWeekHigh?: number;
fiftyTwoWeekLow?: number;
marketCap?: number;
marketState?: string;
name?: string;
open?: number;
previousClose?: number;
price: number;
symbol: string;
volume?: number;
}[];
} | null;
found: boolean;
reason?: "not_found";
}完整的参数与响应参考:这个接口的每个字段、类型和示例。
参考
请求、响应与价格
最近验证于 2026-09-29 · 可用率和延迟按 30d 统计POST /v1/run/google_finance.quote
curl -X POST https://api.getanyapi.com/v1/run/google_finance.quote \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol":"AAPL:NASDAQ"}'| 字段 | 类型 | 示例值 |
|---|---|---|
| 请求体 | ||
| symbol | string | "AAPL:NASDAQ"要查询报价的代码。美股使用纯代码(例如 AAPL、TSLA);非美国股票加市场后缀(例如 VOW3.DE、BABA.HK、BARC.L);指数使用脱字符(例如 ^GSPC、^DJI);加密货币和货币使用货币对形式(例如 BTC-USD、EURUSD=X);共同基金和期货使用其代码(例如 VFIAX、ES=F)。常见的其他写法也会被接受并标准化(例如 AAPL:NASDAQ、.DJI、BTC/USD)。只接受精确代码,不支持按公司名称搜索。 |
| 响应 | ||
| data | object | Result payload, or null when the symbol did not resolve. |
| data.items | object[] | The quote for the requested symbol: name, current price, day change (absolute and percent), quote currency, exchange and market state, plus intraday and reference figures. Up to one element (empty when the symbol did not resolve). Populated whenever the provider has data for the entity. |
| data.items[].asOfUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].ask | number | Current ask price. |
| data.items[].assetType | string | Instrument class (e.g. EQUITY, ETF, CRYPTOCURRENCY, CURRENCY, INDEX, MUTUALFUND, FUTURE). |
| data.items[].averageVolume | number | Average daily trading volume. |
| data.items[].bid | number | Current bid price. |
| data.items[].change | number | Absolute price change on the day, in the quote currency. |
| data.items[].changePercent | number | Percent price change on the day. |
| data.items[].currency | string | ISO currency the quote is priced in (e.g. USD). Populated whenever the provider has data for the entity. |
| data.items[].dayHigh | number | Highest price so far in the current session. |
| data.items[].dayLow | number | Lowest price so far in the current session. |
| data.items[].exchange | string | Exchange the instrument trades on (e.g. NasdaqGS). Populated whenever the provider has data for the entity. |
| data.items[].fiftyTwoWeekHigh | number | Highest price over the trailing 52 weeks. |
| data.items[].fiftyTwoWeekLow | number | Lowest price over the trailing 52 weeks. |
| data.items[].marketCap | number | Market capitalization in the quote currency. |
| data.items[].marketState | string | Current market state (e.g. REGULAR, PRE, POST, CLOSED). |
| data.items[].name | string | Instrument or company name. Populated whenever the provider has data for the entity. |
| data.items[].open | number | Opening price for the current session. |
| data.items[].previousClose | number | Previous session close price. |
| data.items[].price | number | Current price in the quote currency. |
| data.items[].symbol | string | Resolved ticker symbol for the quote. Populated whenever the provider has data for the entity. |
| data.items[].volume | number | Traded volume for the current session. |
| found | boolean | True when the symbol resolved to a quote. |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| 价格 | ||
| 每次请求价格 | USD | US$0.0022 |
| 价格(/千次请求) | USD | US$2.20 |
常见问题
关于 Google Finance 报价 API
AnyAPI 的 Google Finance 报价 API 只需一次 POST 请求 /v1/run/google_finance.quote,就以统一格式的 JSON 返回 Google Finance 数据。获取任意股票、指数、ETF、共同基金、货币对或加密货币代码的实时报价:名称、现价、当日涨跌额和涨跌幅、报价货币、交易所和市场状态,以及盘中和参考数据(开盘价、当日最高价和最低价、前收盘价、成交量、市值和 52 周区间)。无论哪个数据源提供服务,AnyAPI 都返回同一套统一的 schema。费用:每千次请求 US$2.20 起,以美元计价,无需订阅,也没有每月最低消费。
费用:每千次请求 US$2.20 起,以美元计价,无需订阅,也没有每月最低消费。你只需为一个美元钱包充值,每次调用从中扣费。部分由钱包付费的失败请求会产生处理费用,我们按成本原价转嫁,不加价;错误响应会显示收取的金额。
获取任意股票、指数、ETF、共同基金、货币对或加密货币代码的实时报价:名称、现价、当日涨跌额和涨跌幅、报价货币、交易所和市场状态,以及盘中和参考数据(开盘价、当日最高价和最低价、前收盘价、成交量、市值和 52 周区间)。响应是统一格式的 JSON,外层结构与每个 AnyAPI 接口相同,所以解析另一个接口只需换一个 URL,别的都不用改。