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
| Exchange | Default recvWindow | Error codes | Time endpoint |
|---|---|---|---|
| Binance | 5000ms | -1021 | GET /api/v3/time |
| Bybit | 5000ms | 10016 | GET /v5/market/time |
| Kraken | 7000ms | EGeneral:Invalid arguments | GET /0/public/Time |
| Coinbase | 30000ms | TIMESTAMP_OUT_OF_SYNC | GET /api/v3/brokers/time |
| OKX | 5000ms | 60009 | GET /api/v5/public/time |
| KuCoin | 5000ms | 400002 | GET /api/v1/timestamp |
| Gate.io | 5000ms | 4 | GET /api/v4/spot/time |
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.