优先级数据源方式延迟覆盖品种P0腾讯实时行情realtime.py<3秒A股全板块P0新浪期货free_market.py~5秒黄金/白银/铜/原油/螺纹钢/铁矿石/焦煤/焦炭/豆粕P0QDII ETFfree_market.py<3秒纳指/标普(美股情绪代理)P0港股指数free_market.py<3秒恒生指数/恒生科技P1东方财富/新浪财经extract_content_from_websites实时资讯/资金流P1batch_web_search(外盘/新闻)搜索分钟级政策/宏观P2huangjinjiage.cn(黄金)extract_content_from_websites日更仅黄金
python
from skills.tianji_data.realtime import get_batch, get_realtime
r = get_batch(['000001', '000791', '600938', '601857'])
d = get_realtime('000791') # 自动判断深/沪交所
# 返回字段:name, price, change_pct, open, high, low, turnover_yi, time
python
from skills.tianji_data.free_market import (
get_full_market_snapshot, # 一站式全市场数据
format_snapshot, # 格式化输出
)
snap = get_full_market_snapshot()
print(format_snapshot(snap))
# 输出:国际商品(黄金/白银/铜/原油) + 国内商品(螺纹钢/铁矿/焦煤/焦炭/豆粕)
# + 港股指数(恒生/恒科) + QDII ETF(纳指/标普/恒科) + 人民币估算
python
from skills.tianji_data.free_market import (
get_commodities, # 国际黄金/白银/铜/原油
get_cn_futures, # 国内螺纹钢/铁矿石/焦煤/焦炭/豆粕
get_hk_indices, # 港股恒生/恒科指数
get_us_etf_cn, # QDII ETF(纳指/标普)
get_cny_estimate, # 人民币方向估算
)
⚠️ 搜索无法替代实时行情。盘中价格以腾讯+新浪接口为准。 ⚠️ Yahoo Finance / A50 / 美元指数已验证不可用(IP被屏蔽/数据为空)
所有采集数据必须转换为以下格式存入 /workspace/data/tianji-system/data/YYYY-MM-DD.json:
json
{
"timestamp": "2026-03-26T06:00:00+08:00",
"market": {
"sh_index": 3931.84,
"sz_index": 13801.0,
"cy_index": 3316.97,
"change_pct": 1.30,
"volume": 218000000000,
"limit_up": 105,
"limit_down": 5
},
"sectors": {
"top3": ["电力", "CPO", "军工"],
"bottom3": ["黄金", "煤炭", "石油"]
},
" commodities": {
"gold_usd": 4560.68,
"oil_wti": 95.0,
"oil_brent": 101.0
},
"fund_flow": {
"north_flow": "+45亿",
"main_sectors": {"电力": 70.75, "CPO": 63.62},
"main_out": {"石油": -17.8, "煤炭": -8.1}
},
"macro": {
"us_cepi_index": 103.2,
"rmb_usd": 6.89,
"news_keywords": ["停火", "MLF", "降息"]
}
}
text
extract_content_from_websites:
- 东方财富沪指: https://quote.eastmoney.com/zs000001.html
- 东方财富深成: https://quote.eastmoney.com/sz399001.html
- 创业板: https://quote.eastmoney.com/sz399006.html
text
extract_content_from_websites:
- http://www.huangjinjiage.cn/
- batch_web_search: "黄金价格 原油价格 今日"
text
batch_web_search:
- "中国 重大政策 今日 2026年"
- "国务院 部委 新规 今日"
- "证监会 央行 工信部 最新消息"
text
batch_web_search:
- "Federal Reserve policy announcement today 2026"
- "US China trade policy latest 2026"
- "EU regulation tech AI policy today"
- "G7 summit outcome 2026"
- "global central bank rate decision"
重点关注: 美联储政策、美中贸易摩擦、欧盟AI/科技监管、G7/IMF会议、全球央行利率决议。
text
batch_web_search:
- "A股 板块资金流向 今日 东方财富"
null,不填0错误类型处理方式页面JS动态加载无法提取改用 batch_web_search页面404/无内容跳过该数据源,标记来源失败数据明显异常(涨跌>20%)标记异常,不用于预判
/workspace/data/tianji-system/data//workspace/data/tianji-system/data/collect.logreferences/data-sources.md