Timing security
Trading endpoint has a parameter,
timestamp, to be sent which should be the millisecond timestamp of when the request was created and sent.An additional parameter,
recvWindow, may be sent to specify the number of milliseconds aftertimestampthe request is valid for. IfrecvWindowis not sent, it defaults to 5000.
if (timestamp < (serverTime + 1000) && (serverTime - timestamp) <= recvWindow){
// process request
}
else {
// reject request
}Last updated