Skip to content

ETF相关的接口能否支持? #44

Description

@yangjim

get_etf_info/get_etf_stock_list/get_etf_list

get_etf_info - 获取ETF信息
get_etf_info(etf_code)
使用场景
该函数仅支持PTrade客户端可用、仅在股票交易模块可用,对接jz_ufx、ATP、云订柜台不支持该函数

接口说明
该接口用于获取单支或者多支ETF的信息。

注意事项:

参数
etf_code : 单支ETF代码或者一个ETF代码的list,必传参数(list[str]/str)

返回
正常返回一个dict类型字段,包含每只ETF信息,key为ETF代码,values为包含etf信息的dict。异常返回空dict,如{}(dict[str:dict[...]])

返回结果字段介绍:

etf_redemption_code -- 申赎代码(str:str);
publish -- 是否需要发布IOPV(str:int);
report_unit -- 最小申购、赎回单位(str:int);
cash_balance -- 现金差额(str:float);
max_cash_ratio -- 现金替代比例上限(str:float);
pre_cash_component -- T-1日申购基准单位现金余额(str:float);
nav_percu -- T-1日申购基准单位净值(str:float);
nav_pre -- T-1日基金单位净值(str:float);
allot_max -- 申购上限(str:float);
redeem_max -- 赎回上限(str:float);
字段备注:

publish -- 是否需要发布IOPV,1是需要发布,0是不需要发布;

get_etf_stock_list - 获取ETF成分券列表
get_etf_stock_list(etf_code)
使用场景
该函数仅支持PTrade客户端可用、仅在股票交易模块可用,对接jz_ufx、ATP、云订柜台不支持该函数

接口说明
该接口用于获取目标ETF的成分券列表

注意事项:

参数
etf_code : 单支ETF代码,必传参数(str)

返回
正常返回一个list类型字段,包含每只etf代码所对应的成分股。异常返回空list,如

get_etf_stock_info - 获取ETF成分券信息
get_etf_stock_info(etf_code,security)
使用场景
该函数仅支持PTrade客户端可用、仅在股票交易模块可用,对接jz_ufx、ATP、云订柜台不支持该函数

接口说明
该接口用于获取ETF成分券信息。

注意事项:

参数
etf_code : 单支ETF代码,必传参数(str)

security : 单只股票代码或者一个由多只股票代码组成的列表,必传参数(list[str]/str)

返回
正常返回一个dict类型字段,包含每只etf代码中成分股的信息。异常返回空dict,如{}(dict[str:dict[...]])

返回结果字段介绍:

code_num -- 成分券数量(str:float);
cash_replace_flag -- 现金替代标志(str:str);
replace_ratio -- 保证金率(溢价比率),允许现金替代标的此字段有效(str:float);
replace_balance -- 替代金额,必须现金替代标的此字段有效(str:float);
is_open -- 停牌标志,0-停牌,1-非停牌(str:int);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions