Skip to content

Commit

Permalink
add binance recWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Jul 25, 2023
1 parent 0a147dc commit 0c58804
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/Api/Trader.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function sell(array $data,bool $show=true){
}

/**
* 删除订单 即撤单
* 删除订单 即撤单
* 请求参数
* @param $data
* '_order_id' 与 _client_id 必须有一个存在
Expand All @@ -172,7 +172,9 @@ function sell(array $data,bool $show=true){
* */
function cancel(array $data,bool $show=true){
try {
$map=$this->map->requestTrader()->cancel($data);
$requestTrader=$this->map->requestTrader();

$map=$requestTrader->cancel($data);
//print_r($map);
$result=$this->exchange->trader()->cancel($map);
//print_r($result);
Expand Down Expand Up @@ -229,10 +231,12 @@ function update(array $data){
* */
function show(array $data){
try {
$map=$this->map->requestTrader()->show($data);
$requestTrader=$this->map->requestTrader();
$map=$requestTrader->show($data);
//print_r($map);
$result=$this->exchange->trader()->show($map);
//print_r($result);
$ex_trader=$this->exchange->trader();
$result=$ex_trader->show($map);

$trader=$this->map->responseTrader()->show(['result'=>$result,'request'=>$data]);
//print_r($trader);
if(isset($trader['_status'])) {
Expand All @@ -251,4 +255,4 @@ function show(array $data){
function showAll(array $data){

}
}
}
4 changes: 3 additions & 1 deletion src/Exchanges/Binance.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ function update(array $data){
*
* */
function show(array $data){
$data=$this->redata($data);

switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
Expand Down Expand Up @@ -333,4 +335,4 @@ function setOptions(array $options=[]){
$this->options=$options;
return $this;
}
}
}

0 comments on commit 0c58804

Please sign in to comment.