From f8cb13cce071bb410a94e7fbeda26a0716bd5eef Mon Sep 17 00:00:00 2001 From: mohammad motallebi <6781112+mtb-pro@users.noreply.github.com> Date: Sat, 20 Jun 2020 18:15:54 +0430 Subject: [PATCH] Supports network option in withdraw function --- php-binance-api.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-binance-api.php b/php-binance-api.php index 96fa8621..b5bcb124 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -568,7 +568,7 @@ public function assetDetail() * @return array with error message or array transaction * @throws \Exception */ - public function withdraw(string $asset, string $address, $amount, $addressTag = null, $addressName = "API Withdraw", bool $transactionFeeFlag = false) + public function withdraw(string $asset, string $address, $amount, $addressTag = null, $addressName = "API Withdraw", bool $transactionFeeFlag = false,$network = null) { $options = [ "asset" => $asset, @@ -583,6 +583,9 @@ public function withdraw(string $asset, string $address, $amount, $addressTag = if (is_null($addressTag) === false && empty($addressTag) === false) { $options['addressTag'] = $addressTag; } + if (is_null($network) === false && empty($network) === false) { + $options['network'] = $network; + } return $this->httpRequest("v3/withdraw.html", "POST", $options, true); }