I'm going to use API for the first time You are about to import data from a cryptocurrency exchange.
If you look at the API document, the explanation and logic related to time are as follows.
timestamp, to be sent which should be the millisecond timestamp of when the request was created and sent.
if (timestamp < serverTime && (serverTime - timestamp) <= recvWindow) {
// // process request
} } else {
// // reject request
}
If you look at the previous conditions, it is timestamp < server time, so I think I am checking if my computer time that sent the request is ahead of the server time.
But the time.time() confirmed the removal time, If you check the server time during the API and compare the received server time value, On the contrary, I can see that my computer time is longer.
I wonder if this is a problem, and if there is a problem, what should I do?
python api time timestamp server-time
If you create and send a timestamp at the time of request, the recipient (server) will have to pay for the network time, so the server time must be greater than the time stamp for normal requests.
In addition, it seems that the valid time to correct the variable in recvWindow
is compared in milliseconds because it should not be too different.
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
578 Understanding How to Configure Google API Key
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
611 GDB gets version error when attempting to debug with the Presense SDK (IDE)
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.