Skip to content

Commit

Permalink
huobi update opponent optimal_20
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Oct 28, 2019
1 parent 8e73b36 commit 5542b8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Map/RequestTraderMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function buy(array $data){
$map['price']=$data['_price'];
$map['order_price_type']='limit';
}else {
$map['order_price_type']='opponent';
$map['order_price_type']='optimal_20';
}
break;
}
Expand Down Expand Up @@ -228,7 +228,7 @@ function sell(array $data){
$map['price']=$data['_price'];
$map['order_price_type']='limit';
}else {
$map['order_price_type']='opponent';
$map['order_price_type']='optimal_20';
}
break;
}
Expand Down
14 changes: 7 additions & 7 deletions tests/huobi.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
'timeout'=>10,

//If you are developing locally and need an agent, you can set this
'proxy'=>true,
//'proxy'=>true,
//More flexible Settings
/* 'proxy'=>[
'http' => 'http://127.0.0.1:12333',
'https' => 'http://127.0.0.1:12333',
'no' => ['.cn']
], */
//Close the certificate
'verify'=>false,
//'verify'=>false,
]);

$action=intval($_GET['action'] ?? 0);//http pattern
Expand Down Expand Up @@ -316,7 +316,7 @@
//It's the same as that => case 402
//It's the opposite of that => case 403
$result=$exchanges->trader()->buy([
'_symbol'=>'BTC190927',
'_symbol'=>'ETC191227',
'_number'=>'1',
'_entry'=>true,//true:open false:close
]);
Expand All @@ -342,7 +342,7 @@
case 403:{
//It's the opposite of that => case 401
$result=$exchanges->trader()->sell([
'_symbol'=>'XRP190927',
'_symbol'=>'ETC191227',
'_number'=>'1',
'_entry'=>false,//true:open false:close
]);
Expand Down Expand Up @@ -453,15 +453,15 @@
//TODO
case 450:{
$result=$exchanges->trader()->buy([
'_symbol'=>'XRP190927',
'_symbol'=>'ETC191227',
'_number'=>'1',
'_price'=>'0.3',
'_price'=>'1',
'_entry'=>true,//true:open false:close
]);
print_r($result);

$result=$exchanges->trader()->cancel([
'_symbol'=>'XRP190927',
'_symbol'=>'ETC191227',
'_order_id'=>$result['_order_id'],
]);

Expand Down

0 comments on commit 5542b8b

Please sign in to comment.