Skip to content

Commit a0f690c

Browse files
authored
Merge pull request #411 from jaggedsoft/ePascalC-patch-2
Switch wapi tradeFee to sapi commissionFee
2 parents 4b7bb0e + 2919156 commit a0f690c

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

php-binance-api.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ public function userAssetDribbletLog()
680680
}
681681

682682
/**
683+
* @deprecated
684+
*
683685
* Fetch current(daily) trade fee of symbol, values in percentage.
684686
* for more info visit binance official api document
685687
*
@@ -693,9 +695,31 @@ public function tradeFee(string $symbol)
693695
"symbol" => $symbol,
694696
"wapi" => true,
695697
];
698+
trigger_error('Function tradeFee is deprecated and will be removed from Binance on Aug 1, 2021. Please use $api->commissionFee', E_USER_DEPRECATED);
696699

697700
return $this->httpRequest("v3/tradeFee.html", 'GET', $params, true);
698701
}
702+
703+
/**
704+
* commissionFee - Fetch commission trade fee
705+
*
706+
* @link https://binance-docs.github.io/apidocs/spot/en/#trade-fee-user_data
707+
*
708+
* @property int $weight 1
709+
*
710+
* @param string $symbol (optional) Should be a symbol, e.g. BNBUSDT or empty to get the full list
711+
*
712+
* @return array containing the response
713+
* @throws \Exception
714+
*/
715+
public function commissionFee($symbol = '')
716+
{
717+
$params = array('sapi' => true);
718+
if ($symbol != '' && gettype($symbol) == 'string')
719+
$params['symbol'] = $symbol;
720+
721+
return $this->httpRequest("v1/asset/tradeFee", 'GET', $params, true);
722+
}
699723

700724
/**
701725
* withdraw requests a asset be withdrawn from binance to another wallet

0 commit comments

Comments
 (0)