ClientError: 400, -1021 - how to resolve it

ClientError: (400, -1021, “Timestamp for this request was 1000ms ahead of the server’s time.”

Hi team,

pleasea dvise how to resolve this as i have see github documentation, but could not find a resolution for the same, as its explained what the error means but how to resolve this time syn mismatch, i guess

thanks in advance


Can you provide us by the way with The ntp servers you’re using please ?


You can take a look at this thread for your issue.

how to increase recvWindow time ? any documentation on that will help


By using the recvWindow parameter in respective endpoints.

hi Chai,

sorry to ask as i am new to python. i am using below code to get wallet balances.

where to put this recvWindow parameter?


config_logging(logging, logging.DEBUG)
spot_client = Client(key, secret)
a = spot_client.account()
df = pd.json_normalize(a,“balances”)

thanks in advance


Hi Chai,

i input the below and its the same error coming with max limit of recvWindow?

a = spot_client.account(recvWindow=60000)

please advise


any update as this has not happned from the past 2 months. wonder why its happening now.

thanks in advance

There a 2 solutions posted in the other thread.
Did you try this solution?
Adjust your local time by synchronizing it with our server time ( 7). For Linux system, you can follow NTP;