feat: Add direction-specific quality thresholds and dynamic collateral display
- Split QUALITY_LEVERAGE_THRESHOLD into separate LONG and SHORT variants - Added /api/drift/account-health endpoint for real-time collateral data - Updated settings UI to show separate controls for LONG/SHORT thresholds - Position size calculations now use dynamic collateral from Drift account - Updated .env and docker-compose.yml with new environment variables - LONG threshold: 95, SHORT threshold: 90 (configurable independently) Files changed: - app/api/drift/account-health/route.ts (NEW) - Account health API endpoint - app/settings/page.tsx - Added collateral state, separate threshold inputs - app/api/settings/route.ts - GET/POST handlers for LONG/SHORT thresholds - .env - Added QUALITY_LEVERAGE_THRESHOLD_LONG/SHORT variables - docker-compose.yml - Added new env vars with fallback defaults Impact: - Users can now configure quality thresholds independently for LONG vs SHORT signals - Position size display dynamically updates based on actual Drift account collateral - More flexible risk management with direction-specific leverage tiers
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
import { getMarketDataCache } from './market-data-cache'
|
||||
import { getMergedConfig } from '../../config/trading'
|
||||
import { getPrismaClient } from '../database/client'
|
||||
import { sendValidationNotification } from '../notifications/telegram'
|
||||
|
||||
interface QueuedSignal {
|
||||
|
||||
Reference in New Issue
Block a user