Skip to content

Commit

Permalink
add binance future
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Oct 30, 2024
1 parent 5af05d5 commit c7a0bd3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/binance.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,15 @@
break;
}
case 151:{
$exchanges=new Exchanges('binance',$key,$secret,'https://testnet.binance.vision');
//The original parameters
$_client_id=md5(rand(1,999999999));//custom ID
$result=$exchanges->trader()->buy([
'newClientOrderId'=>$_client_id,
'symbol'=>'BTCUSDT',
'type'=>'LIMIT',
'quantity'=>'0.01',
'price'=>'2000',
'price'=>'50000',
'timeInForce'=>'GTC',
]);
break;
Expand All @@ -152,14 +153,15 @@
break;
}
case 153:{
$exchanges=new Exchanges('binance',$key,$secret,'https://testnet.binance.vision');
//The original parameters
$_client_id=md5(rand(1,999999999));//custom ID
$result=$exchanges->trader()->sell([
'newClientOrderId'=>$_client_id,
'symbol'=>'BTCUSDT',
'type'=>'LIMIT',
'quantity'=>'0.01',
'price'=>'9000',
'price'=>'90000',
'timeInForce'=>'GTC',
]);
break;
Expand Down

0 comments on commit c7a0bd3

Please sign in to comment.