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

Fixed \Binance\Spot requests #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

victorantoniak
Copy link

  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."}

victor added 2 commits March 30, 2024 20:17
Adds a time offset to the timestamp in the API request to avoid time error:
(Timestamp for this request was 1000ms ahead of the server's time)
Any request with API response 400 => Fatal error.
Now you will receive json.
Exampe: {"code":-2010,"msg":"Account has insufficient balance for requested action."}
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

Successfully merging this pull request may close these issues.

1 participant