ccxt
ccxt copied to clipboard
\Exchange::network_id_to_code(): Argument #1 ($networkId) must be of type string, null given, called in /home/cssoftdemo/public_html/vendor/ccxt/ccxt/php/kucoin.php on line 3332
Operating System
windows
Programming Languages
PHP
CCXT Version
4.3.13
Description
getting this error while using the withdraw function
[2024-05-06 14:38:55] local.INFO: ccxt\Exchange::network_id_to_code(): Argument #1 ($networkId) must be of type string, null given, called in /home/cssoftdemo/public_html/vendor/ccxt/ccxt/php/kucoin.php on line 3332
[2024-05-06 14:40:16] local.ERROR: kucoin unknown error: 28 Resolving timed out after 10000 milliseconds {"userId":1,"exception":"[object] (ccxt\NetworkError(code: 0): kucoin unknown error: 28 Resolving timed out after 10000 milliseconds at /home/cssoftdemo/public_html/vendor/ccxt/ccxt/php/Exchange.php:1618)
[stacktrace]
Code
if (isset($transfer_process['id'])) {
$params = array();
if (isset($request->chain)) {
$params['network'] = $request->chain;
}
try {
$provider_withdraw = $this->api->withdraw($request->symbol, $request->amount, $request->recieving_address, $request->memo, $params);
} catch (\Throwable $th) {
return $this->handleWithdrawalError($user, $request, $wallet, $th->getMessage());
}
if (isset($provider_withdraw['id'])) {
try {
$withdraw_id = collect($this->api->fetch_withdrawals())->where('id', $provider_withdraw['id'])->first();
$withdraw->trx_id = $provider_withdraw['id'];
$withdraw->fee = ($request->amount * $fee) + $withdraw_id['fee']['cost'];
} catch (\Throwable $th) {
$withdraw->fee = $fee;
}
}
}
the withdraw goes through but we recieve this error sometimes nothing happens
@ShahwaizJerrax it seems php throws error when the parameter type is not correct. We'll fix this asap.