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

交易所套利指令的平仓支持 #175

Open
zzeric opened this issue Mar 8, 2022 · 8 comments
Open

交易所套利指令的平仓支持 #175

zzeric opened this issue Mar 8, 2022 · 8 comments

Comments

@zzeric
Copy link

zzeric commented Mar 8, 2022

开仓是能支持的,但是开仓后,交易所是分拆成一对持仓,平仓时CTPBEE是按套利代码查持仓的,所以会发现仓位不足,平仓失败。所以对IPS / SP这类代码的平仓,可以不检测。

@zzeric
Copy link
Author

zzeric commented Mar 8, 2022

或者检查合约对的持仓量

@somewheve
Copy link
Member

套利持仓我还没做过检测 你可以提个pr麻

@zzeric
Copy link
Author

zzeric commented Mar 9, 2022

我试试哈

@somewheve
Copy link
Member

注意别影响以前的代码哈 向前兼容

@hxhrtrading
Copy link

请问有交流群么?

@somewheve
Copy link
Member

有个实盘群 一般来说是解答实盘中产生的问题的 不涉及交流

@somewheve somewheve reopened this Jan 20, 2024
@somewheve
Copy link
Member

#259 此处开始增加对套利指令的支持

下一步下单和仓位需要进一步测试

@somewheve
Copy link
Member

功能上我了解了 感觉写起来有点麻瓜 我在想要不要增加一个套利操作的函数 带上额外的仓位检查

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

3 participants