api->balances(['xxxx']) triggers an error
Opened this issue · 0 comments
jakubBab commented
Title
- Bug: Balances of single ticker triggers errors on test net
Short Description:
- When calling
$this->api->balances(['xxxx'])
, the system throws an errorUndefined array key "BTCUSDT"
.
Platform:
- Linux + Docker
PHP Version:
- 8.3.8
Long Description:
- When calling
$this->api->balances(['xxxx'])
, the system throws an errorUndefined array key "BTCUSDT"
. It does not matter what ticker is being used; the same error prevails. The filephp-binance-api.php
at line [1554] throws an error. Commenting out this line solves the error, but as a result, a single item for ticker/symbol is not returned, only a list is .
Code:
require 'vendor/autoload.php';
$api = new Binance\API("<api key>", "<secret>", true);
$ticker = $api->balances(['USDT']);
Result:
Warning: Undefined array key "BTCUSDT"