Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakubBab opened this issue Jun 21, 2024 · 0 comments
Open

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

jakubBab opened this issue Jun 21, 2024 · 0 comments

Comments

@jakubBab
Copy link

jakubBab commented Jun 21, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant