From d5b3dbbbeed2341ac9b495296489e0aa9a4a7df9 Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Mon, 3 Nov 2025 16:33:31 +0100 Subject: [PATCH] fix: Correct ETH-PERP minimum order size to 0.001 ETH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Problem:** Config had minOrderSize: 0.01 ETH for ETH-PERP, but user successfully opens positions as small as $4-8 (0.001-0.002 ETH at ~$4000/ETH). Database shows successful ETH trades: - $8 positions = 0.002 ETH at $4000/ETH - $4 positions = 0.001 ETH at $4000/ETH **Actual Drift Minimum:** 0.001 ETH (~$4 at $4000/ETH), NOT 0.01 ETH **Fix:** Updated config/trading.ts: - minOrderSize: 0.01 → 0.001 ETH - Updated comment to reflect actual minimum **Impact:** - ✅ Accurate minimum validation - ✅ Small runner positions (0.0005-0.001 ETH) won't be falsely flagged - ✅ Prevents incorrect "forcing 100% close" on valid sizes - ✅ Allows proper data collection at $4 position size **Note:** The previous fix for checking minOrderSize before close is still valid and needed - it just now uses the correct minimum (0.001 instead of 0.01). --- config/trading.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/trading.ts b/config/trading.ts index 1f68708..e4817d8 100644 --- a/config/trading.ts +++ b/config/trading.ts @@ -165,10 +165,10 @@ export const SUPPORTED_MARKETS: Record = { symbol: 'ETH-PERP', driftMarketIndex: 2, pythPriceFeedId: '0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace', - minOrderSize: 0.01, // 0.01 ETH minimum + minOrderSize: 0.001, // 0.001 ETH minimum (actual Drift minimum ~$4 at $4000/ETH) tickSize: 0.01, - // DATA COLLECTION MODE: Minimal risk (Drift minimum 0.01 ETH = ~$38) - positionSize: 40, // $40 base capital (meets exchange minimum) + // DATA COLLECTION MODE: Minimal risk + positionSize: 40, // $40 base capital leverage: 1, // 1x leverage = $40 total exposure }, }