Tool

Timestamp Drift Checker

Diagnose clock drift issues causing exchange API timestamp errors. Calculate recommended recvWindow settings and work through the diagnostic checklist.

Exchange APIs reject requests when the timestamp differs from server time by more than the allowed window. This is the most common production issue for trading bots. The fix is a combination of NTP sync, appropriate recvWindow, and fetching server time before signing.

0ms (synced)500ms10s (severe)

Clock drift detected

500ms drift — may cause timestamp errors on Binance

ExchangeBinance
Default recvWindow5000ms
Drift tolerance1000ms
Recommended recvWindow5000ms
ExchangeDefault recvWindowError codes
Binance5000ms-1021
Bybit5000ms10016
Kraken7000msEGeneral:Invalid arguments
Coinbase30000msTIMESTAMP_OUT_OF_SYNC
OKX5000ms60009
KuCoin5000ms400002
Gate.io5000ms4

Diagnostic checklist

Work through these steps to diagnose and fix timestamp drift issues.

0 of 8 completed

Frequently asked questions

What is timestamp drift and why does it cause API errors?
Timestamp drift happens when your server clock differs from the exchange's server time. Exchange APIs reject requests when the timestamp difference exceeds the recvWindow. This is the most common production issue for trading bots. Fix: sync your server clock via NTP, increase recvWindow, or fetch server time before signing each request.
How do I check my server's clock drift?
On Linux: run 'timedatectl timesync-status' to see the current offset. On Windows: run 'w32tm /stripchart /computer:time.windows.com /samples:5'. The offset should be under 100ms. If it's higher, your NTP service may not be running or configured correctly.
What recvWindow should I use for Binance?
Binance's default recvWindow is 5000ms (5 seconds). If your clock drift is under 100ms, this is usually sufficient. For cloud VMs with drift issues, increase to 10000-30000ms. Never exceed 60000ms as Binance rejects recvWindow > 60000. Always combine a reasonable recvWindow with proper NTP sync.
Can timestamp drift cause exchange bans?
Yes. Persistent timestamp errors can trigger exchange security systems and result in temporary or permanent API key bans. Exchanges interpret repeated timestamp errors as potential replay attacks or compromised keys. Always fix clock drift before deploying trading bots to production.