Skip to content

Commit fe4c48c

Browse files
authored
Supports network option in withdraw function by mtb-pro
2 parents 8a2e6c8 + f8cb13c commit fe4c48c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

php-binance-api.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public function assetDetail()
568568
* @return array with error message or array transaction
569569
* @throws \Exception
570570
*/
571-
public function withdraw(string $asset, string $address, $amount, $addressTag = null, $addressName = "API Withdraw", bool $transactionFeeFlag = false)
571+
public function withdraw(string $asset, string $address, $amount, $addressTag = null, $addressName = "API Withdraw", bool $transactionFeeFlag = false,$network = null)
572572
{
573573
$options = [
574574
"asset" => $asset,
@@ -583,6 +583,9 @@ public function withdraw(string $asset, string $address, $amount, $addressTag =
583583
if (is_null($addressTag) === false && empty($addressTag) === false) {
584584
$options['addressTag'] = $addressTag;
585585
}
586+
if (is_null($network) === false && empty($network) === false) {
587+
$options['network'] = $network;
588+
}
586589
return $this->httpRequest("v3/withdraw.html", "POST", $options, true);
587590
}
588591

0 commit comments

Comments
 (0)