Skip to content

api->balances(['xxxx']) triggers an error #504

Open
@jakubBab

Description

@jakubBab

Title

  • Bug: Balances of single ticker triggers errors on test net

Short Description:

  • When calling $this->api->balances(['xxxx']), the system throws an error Undefined array key "BTCUSDT".

Platform:

  • Linux + Docker

PHP Version:

  • 8.3.8

Long Description:

  • When calling $this->api->balances(['xxxx']), the system throws an error Undefined array key "BTCUSDT". It does not matter what ticker is being used; the same error prevails. The file php-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"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions