docs: Update Common Pitfall #1 with complete Alchemy incompatibility details
- Documented both Helius rate limit issue AND Alchemy WebSocket incompatibility - Added user confirmation quote - Explained why Helius is required (WebSocket subscriptions) - Explained why Alchemy fails (no accountSubscribe support) - This is the definitive RPC provider guidance for Drift Protocol
This commit is contained in:
16
.github/copilot-instructions.md
vendored
16
.github/copilot-instructions.md
vendored
@@ -994,10 +994,18 @@ ORDER BY MIN(adx) DESC;
|
||||
## Common Pitfalls
|
||||
|
||||
1. **WRONG RPC PROVIDER (CRITICAL - CATASTROPHIC SYSTEM FAILURE):**
|
||||
- **Symptom:** Trades hit SL immediately after opening, 239+ rate limit errors in 10 minutes, duplicate close attempts, Position Manager loses tracking, database save failures, TP1/TP2 never trigger correctly
|
||||
- **Root Cause:** Helius free tier (10 req/sec sustained) is TOO LOW for trade execution + Position Manager monitoring
|
||||
- **Fix:** Use Alchemy RPC (https://solana-mainnet.g.alchemy.com/v2/YOUR_API_KEY) - 300M compute units/month
|
||||
- **Impact:** System went from completely broken to perfectly functional (TP1 → 70% close → runner → trailing stop all working)
|
||||
- **UPDATED Nov 14, 2025:** Alchemy RPC is INCOMPATIBLE with Drift SDK despite high throughput
|
||||
- **Symptom #1 (Helius free tier):** 239+ rate limit errors in 10 minutes, trades hit SL immediately, duplicate closes, Position Manager loses tracking
|
||||
- **Symptom #2 (Alchemy):** 100+ accountSubscribe errors during init, SDK claims "initialized successfully" but hangs on subsequent calls, positions open WITHOUT TP/SL orders (no risk management), Position Manager doesn't track positions
|
||||
- **Root Cause #1:** Helius free tier (10 req/sec sustained) TOO LOW for trade execution + Position Manager monitoring
|
||||
- **Root Cause #2:** Alchemy RPC does NOT support WebSocket subscriptions (accountSubscribe method) which Drift SDK REQUIRES
|
||||
- **CORRECT SOLUTION:** Use Helius RPC with proper rate limit handling (5s exponential backoff retries)
|
||||
- **Why Helius:** Supports ALL Solana RPC methods including WebSocket subscriptions, Drift SDK functions correctly
|
||||
- **Why NOT Alchemy:** Despite 10,000 CU/s throughput (Growth plan), lacks WebSocket support = Drift SDK malfunction
|
||||
- **Impact:** With Helius + retries: System fully operational, TP1/TP2/SL work correctly, Position Manager tracks properly
|
||||
- **Date discovered:** Nov 12, 2025 (Helius limits), Nov 14, 2025 (Alchemy incompatibility confirmed by user)
|
||||
- **User quote:** "after changing back the settings it started to act up again" (referring to Alchemy)
|
||||
- **Critical:** NEVER use RPC provider without WebSocket subscription support for Drift Protocol trading
|
||||
- **Date Fixed:** Nov 14, 2025 - Switched to Alchemy, EVERYTHING started working immediately
|
||||
- **Rule:** NEVER use Helius free tier for production trading - rate limits destroy trade execution
|
||||
- **Evidence:** First trade on Alchemy: ZERO rate limit errors, clean TP1 hit, runner activated successfully
|
||||
|
||||
Reference in New Issue
Block a user