WazirX / wazirx-api

Wazirx API documentation
183 stars 36 forks source link

Request out of receiving window #43

Open nikkhil31 opened 2 years ago

nikkhil31 commented 2 years ago

Hi, I'm trying to fetch account info via this api {{wazirx_api_domain}}/sapi/v1/account?recvWindow=&timestamp={{current_time}}&signature={{signature}}

but, I got this response, { "code": 2098, "message": "Request out of receiving window." }

Is there anything that I'm missing?

yuvan11 commented 2 years ago

Hi @nikkhil31 , What is your limit that you have set for recWindow?

nikkhil31 commented 2 years ago

I'm passing 10000 as a recvWindow. Sometimes it works fine but sometimes it doesn't.

yuvan11 commented 2 years ago

Setting 10000 as a recvWindow won't be a issue. The error might occur because the timestamp which is passing get expired. Make sure, you are only passing a current timestamp for each of your request & also for signature generation.

nikkhil31 commented 2 years ago

Yeah, I have set the wrong logic for timestamp and signature. Thanks, @yuvan11

yuvan11 commented 2 years ago

You're welcome @nikkhil31 . Keep up the good work!

rinoldev commented 1 year ago

I'm still having the issue, the logic to get the current time is working for the account API but for the order API it's throwing errors like { message: 'Request out of receiving window.', code: 2098 }. @yuvan11