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

发现几个小的细节问题 #22

Open
ConRoseLi opened this issue Dec 21, 2021 · 3 comments
Open

发现几个小的细节问题 #22

ConRoseLi opened this issue Dec 21, 2021 · 3 comments

Comments

@ConRoseLi
Copy link

主要是下单的问题

RequestTraderMap.php

function buy()

> 115 $map['sz']=$data['_price'] ?? 0; => $map['sz']=$data['_number'] ?? 0;
> 118 switch ($this->platform){ => switch ($this->checkType($map['instId'])) {
> 129 if(!$data['_entry']) $map['side']='sell'; => if(!$data['_entry']) $map['posSide']='short';

@ConRoseLi
Copy link
Author


function sell(){
> 402 if(!$data['_entry']) $map['side']='buy'; => if(!$data['_entry']) $map['posSide']='long';
}

@zhouaini528
Copy link
Owner

谢谢你的发现,你可以这样做。你fock到你本地, 你可以直接本地修改, 修改好了推送提交给我合并,这样也方便你修改。

@zhouaini528
Copy link
Owner

$map['instId']

说一下我这边是这样规定的,和交易所刚刚相反。

buy 做多 _enter=true 开多
buy 做多 _enter=false 平多

sell 做空 _enter=true 开空
sell 做空 _enter=false 平空

如果exchange封装层不灵活,你可以直接初始化底层 new okexV5

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

2 participants