binance / binance-connector-php

This is a thin library that working as a connector to the Binance public API.
71 stars 21 forks source link

Can the error output of API response 400 be ignored? #31

Open wartw opened 7 months ago

wartw commented 7 months ago

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

victorantoniak commented 6 months ago

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 ]); }

mbunal commented 3 weeks ago

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