Skip to content

Commit e77b17d

Browse files
authored
Add trade fee function
the function requests the updated trade fee of peer/symbol offered by binance in percentage
1 parent fe4c48c commit e77b17d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

php-binance-api.php

+19
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,25 @@ public function assetDetail()
547547
$params["wapi"] = true;
548548
return $this->httpRequest("v3/assetDetail.html", 'GET', $params, true);
549549
}
550+
551+
552+
/**
553+
* Fetch current(daily) trade fee of symbol, values in percentage.
554+
* for more info visit binance official api document
555+
*
556+
* $symbol = "BNBBTC"; or any other symbol or even a set of symbols in an array
557+
* @param string $symbol
558+
* @return mixed
559+
*/
560+
public function tradeFee(string $symbol)
561+
{
562+
$params = [
563+
"symbol" => $symbol,
564+
"wapi" => true,
565+
];
566+
567+
return $this->httpRequest("v3/tradeFee.html", 'GET', $params, true);
568+
}
550569

551570
/**
552571
* withdraw requests a asset be withdrawn from binance to another wallet

0 commit comments

Comments
 (0)