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

Question: how do I avoid "Timestamp for this request is outside of the recvWindow."

Open rabol opened this issue 1 year ago • 2 comments

Hi

Locally I have never seen this error, but as soon as I put my application on a VPS for testing and I get this error quite often.

Some background:

There is several users, and each minute I check for changes in open orders (to see if any take profit orders ahs been execute since last minute) and the account balance.

I have double checked the server time and compared it with Binance and the difference is 'stable' around 135-145ms, where my server seems to be a little ahead.

can I set a parameter in the requests to avoid this error ?

rabol avatar Feb 06 '25 11:02 rabol

I experienced this issue on my VM about 2-5 times a day due to a lack of resources. After increased VM CPU and RAM, I see it maybe 1-2 times a month. So, I can only suggest adding resources or optimizing code.

Jay04653 avatar Jul 02 '25 09:07 Jay04653

hm... 10gb ram, 5 cores, 10 threads and I use the SDK, so code optimisation is out of my control

rabol avatar Jul 02 '25 09:07 rabol