binance-connector-php icon indicating copy to clipboard operation
binance-connector-php copied to clipboard

Can the error output of API response 400 be ignored?

Open wartw opened this issue 11 months ago • 2 comments

Can the error output of API response 400 be ignored? This affects other CODE operations

wartw avatar Feb 29 '24 08:02 wartw

Change file: vendor\binance\binance-connector-php\src\Binance\APIClient.php

private function buildClient($httpRequest) { $this->httpRequest = $httpRequest ?? new \GuzzleHttp\Client([ 'base_uri' => $this->baseURL, 'headers' => [ 'Content-Type' => 'application/json', 'X-MBX-APIKEY' => $this->key, 'User-Agent' => 'binance-connect-php' ], 'timeout' => $this->timeout ]); }

change to private function buildClient($httpRequest) { $this->httpRequest = $httpRequest ?? new \GuzzleHttp\Client([ 'base_uri' => $this->baseURL, 'headers' => [ 'Content-Type' => 'application/json', 'X-MBX-APIKEY' => $this->key, 'User-Agent' => 'binance-connect-php' ], 'timeout' => $this->timeout, 'http_errors' => false ]); }

victorantoniak avatar Mar 27 '24 13:03 victorantoniak

can't we add this as a parameter so it's easier to use.

mbunal avatar Sep 08 '24 07:09 mbunal