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

Timestamp for this request is outside of the recvWindow #51

Open
blackcatt opened this issue May 6, 2023 · 2 comments
Open

Timestamp for this request is outside of the recvWindow #51

blackcatt opened this issue May 6, 2023 · 2 comments

Comments

@blackcatt
Copy link

Sometimes binance responds

{"code":-1021,"msg":"Timestamp for this request is outside of the recvWindow.","_method": ...

Looks like my server time is wrong. But it's ok (Debian timesyncd says system clock is in sync: yes)
The request may be taking too long. StackOverflow users recommend increasing recvWindow - but how?
Zhouaini528 maybe you have smart ideas about this error ?

@zhouaini528
Copy link
Owner

$binance->trade()->postOrder([
      'symbol'=>'BTCUSDT',
      'side'=>'SELL',
      'type'=>'LIMIT',
      'quantity'=>'0.001',
      'price'=>'80000',
      'timeInForce'=>'GTC',

      //The value cannot be greater than 60000
      'recvWindow'=>'60000'
  ]);

@MarioOlivera
Copy link

@zhouaini528 This can be applied to all methods right? For example, in my case I had this error when obtaining the account data.

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

No branches or pull requests

3 participants