binance / binance-connector-php

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

Fixed \Binance\Spot requests #32

Open victorantoniak opened 8 months ago

victorantoniak commented 8 months ago
  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."}