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

Fixed \Binance\Spot requests

Open victorantoniak opened this issue 1 year ago • 2 comments

  1. $client = \App\Factory::getClientSpot(); $client->useServerTime();

fixes the problem (Timestamp for this request was 1000ms ahead of the server's time)

  1. Any request with API response 400 => Fatal error.

try / cache - doesn't solve the problem

print $e->getMessage() => GuzzleHttp\Exception\ClientException: Client error: POST https://testnet.binance.vision/api/v3/order?quantity=18.52&newOrderRespType=FULL&recvWindow=1000&symbol=LTCUSDT&side=SELL&type=MARKET×tamp=1711824528422&signature=812faf4008cf6cab2b9b86dc88de42e625c19850c3a882ccc47ece53bdebb05c resulted in a 400 Bad Request response: {"code":-2010,"msg":"Account has insufficient balance for requested action."} in D...

Now you will receive json. Exampe: {"code":-2010,"msg":"Account has insufficient balance for requested action."}

victorantoniak avatar Mar 30 '24 18:03 victorantoniak

谢谢你,这行代码'http_errors' => false让我拜摆脱了无尽的try-catch异常 Thank you, this line of code 'http_errors' => false saved me from endless try-catch exceptions

UP7i5CAT avatar Jan 02 '25 13:01 UP7i5CAT

Access

tim2346 avatar May 27 '25 03:05 tim2346