crypto.com fetch_balance() produces ExchangeError
See original GitHub issue- OS: Linux
- Programming Language version: PHP 7.3
- CCXT version: 1.66.39
Reproduction code:
try {
$id = "\\ccxt\\cryptocom";
$exchange = new $id();
$exchange->apiKey = "XXXX"; // let me know if you need temporary API key, I can make it for testing
$exchange->secret = "YYYY";
$exchange->enableRateLimit = true;
$balance = $exchange->fetchBalance();
} catch (\ccxt\ExchangeError $e) {
echo '[Exchange Error] ' . $e->getMessage();
print_r($e);
}
Error:
[Exchange Error] cryptocom
ccxt\BadRequest Object
(
[message:protected] => cryptocom
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /path/to/composer/vendor/ccxt/ccxt/php/cryptocom.php
[line:protected] => 1801
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /path/to/composer/vendor/ccxt/ccxt/php/Exchange.php
[line] => 1766
[function] => handle_errors
[class] => ccxt\cryptocom
[type] => ->
)
[1] => Array
(
[file] => /path/to/composer/vendor/ccxt/ccxt/php/Exchange.php
[line] => 1522
[function] => fetch
[class] => ccxt\Exchange
[type] => ->
)
[2] => Array
(
[file] => /path/to/composer/vendor/ccxt/ccxt/php/Exchange.php
[line] => 1526
[function] => fetch2
[class] => ccxt\Exchange
[type] => ->
)
[3] => Array
(
[function] => request
[class] => ccxt\Exchange
[type] => ->
)
[4] => Array
(
[file] => /path/to/composer/vendor/ccxt/ccxt/php/Exchange.php
[line] => 2657
[function] => call_user_func_array
)
[5] => Array
(
[file] => /path/to/composer/vendor/ccxt/ccxt/php/cryptocom.php
[line] => 765
[function] => __call
[class] => ccxt\Exchange
[type] => ->
)
[6] => Array
(
[file] => /path/to/my/script.php
[line] => 118
[function] => fetch_balance
[class] => ccxt\cryptocom
[type] => ->
)
)
[previous:Exception:private] =>
)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Exchanges — ccxt 2.4.71 documentation
The ccxt library is a collection of available crypto exchanges or exchange ... with the fetchBalance() method as described in the Account Balance...
Read more >Miscellaneous - Crypto.com Help Center
When you dispose of crypto that you do not hold in your imported accounts in Crypto.com Tax, this error message will pop up....
Read more >CCXT - 简书
The ccxt library is a collection of available crypto exchanges or exchange classes. Each class implements the public and private API for.
Read more >ccxt-dev/ccxt - Gitter
timeframe = '1m' limit = 100 # max client = ccxt.bitmex() since ... im getting this error when i am trying to fetch...
Read more >python - fetch_balance method in ccxt won't return all assets
It seems like fetchBalance only returns one currency at a time. ... exchange.load_markets() currency = exchange.currency('USDT') balance ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see, my manual script patching approach caused the above error. Updating CCXT to 1.66.70 fixed the issue and crypto.com is working well now. Thank you!
@c0dehunter you should also update the base files as well, make sure that your runtime CCXT version number in your script is 1.66.70+. (We’ve tested on our side and it should work for you as well).