Skip to content

Commit

Permalink
Add trade fee function
Browse files Browse the repository at this point in the history
the function requests the updated trade fee of peer/symbol offered by binance in percentage
  • Loading branch information
alipjxhub authored Jul 6, 2020
1 parent fe4c48c commit e77b17d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,25 @@ public function assetDetail()
$params["wapi"] = true;
return $this->httpRequest("v3/assetDetail.html", 'GET', $params, true);
}


/**
* Fetch current(daily) trade fee of symbol, values in percentage.
* for more info visit binance official api document
*
* $symbol = "BNBBTC"; or any other symbol or even a set of symbols in an array
* @param string $symbol
* @return mixed
*/
public function tradeFee(string $symbol)
{
$params = [
"symbol" => $symbol,
"wapi" => true,
];

return $this->httpRequest("v3/tradeFee.html", 'GET', $params, true);
}

/**
* withdraw requests a asset be withdrawn from binance to another wallet
Expand Down

0 comments on commit e77b17d

Please sign in to comment.