skills/tushare-data-1.0.5/references/数据接口/股票数据/行情数据/实时成交(爬虫).md
wangyitong a65adcc2e5 Initial commit: merged, deduplicated, and vetted skill collection
Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:

- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
  ../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
  zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
  - docx family: kept docx (official, full toolchain) + docx-cn
    (GB/T 9704 Chinese official-document constants),
    dropped docx_writer (no scripts, name collided with docx)
  - humanizer family: kept humanizer-zh (6 zh reference docs),
    dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
  ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
  claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
  live credentials

Result: 25 skills, 572 files, ~7.5 MB.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 14:47:12 +08:00

75 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 实时成交数据(爬虫版)
----
接口realtime_tick由于采集和拼接当日以来的成交全历史因此接口提取数据时需要一定时间请耐心等待。请将tushare升级到1.3.3版本以上。
描述本接口是tushare org版实时接口的顺延数据来自网络且不进入tushare服务器属于爬虫接口数据包括该股票当日开盘以来的所有分笔成交数据。
权限0积分完全开放但需要有tushare账号如果没有账号请先<a href="https://tushare.pro/register">注册</a>
说明由于该接口是纯爬虫程序跟tushare服务器无关因此tushare不对数据内容和质量负责。数据主要用于研究和学习使用如做商业目的请自行解决合规问题。
<br>
<br>
**输入参数**
名称 | 类型 | 必选 | 描述
---- | ----- | ---- | ----
ts_code | str | N | 股票代码需按tushare<a href="https://tushare.pro/document/2?doc_id=14">股票代码标准</a>输入比如000001.SZ表示平安银行600000.SH表示浦发银行单次只能输入一个股票
src | str | N | 数据源 sina-新浪 dc-东方财富默认sina
<br>
<br>
**输出参数**
名称 | 类型 | 描述
--- | ---- | ----
time | str | 交易时间
price | float | 现价
change | float | 价格变动
volume | int | 成交量(单位:手)
amount | int | 成交金额(元)
type | str | 类型:买入/卖出/中性
<br>
<br>
**接口用法**
```python
import tushare as ts
#设置你的token登录tushare在个人用户中心里拷贝
ts.set_token('你的token')
#sina数据
df = ts.realtime_tick(ts_code='600000.SH')
#东财数据
df = ts.realtime_tick(ts_code='600000.SH', src='dc')
```
<br>
<br>
**数据样例**
TIME PRICE CHANGE VOLUME AMOUNT TYPE
0 09:25:01 6.57 -0.01 429 281853 卖盘
1 09:30:01 6.56 -0.01 42 27552 卖盘
2 09:30:04 6.58 0.02 57 37597 买盘
3 09:30:07 6.57 -0.01 61 40077 卖盘
4 09:30:10 6.58 0.01 867 569936 买盘
... ... ... ... ... ... ...
3749 14:56:40 6.58 -0.02 112 73696 卖盘
3750 14:56:46 6.60 0.02 64 42240 买盘
3751 14:56:49 6.60 0.00 11 7260 买盘
3752 14:56:52 6.60 0.00 18 11880 买盘
3753 15:00:01 6.58 -0.02 2107 1386406 买盘