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.
Clock is synced
Your clock should be within exchange tolerances
Exchange comparison
| Exchange | Default recvWindow | Max recvWindow | Drift tolerance | Error codes | Time endpoint |
|---|---|---|---|---|---|
| Binance | 5000ms | 60000ms | 1000ms | -1021 | GET /api/v3/time |
| Bybit | 5000ms | 30000ms | 2000ms | 10016 | GET /v5/market/time |
| Kraken | 7000ms | 45000ms | 3000ms | EGeneral:Invalid arguments | GET /0/public/Time |
| Coinbase | 30000ms | 120000ms | 30000ms | TIMESTAMP_OUT_OF_SYNC | GET /api/v3/brokers/time |
| OKX | 5000ms | 45000ms | 2500ms | 60009 | GET /api/v5/public/time |
| KuCoin | 5000ms | 60000ms | 2000ms | 400002 | GET /api/v1/timestamp |
| Gate.io | 5000ms | 60000ms | 3000ms | 4 | GET /api/v4/spot/time |
Diagnostic checklist
0 of 8 completed
Related tools
Exchange Error Code Lookup
LiveLook up error codes for Binance, Bybit, Kraken, KuCoin, and OKX with recovery actions.
Exchange Config Generator
LiveGenerate YAML config snippets for Binance, Bybit, Kraken, KuCoin, and OKX.
Idempotency Key Designer
LiveGenerate idempotency contract templates for APIs with UUID, ULID, or NanoID.
Related articles
Binance -1021 Deep Dive
Timestamp Outside recvWindow
Detailed guide on why Binance -1021 happens, how NTP sync works, and how to configure recvWindow to prevent timestamp errors permanently.
Signature Errors
Timestamp Drift and Signature Invalid Errors
How clock drift causes 401/403 signature invalid errors across Binance, Bybit, and Kraken APIs, with debugging steps and code examples for each exchange.
Resources and kits
Product
AlgoTrak Production Trading Bot
Production-grade crypto trading bot with built-in timestamp sync, rate limit management, and error recovery. 14 strategies, full source code, and deployment guide.
Frequently asked questions
What is the most common cause of timestamp errors?
What recvWindow should I use?
Do all exchanges have the same tolerance?
Newsletter
Weekly engineering insights
Get practical tips on AI, .NET, trading bot reliability, and building scalable systems. No spam, unsubscribe anytime.
What engineers say
“The retry policy generator alone saved us from a production incident. We had exponential backoff configured wrong for months — the timeline visualization made it obvious instantly.”
Alex R.
Senior Backend Engineer, Fintech Startup
Still fighting clock drift?
I help teams eliminate timestamp errors permanently. Get a reliability audit with specific fixes for your exchange integration and infrastructure.