Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

期货相关问题汇总及 TodoList #281

Open
6 of 11 tasks
zxj5470 opened this issue Mar 11, 2022 · 1 comment
Open
6 of 11 tasks

期货相关问题汇总及 TodoList #281

zxj5470 opened this issue Mar 11, 2022 · 1 comment

Comments

@zxj5470
Copy link
Contributor

zxj5470 commented Mar 11, 2022

  • 1. 删除期货时显示删除成功但实际没有删除
  • 2. 成交额提示 无数据(另外需要说明期货成交额实际是杠杆后的原始数值,真实成交额是去杠杆的)
  • 3. 期货昨收、昨结显示切换(涉及到字段修改问题)
  • 4. 期货代码不统一,有的地方使用 cnf_V 有的地方使用 V。
  • 5. 股指期货 IF IC IH 显示不支持。
  • 6. 韭菜之家面板支持
  • 7. 合并计入显示盈亏【低优先级,暂不考虑】
  • 8. 外盘期货支持 希望加入部分不支持的期货,如富时A50期指等 #308
  • 9. 期货主力合约替换
  • 10. 外汇支持(外汇代码 fx_)
  • 11. 问题 3 新浪的数据“昨收”,如果期货是夜盘则是夜盘收盘价,有点坑。
@zxj5470
Copy link
Contributor Author

zxj5470 commented May 4, 2022

Q & A

1. 删除期货时显示删除成功但实际没有删除

4. 期货代码不统一,有的地方使用 cnf_V 有的地方使用 V。

答:期货代码前缀导致的问题。最新版本为了兼容旧版本(2.1-2.5版本)的期货代码配置(V2205, cnf_V2205),允许显示,但是会无法删除。请按照新版本格式nf_V2210 (PVC2210合约)进行添加删除。
至于为什么要该用 nf_ 开头?因为当时写代码的时候不知道新浪本身的接口就是 nf_ ,当时发现直接大写字母就可以获取到行情,自己搞了个 cnf_ 的前缀。

其中,添加股票的搜索框中输入大写字母开头以表示期货。

演示:输入 PVC 或 V

image

国内期货代码

# 用数字 0 表示连续合约。其他合约按照 2301 格式表示 23 年 1 月合约
# 股值期货
nf_IF0 沪深300股指期货连续
nf_IC0 中证500股指期货连续
nf_IH0 上证50股指期货连续

# 国内商品期货,搜索时候使用大写进行搜索。(旧配置文件中使用 `cnf_` 前缀 或直接大写也可请求到部分合约,但是无法删除。)
nf_V0 PVC
nf_P0 棕榈油
nf_SA0 纯碱
nf_MA0 甲醇

目前最新版本(当前版本 2.5.0 暂未发布)已支持外盘期货。

可添加列表。搜索时候使用 hf_ 后面的大写进行搜索

hf_W 美国小麦
hf_SM 美黄豆粉 【美豆粕】
hf_CL WTI原油
hf_OIL 布伦特原油
hf_CHA50CFD 富时A50
.....

参考配置(包含兼容旧配置文件的 ZC SC cnf_MA2209,不推荐使用,请尽量修改为 nf_ 格式)

"leek-fund.stocks": [
        "sh000001",
        "sh000300",
        "sh000016",
        "sh000688",
        "hk03690",
        "hk00700",
        "usr_ixic",
        "usr_dji",
        "usr_inx",
        "ZC0",
        "SC0",
        "cnf_MA2209",
        "nf_SA0",
        "nf_IC0",
        "nf_IF0",
        "nf_IH0",
        "nf_TF0",
        "nf_I0",
        "hf_OIL",
        "hf_CHA50CFD",
        "nf_M0",
        "hf_CL",
        "hf_SM",
        "hf_W",
        "hf_GAS2207",
        "nf_TA2208",
        "hf_VX2211"
    ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant