资金流向
# 获取股票资金流向数据
获取一只或者多只股票在一个时间段内的资金流向数据
调用方法
# 逐笔成交统计日级
xtdata.get_market_data_ex([],stock_list,period="transactioncount1d",start_time = "", end_time = "")
# 逐步成交统计1分钟级
xtdata.get_market_data_ex([],stock_list,period="transactioncount1m",start_time = "", end_time = "")
1
2
3
4
2
3
4
参数
field_list
- list 数据字段列表,传空则为全部字段stock_list
- list 合约代码列表period
- string 周期start_time
- string 起始时间end_time
- string 结束时间count
- int 数据个数 ,count大于等于0时,若指定了start_time,end_time,此时以end_time为基准向前取count条;若start_time,end_time缺省,默认取本地数据最新的count条数据;若start_time,end_time,count都缺省时,默认取本地全部数据dividend_type
- string 除权方式fill_data
- bool 是否向后填充空缺数据
字段名 | 数据类型 | 含义 |
---|---|---|
time | int | 时间戳 |
bidNumber | int | 主买单总单数 |
bidMostVolume | int | 主买特大单成交量 |
bidBigVolume | int | 主买大单成交量 |
bidMediumVolume | int | 主买中单成交量 |
bidSmallVolume | int | 主买小单成交量 |
offNumber | int | 主卖单总单数 |
offMostVolume | int | 主卖特大单成交量 |
offBigVolume | int | 主卖大单成交量 |
offMediumVolume | int | 主卖中单成交量 |
offSmallVolume | int | 主卖小单成交量 |
bidMostAmount | float | 主买特大单成交额 |
bidBigAmount | float | 主买大单成交额 |
bidMediumAmount | float | 主买中单成交额 |
bidSmallAmount | float | 主买小单成交额 |
offMostAmount | float | 主卖特大单成交额 |
offBigAmount | float | 主卖大单成交额 |
offMediumAmount | float | 主卖中单成交额 |
offSmallAmount | float | 主卖小单成交额 |
ddx | float | 大单动向 |
ddy | float | 涨跌动因 |
ddz | float | 大单差分 |
zjbyNetInflow | int | 资金博弈 净流入 |
zjbyMost | int | 资金博弈 超大单 |
zjbyBig | int | 资金博弈 大单 |
zjbyMedium | int | 资金博弈 中单 |
zjbySmall | int | 资金博弈 小单 |
netOrder | int | 净挂 |
netWithdraw | int | 净撤 |
withdrawBid | int | 总撤买 |
withdrawOff | int | 总撤卖 |
unactiveBidMostVolume | int | 被动买特大单成交量 |
unactiveBidBigVolume | int | 被动买大单成交量 |
unactiveBidMediumVolume | int | 被动买中单成交量 |
unactiveBidSmallVolume | int | 被动买小单成交量 |
unactiveOffMostVolume | int | 被动卖特大单成交量 |
unactiveOffBigVolume | int | 被动卖大单成交量 |
unactiveOffMediumVolume | int | 被动卖中单成交量 |
unactiveOffSmallVolume | int | 被动卖小单成交量 |
unactiveBidMostAmount | float | 被动买特大单成交额 |
unactiveBidBigAmount | float | 被动买大单成交额 |
unactiveBidMediumAmount | float | 被动买中单成交额 |
unactiveBidSmallAmount | float | 被动买小单成交额 |
unactiveOffMostAmount | float | 被动卖特大单成交额 |
unactiveOffBigAmount | float | 被动卖大单成交额 |
unactiveOffMediumAmount | float | 被动卖中单成交额 |
unactiveOffSmallAmount | float | 被动卖小单成交额 |
返回
返回一个 {stock_code:pd.DataFrame} 结构的dict
对象,默认的列索引为取得的全部字段. 如果给定了 fields
参数, 则列索引与给定的 fields
对应.
示例
# 获取一只股票在一个时间段内的资金流量数据
xtdata.get_market_data_ex([],["000001.SZ"],period="transactioncount1d",start_time = "20230101", end_time = "20231009")
# 获取多只股票在一个时间段内的资金流向数据
xtdata.get_market_data_ex([],["000001.SZ","000582.SZ"],period="transactioncount1d",start_time = "20230101", end_time = "20231009")
# 获取多只股票在某一天的资金流向数据
xtdata.get_market_data_ex([],["000001.SZ","000582.SZ"],period="transactioncount1d",start_time = "20231009", end_time = "20231009")
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
上次更新: 2023/10/12, 10:45:51