Skip to content

Commit

Permalink
add binance recvWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Jun 28, 2023
1 parent db35f56 commit a70f8f0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Exchanges/Binance.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ protected function host(string $host){
$this->host=$this->demo_host;
}
}

/***
*
*/
function redata(array $data){
if(array_key_exists('exchanges_exptime',$this->options)){
$data['recvWindow']=$this->options['exchanges_exptime'];
unset($this->options['exchanges_exptime']);
}

return $data;
}
}

class AccountBinance extends BaseBinance implements AccountInterface
Expand All @@ -120,6 +132,8 @@ class AccountBinance extends BaseBinance implements AccountInterface
*
* */
function get(array $data){
$data=$this->redata($data);

switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
Expand Down Expand Up @@ -153,6 +167,8 @@ class TraderBinance extends BaseBinance implements TraderInterface
*
* */
function sell(array $data){
$data=$this->redata($data);

switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
Expand All @@ -173,6 +189,8 @@ function sell(array $data){
*
* */
function buy(array $data){
$data=$this->redata($data);

switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
Expand All @@ -193,6 +211,8 @@ function buy(array $data){
*
* */
function cancel(array $data){
$data=$this->redata($data);

switch ($this->checkType()){
case 'future':{
$this->platform_future=$this->getPlatform('future');
Expand Down

0 comments on commit a70f8f0

Please sign in to comment.