| name | itick-stock-quote |
| description | 查询股票实时盘中行情、股票信息等功能。支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等,可获取实时报价和深度行情(买卖盘口)。使用itick.org API。 |
股票实时行情查询
使用itick API查询股票实时行情。
⚠️ Token 与鉴权(必读)
API Token 通过环境变量 ITICK_API_TOKEN 自动注入(由 ClawHub 管理),不需要用户在对话中手动提供或粘贴 Token。
使用方法
1. 股票信息
curl -X GET "https://api.itick.org/stock/info?type=stock®ion=<region>&code=<code>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": "ok",
"data": {
"c": "AAPL",
"n": "Apple Inc.",
"t": "stock",
"e": "NASDAQ",
"s": "Electronic Technology",
"i": "Telecommunications Equipment",
"r": "USD",
"bd": "Apple, Inc. engages in the design, manufacture, and sale of smartphones, personal computers, tablets, wearables and accessories, and other varieties of related services. It operates through the following geographical segments: Americas, Europe, Greater China, Japan, and Rest of Asia Pacific. The Americas segment includes North and South America. The Europe segment consists of European countries, as well as India, the Middle East, and Africa. The Greater China segment comprises China, Hong Kong, and Taiwan. The Rest of Asia Pacific segment includes Australia and Asian countries. Its products and services include iPhone, Mac, iPad, AirPods, Apple TV, Apple Watch, Beats products, AppleCare, iCloud, digital content stores, streaming, and licensing services. The company was founded by Steven Paul Jobs, Ronald Gerald Wayne, and Stephen G. Wozniak in April 1976 and is headquartered in Cupertino, CA.",
"wu": "http://www.apple.com",
"mcb": 3436885784335,
"tso": 14840389413,
"pet": 35.3865799154784,
"fcc": "USD"
}
}
2. 股票IPO
curl -X GET "https://api.itick.org/stock/ipo?type=<type>®ion=<region>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": "ok",
"data": {
"content": [
{
"dt": 1755820800000,
"cn": "Picard Medical Inc",
"sc": "PMI",
"ex": "NYSE",
"mc": "19.1M",
"pr": "3.50-4.50",
"ct": "US",
"bs": 1648403200,
3. 股票除权因子
curl -X GET "https://api.itick.org/stock/split?region=<region>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": "ok",
"data": {
"content": [
{
"d": 1768521600000,
"r": "HK",
"n": "Polyfair Holdings",
"c": "8532",
"v": "1:10"
},
{
"d": 1768262400000,
"r": "HK",
"n": "China Supply Chain Holdings",
4. 实时成交
curl -X GET "https://api.itick.org/stock/tick?region=<region>&code=<code>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": null,
"data": {
"s": "700",
"ld": 567,
"t": 1754554087000,
"v": 1134500,
"te": 0
}
}
5. 实时报价
curl -X GET "https://api.itick.org/stock/quote?region=<region>&code=<code>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": null,
"data": {
"s": "700",
"ld": 616,
"o": 608,
"p": 608,
"h": 616,
"l": 601.5,
"t": 1765526889000,
"v": 17825495,
"tu": 10871536434.36,
6. 实时盘口
curl -X GET "https://api.itick.org/stock/depth?region=<region>&code=<code>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": null,
"data": {
"s": "700",
"a": [
{
"po": 1,
"p": 567,
"v": 13400,
"o": 3
},
{
"po": 2,
"p": 567.5,
"v": 170200,
7. K线查询
curl -X GET "https://api.itick.org/stock/kline?region=<region>&code=<code>&kType=<ktype>&limit=<limit>&et=<et>" \
-H "accept: application/json" \
-H "token: $ITICK_API_TOKEN"
响应参数示例:
{
"code": 0,
"msg": null,
"data": [
{
"tu": 56119888070.5,
"c": 534.5,
"t": 1741239000000,
"v": 104799385,
"h": 536,
"l": 534.5,
"o": 535
}
]
}
查询参数说明
| 参数 | 说明 |
|---|
| region | 市场代码,支持HK(港股)、SH(上证)、SZ(深证)、US(美股)、SG(新加坡)、JP(日本)、TW(中国台湾)、IN(印度)、TH(泰国)、DE(德国、MX(墨西哥)、MY(马来西亚)、TR(土耳其)、ES(西班牙)、NL(荷兰)、GB(英国)等 |
| type | 类型(upcoming 即将上市、recent 近期上市的股票) |
| code | 产品代码 |
| ktype | 周期 1分钟、2五分钟、3十五分钟、4三十分钟、5一小时、8一天、9一周、10一月 |
| et | 查询截止时间戳 如(1751328000000)为空时默认为当前时间戳 |
| limit | 查询条数 |
示例
curl -X GET "https://api.itick.org/stock/quote?region=HK&code=7226" \
-H "accept: application/json" \
-H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"
curl -X GET "https://api.itick.org/stock/quote?region=SH&code=600519" \
-H "accept: application/json" \
-H "token: d267a8c7d18a4ba4b19c81225a2ffd3eae0e9ca3bd1a4bd9b969dfee99ee7acd"