From 33659ee273426353f0c0698b7dc8009e87063196 Mon Sep 17 00:00:00 2001 From: Freqtrade Bot <154552126+freqtrade-bot@users.noreply.github.com> Date: Thu, 13 Mar 2025 03:10:53 +0000 Subject: [PATCH 01/22] chore: update pre-commit hooks --- .../exchange/binance_leverage_tiers.json | 1241 ++++++++++++++--- 1 file changed, 1077 insertions(+), 164 deletions(-) diff --git a/freqtrade/exchange/binance_leverage_tiers.json b/freqtrade/exchange/binance_leverage_tiers.json index 093a54176..0f11869ca 100644 --- a/freqtrade/exchange/binance_leverage_tiers.json +++ b/freqtrade/exchange/binance_leverage_tiers.json @@ -3496,6 +3496,161 @@ } } ], + "ADA/USDC:USDC": [ + { + "tier": 1.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 0.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 25.0, + "info": { + "bracket": "1", + "initialLeverage": "25", + "notionalCap": "10000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 10000.0, + "maxNotional": 20000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 20.0, + "info": { + "bracket": "2", + "initialLeverage": "20", + "notionalCap": "20000", + "notionalFloor": "10000", + "maintMarginRatio": "0.015", + "cum": "50.0" + } + }, + { + "tier": 3.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 20000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 15.0, + "info": { + "bracket": "3", + "initialLeverage": "15", + "notionalCap": "60000", + "notionalFloor": "20000", + "maintMarginRatio": "0.02", + "cum": "150.0" + } + }, + { + "tier": 4.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 60000.0, + "maxNotional": 120000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 10.0, + "info": { + "bracket": "4", + "initialLeverage": "10", + "notionalCap": "120000", + "notionalFloor": "60000", + "maintMarginRatio": "0.025", + "cum": "450.0" + } + }, + { + "tier": 5.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 120000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 8.0, + "info": { + "bracket": "5", + "initialLeverage": "8", + "notionalCap": "600000", + "notionalFloor": "120000", + "maintMarginRatio": "0.05", + "cum": "3450.0" + } + }, + { + "tier": 6.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 600000.0, + "maxNotional": 1200000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "1200000", + "notionalFloor": "600000", + "maintMarginRatio": "0.1", + "cum": "33450.0" + } + }, + { + "tier": 7.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 1200000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "1500000", + "notionalFloor": "1200000", + "maintMarginRatio": "0.125", + "cum": "63450.0" + } + }, + { + "tier": 8.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.25", + "cum": "250950.0" + } + }, + { + "tier": 9.0, + "symbol": "ADA/USDC:USDC", + "currency": "USDC", + "minNotional": 3000000.0, + "maxNotional": 6000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "6000000", + "notionalFloor": "3000000", + "maintMarginRatio": "0.5", + "cum": "1000950.0" + } + } + ], "ADA/USDT:USDT": [ { "tier": 1.0, @@ -9086,15 +9241,15 @@ "symbol": "AXS/USDT:USDT", "currency": "USDT", "minNotional": 0.0, - "maxNotional": 5000.0, - "maintenanceMarginRate": 0.006, + "maxNotional": 20000.0, + "maintenanceMarginRate": 0.007, "maxLeverage": 50.0, "info": { "bracket": "1", "initialLeverage": "50", - "notionalCap": "5000", + "notionalCap": "20000", "notionalFloor": "0", - "maintMarginRatio": "0.006", + "maintMarginRatio": "0.007", "cum": "0.0" } }, @@ -9102,38 +9257,21 @@ "tier": 2.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", - "minNotional": 5000.0, - "maxNotional": 25000.0, - "maintenanceMarginRate": 0.007, - "maxLeverage": 30.0, - "info": { - "bracket": "2", - "initialLeverage": "30", - "notionalCap": "25000", - "notionalFloor": "5000", - "maintMarginRatio": "0.007", - "cum": "5.0" - } - }, - { - "tier": 3.0, - "symbol": "AXS/USDT:USDT", - "currency": "USDT", - "minNotional": 25000.0, + "minNotional": 20000.0, "maxNotional": 400000.0, "maintenanceMarginRate": 0.01, "maxLeverage": 25.0, "info": { - "bracket": "3", + "bracket": "2", "initialLeverage": "25", "notionalCap": "400000", - "notionalFloor": "25000", + "notionalFloor": "20000", "maintMarginRatio": "0.01", - "cum": "80.0" + "cum": "60.0" } }, { - "tier": 4.0, + "tier": 3.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", "minNotional": 400000.0, @@ -9141,16 +9279,16 @@ "maintenanceMarginRate": 0.02, "maxLeverage": 20.0, "info": { - "bracket": "4", + "bracket": "3", "initialLeverage": "20", "notionalCap": "600000", "notionalFloor": "400000", "maintMarginRatio": "0.02", - "cum": "4080.0" + "cum": "4060.0" } }, { - "tier": 5.0, + "tier": 4.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", "minNotional": 600000.0, @@ -9158,97 +9296,97 @@ "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { - "bracket": "5", + "bracket": "4", "initialLeverage": "10", "notionalCap": "1200000", "notionalFloor": "600000", "maintMarginRatio": "0.05", - "cum": "22080.0" + "cum": "22060.0" + } + }, + { + "tier": 5.0, + "symbol": "AXS/USDT:USDT", + "currency": "USDT", + "minNotional": 1200000.0, + "maxNotional": 2000000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "5", + "initialLeverage": "5", + "notionalCap": "2000000", + "notionalFloor": "1200000", + "maintMarginRatio": "0.1", + "cum": "82060.0" } }, { "tier": 6.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", - "minNotional": 1200000.0, - "maxNotional": 3200000.0, - "maintenanceMarginRate": 0.1, - "maxLeverage": 5.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, "info": { "bracket": "6", - "initialLeverage": "5", - "notionalCap": "3200000", - "notionalFloor": "1200000", - "maintMarginRatio": "0.1", - "cum": "82080.0" + "initialLeverage": "4", + "notionalCap": "2500000", + "notionalFloor": "2000000", + "maintMarginRatio": "0.125", + "cum": "132060.0" } }, { "tier": 7.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", - "minNotional": 3200000.0, - "maxNotional": 5000000.0, - "maintenanceMarginRate": 0.125, - "maxLeverage": 4.0, + "minNotional": 2500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.15, + "maxLeverage": 3.0, "info": { "bracket": "7", - "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "3200000", - "maintMarginRatio": "0.125", - "cum": "162080.0" + "initialLeverage": "3", + "notionalCap": "3000000", + "notionalFloor": "2500000", + "maintMarginRatio": "0.15", + "cum": "194560.0" } }, { "tier": 8.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, - "maintenanceMarginRate": 0.15, - "maxLeverage": 3.0, + "minNotional": 3000000.0, + "maxNotional": 3500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, "info": { "bracket": "8", - "initialLeverage": "3", - "notionalCap": "10000000", - "notionalFloor": "5000000", - "maintMarginRatio": "0.15", - "cum": "287080.0" + "initialLeverage": "2", + "notionalCap": "3500000", + "notionalFloor": "3000000", + "maintMarginRatio": "0.25", + "cum": "494560.0" } }, { "tier": 9.0, "symbol": "AXS/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 15000000.0, - "maintenanceMarginRate": 0.25, - "maxLeverage": 2.0, - "info": { - "bracket": "9", - "initialLeverage": "2", - "notionalCap": "15000000", - "notionalFloor": "10000000", - "maintMarginRatio": "0.25", - "cum": "1287080.0" - } - }, - { - "tier": 10.0, - "symbol": "AXS/USDT:USDT", - "currency": "USDT", - "minNotional": 15000000.0, - "maxNotional": 20000000.0, + "minNotional": 3500000.0, + "maxNotional": 4000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { - "bracket": "10", + "bracket": "9", "initialLeverage": "1", - "notionalCap": "20000000", - "notionalFloor": "15000000", + "notionalCap": "4000000", + "notionalFloor": "3500000", "maintMarginRatio": "0.5", - "cum": "5037080.0" + "cum": "1369560.0" } } ], @@ -14568,13 +14706,13 @@ "symbol": "CATI/USDT:USDT", "currency": "USDT", "minNotional": 300000.0, - "maxNotional": 1500000.0, + "maxNotional": 800000.0, "maintenanceMarginRate": 0.05, "maxLeverage": 10.0, "info": { "bracket": "5", "initialLeverage": "10", - "notionalCap": "1500000", + "notionalCap": "800000", "notionalFloor": "300000", "maintMarginRatio": "0.05", "cum": "8450.0" @@ -14584,68 +14722,68 @@ "tier": 6.0, "symbol": "CATI/USDT:USDT", "currency": "USDT", - "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "minNotional": 800000.0, + "maxNotional": 1000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "3000000", - "notionalFloor": "1500000", + "notionalCap": "1000000", + "notionalFloor": "800000", "maintMarginRatio": "0.1", - "cum": "83450.0" + "cum": "48450.0" } }, { "tier": 7.0, "symbol": "CATI/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 3750000.0, + "minNotional": 1000000.0, + "maxNotional": 1200000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "3750000", - "notionalFloor": "3000000", + "notionalCap": "1200000", + "notionalFloor": "1000000", "maintMarginRatio": "0.125", - "cum": "158450.0" + "cum": "73450.0" } }, { "tier": 8.0, "symbol": "CATI/USDT:USDT", "currency": "USDT", - "minNotional": 3750000.0, - "maxNotional": 7500000.0, + "minNotional": 1200000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "7500000", - "notionalFloor": "3750000", + "notionalCap": "1500000", + "notionalFloor": "1200000", "maintMarginRatio": "0.25", - "cum": "627200.0" + "cum": "223450.0" } }, { "tier": 9.0, "symbol": "CATI/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 1500000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "2000000", + "notionalFloor": "1500000", "maintMarginRatio": "0.5", - "cum": "2502200.0" + "cum": "598450.0" } } ], @@ -27231,6 +27369,161 @@ } } ], + "HBAR/USDC:USDC": [ + { + "tier": 1.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 25.0, + "info": { + "bracket": "1", + "initialLeverage": "25", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 20.0, + "info": { + "bracket": "2", + "initialLeverage": "20", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 15.0, + "info": { + "bracket": "3", + "initialLeverage": "15", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 10.0, + "info": { + "bracket": "4", + "initialLeverage": "10", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 8.0, + "info": { + "bracket": "5", + "initialLeverage": "8", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "HBAR/USDC:USDC", + "currency": "USDC", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "HBAR/USDT:USDT": [ { "tier": 1.0, @@ -43422,6 +43715,161 @@ } } ], + "PNUT/USDC:USDC": [ + { + "tier": 1.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 25.0, + "info": { + "bracket": "1", + "initialLeverage": "25", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 20.0, + "info": { + "bracket": "2", + "initialLeverage": "20", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 15.0, + "info": { + "bracket": "3", + "initialLeverage": "15", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 10.0, + "info": { + "bracket": "4", + "initialLeverage": "10", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 8.0, + "info": { + "bracket": "5", + "initialLeverage": "8", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "PNUT/USDC:USDC", + "currency": "USDC", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "PNUT/USDT:USDT": [ { "tier": 1.0, @@ -45292,10 +45740,10 @@ "minNotional": 0.0, "maxNotional": 10000.0, "maintenanceMarginRate": 0.01, - "maxLeverage": 75.0, + "maxLeverage": 25.0, "info": { "bracket": "1", - "initialLeverage": "75", + "initialLeverage": "25", "notionalCap": "10000", "notionalFloor": "0", "maintMarginRatio": "0.01", @@ -45309,10 +45757,10 @@ "minNotional": 10000.0, "maxNotional": 30000.0, "maintenanceMarginRate": 0.015, - "maxLeverage": 50.0, + "maxLeverage": 20.0, "info": { "bracket": "2", - "initialLeverage": "50", + "initialLeverage": "20", "notionalCap": "30000", "notionalFloor": "10000", "maintMarginRatio": "0.015", @@ -45326,10 +45774,10 @@ "minNotional": 30000.0, "maxNotional": 150000.0, "maintenanceMarginRate": 0.02, - "maxLeverage": 25.0, + "maxLeverage": 15.0, "info": { "bracket": "3", - "initialLeverage": "25", + "initialLeverage": "15", "notionalCap": "150000", "notionalFloor": "30000", "maintMarginRatio": "0.02", @@ -45343,10 +45791,10 @@ "minNotional": 150000.0, "maxNotional": 300000.0, "maintenanceMarginRate": 0.025, - "maxLeverage": 20.0, + "maxLeverage": 10.0, "info": { "bracket": "4", - "initialLeverage": "20", + "initialLeverage": "10", "notionalCap": "300000", "notionalFloor": "150000", "maintMarginRatio": "0.025", @@ -45360,10 +45808,10 @@ "minNotional": 300000.0, "maxNotional": 500000.0, "maintenanceMarginRate": 0.05, - "maxLeverage": 10.0, + "maxLeverage": 8.0, "info": { "bracket": "5", - "initialLeverage": "10", + "initialLeverage": "8", "notionalCap": "500000", "notionalFloor": "300000", "maintMarginRatio": "0.05", @@ -45853,6 +46301,161 @@ } } ], + "RED/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "RED/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "REEF/USDT:USDT": [ { "tier": 1.0, @@ -48065,13 +48668,13 @@ "symbol": "SAGA/USDT:USDT", "currency": "USDT", "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "3000000", + "notionalCap": "2000000", "notionalFloor": "1500000", "maintMarginRatio": "0.1", "cum": "83450.0" @@ -48081,51 +48684,51 @@ "tier": 7.0, "symbol": "SAGA/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 3750000.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "3750000", - "notionalFloor": "3000000", + "notionalCap": "2500000", + "notionalFloor": "2000000", "maintMarginRatio": "0.125", - "cum": "158450.0" + "cum": "133450.0" } }, { "tier": 8.0, "symbol": "SAGA/USDT:USDT", "currency": "USDT", - "minNotional": 3750000.0, - "maxNotional": 7500000.0, + "minNotional": 2500000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "7500000", - "notionalFloor": "3750000", + "notionalCap": "3000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.25", - "cum": "627200.0" + "cum": "445950.0" } }, { "tier": 9.0, "symbol": "SAGA/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 3000000.0, + "maxNotional": 3500000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "3500000", + "notionalFloor": "3000000", "maintMarginRatio": "0.5", - "cum": "2502200.0" + "cum": "1195950.0" } } ], @@ -55371,6 +55974,161 @@ } } ], + "TRUMP/USDC:USDC": [ + { + "tier": 1.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 0.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 25.0, + "info": { + "bracket": "1", + "initialLeverage": "25", + "notionalCap": "10000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 10000.0, + "maxNotional": 20000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 20.0, + "info": { + "bracket": "2", + "initialLeverage": "20", + "notionalCap": "20000", + "notionalFloor": "10000", + "maintMarginRatio": "0.015", + "cum": "50.0" + } + }, + { + "tier": 3.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 20000.0, + "maxNotional": 100000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 15.0, + "info": { + "bracket": "3", + "initialLeverage": "15", + "notionalCap": "100000", + "notionalFloor": "20000", + "maintMarginRatio": "0.02", + "cum": "150.0" + } + }, + { + "tier": 4.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 100000.0, + "maxNotional": 200000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 10.0, + "info": { + "bracket": "4", + "initialLeverage": "10", + "notionalCap": "200000", + "notionalFloor": "100000", + "maintMarginRatio": "0.025", + "cum": "650.0" + } + }, + { + "tier": 5.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 200000.0, + "maxNotional": 500000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 8.0, + "info": { + "bracket": "5", + "initialLeverage": "8", + "notionalCap": "500000", + "notionalFloor": "200000", + "maintMarginRatio": "0.05", + "cum": "5650.0" + } + }, + { + "tier": 6.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 500000.0, + "maxNotional": 1000000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "1000000", + "notionalFloor": "500000", + "maintMarginRatio": "0.1", + "cum": "30650.0" + } + }, + { + "tier": 7.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 1000000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "1500000", + "notionalFloor": "1000000", + "maintMarginRatio": "0.125", + "cum": "55650.0" + } + }, + { + "tier": 8.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 1500000.0, + "maxNotional": 2000000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "2000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.25", + "cum": "243150.0" + } + }, + { + "tier": 9.0, + "symbol": "TRUMP/USDC:USDC", + "currency": "USDC", + "minNotional": 2000000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "2000000", + "maintMarginRatio": "0.5", + "cum": "743150.0" + } + } + ], "TRUMP/USDT:USDT": [ { "tier": 1.0, @@ -57732,6 +58490,161 @@ } } ], + "VIC/USDT:USDT": [ + { + "tier": 1.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 0.0, + "maxNotional": 5000.0, + "maintenanceMarginRate": 0.01, + "maxLeverage": 75.0, + "info": { + "bracket": "1", + "initialLeverage": "75", + "notionalCap": "5000", + "notionalFloor": "0", + "maintMarginRatio": "0.01", + "cum": "0.0" + } + }, + { + "tier": 2.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 5000.0, + "maxNotional": 10000.0, + "maintenanceMarginRate": 0.015, + "maxLeverage": 50.0, + "info": { + "bracket": "2", + "initialLeverage": "50", + "notionalCap": "10000", + "notionalFloor": "5000", + "maintMarginRatio": "0.015", + "cum": "25.0" + } + }, + { + "tier": 3.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 10000.0, + "maxNotional": 30000.0, + "maintenanceMarginRate": 0.02, + "maxLeverage": 25.0, + "info": { + "bracket": "3", + "initialLeverage": "25", + "notionalCap": "30000", + "notionalFloor": "10000", + "maintMarginRatio": "0.02", + "cum": "75.0" + } + }, + { + "tier": 4.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 30000.0, + "maxNotional": 60000.0, + "maintenanceMarginRate": 0.025, + "maxLeverage": 20.0, + "info": { + "bracket": "4", + "initialLeverage": "20", + "notionalCap": "60000", + "notionalFloor": "30000", + "maintMarginRatio": "0.025", + "cum": "225.0" + } + }, + { + "tier": 5.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 60000.0, + "maxNotional": 300000.0, + "maintenanceMarginRate": 0.05, + "maxLeverage": 10.0, + "info": { + "bracket": "5", + "initialLeverage": "10", + "notionalCap": "300000", + "notionalFloor": "60000", + "maintMarginRatio": "0.05", + "cum": "1725.0" + } + }, + { + "tier": 6.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 300000.0, + "maxNotional": 600000.0, + "maintenanceMarginRate": 0.1, + "maxLeverage": 5.0, + "info": { + "bracket": "6", + "initialLeverage": "5", + "notionalCap": "600000", + "notionalFloor": "300000", + "maintMarginRatio": "0.1", + "cum": "16725.0" + } + }, + { + "tier": 7.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 600000.0, + "maxNotional": 750000.0, + "maintenanceMarginRate": 0.125, + "maxLeverage": 4.0, + "info": { + "bracket": "7", + "initialLeverage": "4", + "notionalCap": "750000", + "notionalFloor": "600000", + "maintMarginRatio": "0.125", + "cum": "31725.0" + } + }, + { + "tier": 8.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 750000.0, + "maxNotional": 1500000.0, + "maintenanceMarginRate": 0.25, + "maxLeverage": 2.0, + "info": { + "bracket": "8", + "initialLeverage": "2", + "notionalCap": "1500000", + "notionalFloor": "750000", + "maintMarginRatio": "0.25", + "cum": "125475.0" + } + }, + { + "tier": 9.0, + "symbol": "VIC/USDT:USDT", + "currency": "USDT", + "minNotional": 1500000.0, + "maxNotional": 3000000.0, + "maintenanceMarginRate": 0.5, + "maxLeverage": 1.0, + "info": { + "bracket": "9", + "initialLeverage": "1", + "notionalCap": "3000000", + "notionalFloor": "1500000", + "maintMarginRatio": "0.5", + "cum": "500475.0" + } + } + ], "VIDT/USDT:USDT": [ { "tier": 1.0, @@ -60668,13 +61581,13 @@ "symbol": "XTZ/USDT:USDT", "currency": "USDT", "minNotional": 1000000.0, - "maxNotional": 2000000.0, + "maxNotional": 1500000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "5", "initialLeverage": "5", - "notionalCap": "2000000", + "notionalCap": "1500000", "notionalFloor": "1000000", "maintMarginRatio": "0.1", "cum": "55850.0" @@ -60684,51 +61597,51 @@ "tier": 6.0, "symbol": "XTZ/USDT:USDT", "currency": "USDT", - "minNotional": 2000000.0, - "maxNotional": 5000000.0, + "minNotional": 1500000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "6", "initialLeverage": "4", - "notionalCap": "5000000", - "notionalFloor": "2000000", + "notionalCap": "2000000", + "notionalFloor": "1500000", "maintMarginRatio": "0.125", - "cum": "105850.0" + "cum": "93350.0" } }, { "tier": 7.0, "symbol": "XTZ/USDT:USDT", "currency": "USDT", - "minNotional": 5000000.0, - "maxNotional": 10000000.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "7", "initialLeverage": "2", - "notionalCap": "10000000", - "notionalFloor": "5000000", + "notionalCap": "2500000", + "notionalFloor": "2000000", "maintMarginRatio": "0.25", - "cum": "730850.0" + "cum": "343350.0" } }, { "tier": 8.0, "symbol": "XTZ/USDT:USDT", "currency": "USDT", - "minNotional": 10000000.0, - "maxNotional": 15000000.0, + "minNotional": 2500000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "8", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "10000000", + "notionalCap": "3000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.5", - "cum": "3230850.0" + "cum": "968350.0" } } ], @@ -61445,13 +62358,13 @@ "symbol": "ZEN/USDT:USDT", "currency": "USDT", "minNotional": 1500000.0, - "maxNotional": 3000000.0, + "maxNotional": 2000000.0, "maintenanceMarginRate": 0.1, "maxLeverage": 5.0, "info": { "bracket": "6", "initialLeverage": "5", - "notionalCap": "3000000", + "notionalCap": "2000000", "notionalFloor": "1500000", "maintMarginRatio": "0.1", "cum": "83450.0" @@ -61461,51 +62374,51 @@ "tier": 7.0, "symbol": "ZEN/USDT:USDT", "currency": "USDT", - "minNotional": 3000000.0, - "maxNotional": 3750000.0, + "minNotional": 2000000.0, + "maxNotional": 2500000.0, "maintenanceMarginRate": 0.125, "maxLeverage": 4.0, "info": { "bracket": "7", "initialLeverage": "4", - "notionalCap": "3750000", - "notionalFloor": "3000000", + "notionalCap": "2500000", + "notionalFloor": "2000000", "maintMarginRatio": "0.125", - "cum": "158450.0" + "cum": "133450.0" } }, { "tier": 8.0, "symbol": "ZEN/USDT:USDT", "currency": "USDT", - "minNotional": 3750000.0, - "maxNotional": 7500000.0, + "minNotional": 2500000.0, + "maxNotional": 3000000.0, "maintenanceMarginRate": 0.25, "maxLeverage": 2.0, "info": { "bracket": "8", "initialLeverage": "2", - "notionalCap": "7500000", - "notionalFloor": "3750000", + "notionalCap": "3000000", + "notionalFloor": "2500000", "maintMarginRatio": "0.25", - "cum": "627200.0" + "cum": "445950.0" } }, { "tier": 9.0, "symbol": "ZEN/USDT:USDT", "currency": "USDT", - "minNotional": 7500000.0, - "maxNotional": 15000000.0, + "minNotional": 3000000.0, + "maxNotional": 3500000.0, "maintenanceMarginRate": 0.5, "maxLeverage": 1.0, "info": { "bracket": "9", "initialLeverage": "1", - "notionalCap": "15000000", - "notionalFloor": "7500000", + "notionalCap": "3500000", + "notionalFloor": "3000000", "maintMarginRatio": "0.5", - "cum": "2502200.0" + "cum": "1195950.0" } } ], From 74c837519a3af9f54c622a0f4a56e68b66b3265c Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 13 Mar 2025 20:40:38 +0100 Subject: [PATCH 02/22] chore: don't use deprecated pandas timeperiod --- freqtrade/optimize/optimize_reports/optimize_reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/optimize/optimize_reports/optimize_reports.py b/freqtrade/optimize/optimize_reports/optimize_reports.py index a798eaf7a..b7fa0e26d 100644 --- a/freqtrade/optimize/optimize_reports/optimize_reports.py +++ b/freqtrade/optimize/optimize_reports/optimize_reports.py @@ -213,7 +213,7 @@ def _get_resample_from_period(period: str) -> str: if period == "month": return "1ME" if period == "year": - return "1Y" + return "1YE" raise ValueError(f"Period {period} is not supported.") From bfd2c3f942b0bea2152a2a6bc66571b6bba5f23c Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 13 Mar 2025 20:43:53 +0100 Subject: [PATCH 03/22] chore: pin freqtrade CI badge to develop branch --- README.md | 2 +- docs/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a0b8121b..e0eaf55a9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![freqtrade](https://raw.githubusercontent.com/freqtrade/freqtrade/develop/docs/assets/freqtrade_poweredby.svg) -[![Freqtrade CI](https://github.com/freqtrade/freqtrade/workflows/Freqtrade%20CI/badge.svg)](https://github.com/freqtrade/freqtrade/actions/) +[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/) [![DOI](https://joss.theoj.org/papers/10.21105/joss.04864/status.svg)](https://doi.org/10.21105/joss.04864) [![Coverage Status](https://coveralls.io/repos/github/freqtrade/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/freqtrade/freqtrade?branch=develop) [![Documentation](https://readthedocs.org/projects/freqtrade/badge/)](https://www.freqtrade.io) diff --git a/docs/index.md b/docs/index.md index 79c60072d..d05fcc2c1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ ![freqtrade](assets/freqtrade_poweredby.svg) -[![Freqtrade CI](https://github.com/freqtrade/freqtrade/workflows/Freqtrade%20CI/badge.svg)](https://github.com/freqtrade/freqtrade/actions/) +[![Freqtrade CI](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/freqtrade/freqtrade/actions/) [![DOI](https://joss.theoj.org/papers/10.21105/joss.04864/status.svg)](https://doi.org/10.21105/joss.04864) [![Coverage Status](https://coveralls.io/repos/github/freqtrade/freqtrade/badge.svg?branch=develop&service=github)](https://coveralls.io/github/freqtrade/freqtrade?branch=develop) [![Maintainability](https://api.codeclimate.com/v1/badges/5737e6d668200b7518ff/maintainability)](https://codeclimate.com/github/freqtrade/freqtrade/maintainability) From 9911d2aa324226c6b79812219540139f506c64d4 Mon Sep 17 00:00:00 2001 From: kowhi <54210721+kowhi@users.noreply.github.com> Date: Sat, 15 Mar 2025 12:23:42 +0800 Subject: [PATCH 04/22] fix the type of the fit_live_predictions_candles field in the config schema --- freqtrade/configuration/config_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index f50334938..61726a863 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -1026,8 +1026,8 @@ CONF_SCHEMA = { "Number of historical candles to use for computing target (label) " "statistics from prediction data, instead of from the training dataset." ), - "type": "boolean", - "default": False, + "type": "integer", + "default": 0, }, "data_kitchen_thread_count": { "description": ( From 5964845265d988af7fcbd2c8fd6758b2c8bf7936 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 15 Mar 2025 07:50:43 +0100 Subject: [PATCH 05/22] chore: Export json schema --- build_helpers/schema.json | 3 +-- freqtrade/configuration/config_schema.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index 5fb1772c6..ff99fbe78 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -1417,8 +1417,7 @@ }, "fit_live_predictions_candles": { "description": "Number of historical candles to use for computing target (label) statistics from prediction data, instead of from the training dataset.", - "type": "boolean", - "default": false + "type": "integer" }, "data_kitchen_thread_count": { "description": "Designate the number of threads you want to use for data processing (outlier methods, normalization, etc.).", diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index 61726a863..d517048c7 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -1027,7 +1027,6 @@ CONF_SCHEMA = { "statistics from prediction data, instead of from the training dataset." ), "type": "integer", - "default": 0, }, "data_kitchen_thread_count": { "description": ( From 55dc2d4bf431034bb4085b026efb0ecda7431bf1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:07:52 +0100 Subject: [PATCH 06/22] chore: update watch reuse log message --- freqtrade/exchange/exchange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 14b801bef..3a5974a8b 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2441,8 +2441,8 @@ class Exchange: return self._exchange_ws.get_ohlcv(pair, timeframe, candle_type, candle_ts) logger.info( - f"Failed to reuse watch {pair}, {timeframe}, {candle_ts < last_refresh_time}," - f" {candle_ts}, {last_refresh_time}, " + f"Couldn't reuse watch for {pair}, {timeframe}, falling back to REST api. " + f"{candle_ts < last_refresh_time}, {candle_ts}, {last_refresh_time}, " f"{format_ms_time(candle_ts)}, {format_ms_time(last_refresh_time)} " ) From 623f27341f660a8b79fcb55ae7f2542ef69764a6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:21:10 +0100 Subject: [PATCH 07/22] chore: simplify telegram safety wrapper --- freqtrade/rpc/telegram.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 5b4982346..dd42ed12a 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -101,12 +101,9 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): update = kwargs.get("update") or args[0] # Reject unauthorized messages - if update.callback_query: - cchat_id = int(update.callback_query.message.chat.id) - ctopic_id = update.callback_query.message.message_thread_id - else: - cchat_id = int(update.message.chat_id) - ctopic_id = update.message.message_thread_id + message = update.message if update.callback_query is None else update.callback_query.message + cchat_id = int(message.chat_id) + ctopic_id = message.message_thread_id chat_id = int(self._config["telegram"]["chat_id"]) if cchat_id != chat_id: From d543feb03272ad8e273f47c2461c6136b9d15614 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:42:15 +0100 Subject: [PATCH 08/22] tests: simplify telegram test setup --- tests/rpc/test_rpc_telegram.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index 1882e09c4..92d152c83 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -6,7 +6,7 @@ import asyncio import logging import re import threading -from datetime import datetime, timedelta, timezone +from datetime import timedelta from functools import reduce from random import choice, randint from string import ascii_uppercase @@ -16,7 +16,7 @@ import pytest import time_machine from pandas import DataFrame from sqlalchemy import select -from telegram import Chat, Message, ReplyKeyboardMarkup, Update +from telegram import Chat, Message, ReplyKeyboardMarkup, Update, User from telegram.error import BadRequest, NetworkError, TelegramError from freqtrade import __version__ @@ -67,7 +67,12 @@ def default_conf(default_conf) -> dict: @pytest.fixture def update(): - message = Message(0, datetime.now(timezone.utc), Chat(1235, 0)) + message = Message( + 0, + dt_now(), + Chat(1235, 0), + from_user=User(5432, "test", is_bot=False), + ) _update = Update(0, message=message) return _update @@ -232,8 +237,12 @@ async def test_authorized_only(default_conf, mocker, caplog, update) -> None: async def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> None: patch_exchange(mocker) caplog.set_level(logging.DEBUG) - chat = Chat(0xDEADBEEF, 0) - message = Message(randint(1, 100), datetime.now(timezone.utc), chat) + message = Message( + randint(1, 100), + dt_now(), + Chat(0xDEADBEEF, 0), + from_user=User(5432, "test", is_bot=False), + ) update = Update(randint(1, 100), message=message) default_conf["telegram"]["enabled"] = False @@ -638,7 +647,7 @@ async def test_daily_handle(default_conf_usdt, update, ticker, fee, mocker, time assert msg_mock.call_count == 1 assert "Daily Profit over the last 2 days:" in msg_mock.call_args_list[0][0][0] assert "Day " in msg_mock.call_args_list[0][0][0] - assert str(datetime.now(timezone.utc).date()) in msg_mock.call_args_list[0][0][0] + assert str(dt_now().date()) in msg_mock.call_args_list[0][0][0] assert " 6.83 USDT" in msg_mock.call_args_list[0][0][0] assert " 7.51 USD" in msg_mock.call_args_list[0][0][0] assert "(2)" in msg_mock.call_args_list[0][0][0] @@ -651,11 +660,8 @@ async def test_daily_handle(default_conf_usdt, update, ticker, fee, mocker, time await telegram._daily(update=update, context=context) assert msg_mock.call_count == 1 assert "Daily Profit over the last 7 days:" in msg_mock.call_args_list[0][0][0] - assert str(datetime.now(timezone.utc).date()) in msg_mock.call_args_list[0][0][0] - assert ( - str((datetime.now(timezone.utc) - timedelta(days=5)).date()) - in msg_mock.call_args_list[0][0][0] - ) + assert str(dt_now().date()) in msg_mock.call_args_list[0][0][0] + assert str((dt_now() - timedelta(days=5)).date()) in msg_mock.call_args_list[0][0][0] assert " 6.83 USDT" in msg_mock.call_args_list[0][0][0] assert " 7.51 USD" in msg_mock.call_args_list[0][0][0] assert "(2)" in msg_mock.call_args_list[0][0][0] @@ -725,7 +731,7 @@ async def test_weekly_handle(default_conf_usdt, update, ticker, fee, mocker, tim in msg_mock.call_args_list[0][0][0] ) assert "Monday " in msg_mock.call_args_list[0][0][0] - today = datetime.now(timezone.utc).date() + today = dt_now().date() first_iso_day_of_current_week = today - timedelta(days=today.weekday()) assert str(first_iso_day_of_current_week) in msg_mock.call_args_list[0][0][0] assert " 2.74 USDT" in msg_mock.call_args_list[0][0][0] @@ -793,7 +799,7 @@ async def test_monthly_handle(default_conf_usdt, update, ticker, fee, mocker, ti assert msg_mock.call_count == 1 assert "Monthly Profit over the last 2 months:" in msg_mock.call_args_list[0][0][0] assert "Month " in msg_mock.call_args_list[0][0][0] - today = datetime.now(timezone.utc).date() + today = dt_now().date() current_month = f"{today.year}-{today.month:02} " assert current_month in msg_mock.call_args_list[0][0][0] assert " 2.74 USDT" in msg_mock.call_args_list[0][0][0] @@ -898,7 +904,7 @@ async def test_telegram_profit_handle( trade.orders.append(oobj) trade.update_trade(oobj) - trade.close_date = datetime.now(timezone.utc) + trade.close_date = dt_now() trade.is_open = False Trade.commit() From a95c3ace929213781c6d04de273a77645f4796d3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:44:23 +0100 Subject: [PATCH 09/22] feat: add authorized_users support for telegram --- freqtrade/rpc/telegram.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index dd42ed12a..82d3c6bad 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -25,6 +25,7 @@ from telegram import ( InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, + Message, ReplyKeyboardMarkup, Update, ) @@ -98,12 +99,15 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): @wraps(command_handler) async def wrapper(self, *args, **kwargs): """Decorator logic""" - update = kwargs.get("update") or args[0] + update: Update = kwargs.get("update") or args[0] # Reject unauthorized messages - message = update.message if update.callback_query is None else update.callback_query.message - cchat_id = int(message.chat_id) - ctopic_id = message.message_thread_id + message: Message = ( + update.message if update.callback_query is None else update.callback_query.message + ) + cchat_id: int = int(message.chat_id) + ctopic_id: int | None = message.message_thread_id + from_user_id: str = str(update.effective_user.id) chat_id = int(self._config["telegram"]["chat_id"]) if cchat_id != chat_id: @@ -115,6 +119,10 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): logger.debug(f"Rejected message from wrong channel: {cchat_id}, {ctopic_id}") return None + authorized = self._config["telegram"].get("authorized_users", []) + if authorized and from_user_id not in authorized: + logger.info(f"Unauthorized user tried to control the bot: {from_user_id}") + return None # Rollback session to avoid getting data stored in a transaction. Trade.rollback() logger.debug("Executing handler: %s for chat_id: %s", command_handler.__name__, chat_id) From 7255beddea8e3e93b188b7a2b916bd2079b89f01 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:47:59 +0100 Subject: [PATCH 10/22] chore: improved null check --- freqtrade/rpc/telegram.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 82d3c6bad..4fda45516 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -119,8 +119,8 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): logger.debug(f"Rejected message from wrong channel: {cchat_id}, {ctopic_id}") return None - authorized = self._config["telegram"].get("authorized_users", []) - if authorized and from_user_id not in authorized: + authorized = self._config["telegram"].get("authorized_users", None) + if authorized is not None and from_user_id not in authorized: logger.info(f"Unauthorized user tried to control the bot: {from_user_id}") return None # Rollback session to avoid getting data stored in a transaction. @@ -2158,6 +2158,7 @@ class Telegram(RPCHandler): return chat_id = update.message.chat_id topic_id = update.message.message_thread_id + user_id = update.message.from_user.id if topic_id is not None else None msg = f"""Freqtrade Bot Info: ```json @@ -2165,7 +2166,8 @@ class Telegram(RPCHandler): "enabled": true, "token": "********", "chat_id": "{chat_id}", - {f'"topic_id": "{topic_id}"' if topic_id else ""} + {f'"topic_id": "{topic_id}",' if topic_id else ""} + {f'//"authorized_users": ["{user_id}"]' if topic_id else ""} }} ``` """ From 39903d521e5c45080977cc3f1a0235c0cf608f15 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:48:22 +0100 Subject: [PATCH 11/22] docs: add authorized_users to documentation closes #11504 --- docs/telegram-usage.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md index 946686b1c..c7c434140 100644 --- a/docs/telegram-usage.md +++ b/docs/telegram-usage.md @@ -81,6 +81,19 @@ Without this, the bot will always respond to the general channel in the group if Similar to the group-id - you can use `/tg_info` from the topic/thread to get the correct topic-id. +#### Authorized users + +For groups, it can be useful to limit who can send commands to the bot. + +If `"authorized_users": []` is present and empty, no user will be allowed to control the bot. +In the below example, only the user with the id "1234567" is allowed to control the bot - all other users will only be able to receive messages. + +```json + "chat_id": "-1001332619709", + "topic_id": "3", + "authorized_users": ["1234567"] +``` + ## Control telegram noise Freqtrade provides means to control the verbosity of your telegram bot. From f3aac3d66d1db8e23cf264b121af4b499e243fb6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 13:48:50 +0100 Subject: [PATCH 12/22] feat: add authorized-users key to config schema --- build_helpers/schema.json | 8 ++++++++ freqtrade/configuration/config_schema.py | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/build_helpers/schema.json b/build_helpers/schema.json index ff99fbe78..1d71184b1 100644 --- a/build_helpers/schema.json +++ b/build_helpers/schema.json @@ -613,6 +613,14 @@ "description": "Telegram topic ID - only applicable for group chats", "type": "string" }, + "authorized_users": { + "description": "Authorized users for the bot.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, "allow_custom_messages": { "description": "Allow sending custom messages from the Strategy.", "type": "boolean", diff --git a/freqtrade/configuration/config_schema.py b/freqtrade/configuration/config_schema.py index d517048c7..0ef37027d 100644 --- a/freqtrade/configuration/config_schema.py +++ b/freqtrade/configuration/config_schema.py @@ -471,6 +471,12 @@ CONF_SCHEMA = { "description": "Telegram topic ID - only applicable for group chats", "type": "string", }, + "authorized_users": { + "description": "Authorized users for the bot.", + "type": "array", + "items": {"type": "string"}, + "uniqueItems": True, + }, "allow_custom_messages": { "description": "Allow sending custom messages from the Strategy.", "type": "boolean", From 5d3c764e279916e123bc836c89c550a3d4add8d5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 14:00:17 +0100 Subject: [PATCH 13/22] test for authorized_users telegram functionality closes #11503 --- tests/rpc/test_rpc_telegram.py | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index 92d152c83..6c222dc7a 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -258,6 +258,42 @@ async def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> Non assert not log_has("Exception occurred within Telegram module", caplog) +async def test_authorized_users(default_conf, mocker, caplog, update) -> None: + patch_exchange(mocker) + caplog.set_level(logging.DEBUG) + default_conf["telegram"]["enabled"] = False + default_conf["telegram"]["authorized_users"] = ["5432"] + bot = FreqtradeBot(default_conf) + rpc = RPC(bot) + dummy = DummyCls(rpc, default_conf) + + await dummy.dummy_handler(update=update, context=MagicMock()) + assert dummy.state["called"] is True + assert log_has("Executing handler: dummy_handler for chat_id: 1235", caplog) + caplog.clear() + # Test empty case + default_conf["telegram"]["authorized_users"] = [] + dummy1 = DummyCls(rpc, default_conf) + await dummy1.dummy_handler(update=update, context=MagicMock()) + assert dummy1.state["called"] is False + assert log_has_re(r"Unauthorized user tried to .*5432", caplog) + caplog.clear() + # Test wrong user + default_conf["telegram"]["authorized_users"] = ["1234"] + dummy1 = DummyCls(rpc, default_conf) + await dummy1.dummy_handler(update=update, context=MagicMock()) + assert dummy1.state["called"] is False + assert log_has_re(r"Unauthorized user tried to .*5432", caplog) + caplog.clear() + + # Test reverse case again + default_conf["telegram"]["authorized_users"] = ["5432"] + dummy1 = DummyCls(rpc, default_conf) + await dummy1.dummy_handler(update=update, context=MagicMock()) + assert dummy1.state["called"] is True + assert not log_has_re(r"Unauthorized user tried to .*5432", caplog) + + async def test_authorized_only_exception(default_conf, mocker, caplog, update) -> None: patch_exchange(mocker) From 17b161cb0371ecf7d6692d4a6f92d87d4f20e6fc Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 Mar 2025 14:00:25 +0100 Subject: [PATCH 14/22] chore: improve types in telegram --- freqtrade/rpc/telegram.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 4fda45516..faf7a5530 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -97,9 +97,9 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): """ @wraps(command_handler) - async def wrapper(self, *args, **kwargs): + async def wrapper(self, *args, **kwargs) -> None: """Decorator logic""" - update: Update = kwargs.get("update") or args[0] + update = kwargs.get("update") or args[0] # Reject unauthorized messages message: Message = ( @@ -107,7 +107,7 @@ def authorized_only(command_handler: Callable[..., Coroutine[Any, Any, None]]): ) cchat_id: int = int(message.chat_id) ctopic_id: int | None = message.message_thread_id - from_user_id: str = str(update.effective_user.id) + from_user_id: str = str(update.effective_user.id if update.effective_user else "") chat_id = int(self._config["telegram"]["chat_id"]) if cchat_id != chat_id: @@ -2158,7 +2158,9 @@ class Telegram(RPCHandler): return chat_id = update.message.chat_id topic_id = update.message.message_thread_id - user_id = update.message.from_user.id if topic_id is not None else None + user_id = ( + update.effective_user.id if topic_id is not None and update.effective_user else None + ) msg = f"""Freqtrade Bot Info: ```json @@ -2167,7 +2169,7 @@ class Telegram(RPCHandler): "token": "********", "chat_id": "{chat_id}", {f'"topic_id": "{topic_id}",' if topic_id else ""} - {f'//"authorized_users": ["{user_id}"]' if topic_id else ""} + {f'//"authorized_users": ["{user_id}"]' if topic_id and user_id else ""} }} ``` """ From 93cbbbbe31bd0b704903bb7d773805ae29e28f78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 03:55:22 +0000 Subject: [PATCH 15/22] chore(deps): bump mkdocs-material in the mkdocs group Bumps the mkdocs group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material). Updates `mkdocs-material` from 9.6.7 to 9.6.8 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.7...9.6.8) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mkdocs ... Signed-off-by: dependabot[bot] --- docs/requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 60e6666ba..1b019c5a2 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,6 @@ markdown==3.7 mkdocs==1.6.1 -mkdocs-material==9.6.7 +mkdocs-material==9.6.8 mdx_truly_sane_lists==1.3 pymdown-extensions==10.14.3 jinja2==3.1.6 From 331c6beafc421bdc26e197c548c0f062e612321b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 03:55:37 +0000 Subject: [PATCH 16/22] chore(deps): bump filelock from 3.17.0 to 3.18.0 Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.17.0 to 3.18.0. - [Release notes](https://github.com/tox-dev/py-filelock/releases) - [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst) - [Commits](https://github.com/tox-dev/py-filelock/compare/3.17.0...3.18.0) --- updated-dependencies: - dependency-name: filelock dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-hyperopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-hyperopt.txt b/requirements-hyperopt.txt index d467669d3..2a326d654 100644 --- a/requirements-hyperopt.txt +++ b/requirements-hyperopt.txt @@ -5,4 +5,4 @@ scipy==1.15.2 scikit-learn==1.6.1 ft-scikit-optimize==0.9.2 -filelock==3.17.0 +filelock==3.18.0 From 7de9e2c4b6893eb0ea0959bc28d9c07f00ec83f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 03:56:01 +0000 Subject: [PATCH 17/22] chore(deps): bump python-telegram-bot from 21.11.1 to 22.0 Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 21.11.1 to 22.0. - [Release notes](https://github.com/python-telegram-bot/python-telegram-bot/releases) - [Commits](https://github.com/python-telegram-bot/python-telegram-bot/compare/v21.11.1...v22.0) --- updated-dependencies: - dependency-name: python-telegram-bot dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 228ba83a9..2a0d6c0c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ ccxt==4.4.65 cryptography==44.0.2 aiohttp==3.9.5 SQLAlchemy==2.0.38 -python-telegram-bot==21.11.1 +python-telegram-bot==22.0 # can't be hard-pinned due to telegram-bot pinning httpx with ~ httpx>=0.24.1 humanize==4.12.1 From ba38f8120c42ea04df1dd373a4bd9207a211296b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 03:56:11 +0000 Subject: [PATCH 18/22] chore(deps-dev): bump ruff from 0.9.10 to 0.11.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.11.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.10...0.11.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 25c299a36..df9196d82 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,7 +7,7 @@ -r docs/requirements-docs.txt coveralls==4.0.1 -ruff==0.9.10 +ruff==0.11.0 mypy==1.15.0 pre-commit==4.1.0 pytest==8.3.5 From 4f218e4fb2c79f2adc9b17940f883d96a5581e21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 05:33:48 +0000 Subject: [PATCH 19/22] chore(deps): bump sqlalchemy from 2.0.38 to 2.0.39 Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 2.0.38 to 2.0.39. - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases) - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst) - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits) --- updated-dependencies: - dependency-name: sqlalchemy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2a0d6c0c8..a2e000505 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ pandas-ta==0.3.14b ccxt==4.4.65 cryptography==44.0.2 aiohttp==3.9.5 -SQLAlchemy==2.0.38 +SQLAlchemy==2.0.39 python-telegram-bot==22.0 # can't be hard-pinned due to telegram-bot pinning httpx with ~ httpx>=0.24.1 From 0e6cd72edd47205cf182151b99a30e5ca7a5ea0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 05:34:06 +0000 Subject: [PATCH 20/22] chore(deps): bump ccxt from 4.4.65 to 4.4.68 Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.4.65 to 4.4.68. - [Release notes](https://github.com/ccxt/ccxt/releases) - [Changelog](https://github.com/ccxt/ccxt/blob/master/CHANGELOG.md) - [Commits](https://github.com/ccxt/ccxt/compare/v4.4.65...v4.4.68) --- updated-dependencies: - dependency-name: ccxt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2a0d6c0c8..a48453c3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ bottleneck==1.4.2 numexpr==2.10.2 pandas-ta==0.3.14b -ccxt==4.4.65 +ccxt==4.4.68 cryptography==44.0.2 aiohttp==3.9.5 SQLAlchemy==2.0.38 From 33164ec04104424aa76090e25a26bd20106f5008 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Mar 2025 06:35:29 +0100 Subject: [PATCH 21/22] chore: bump sqlalchemy in pre-commit config --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74629a630..72d9c5136 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - types-requests==2.32.0.20250306 - types-tabulate==0.9.0.20241207 - types-python-dateutil==2.9.0.20241206 - - SQLAlchemy==2.0.38 + - SQLAlchemy==2.0.39 # stages: [push] - repo: https://github.com/pycqa/isort From fddceb2572434294835d5346bf743db764315802 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Mar 2025 17:55:33 +0100 Subject: [PATCH 22/22] chore: pin ccxt version to more recent number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 91187cccd..8ee9818b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ dependencies = [ # from requirements.txt - "ccxt>=4.3.24", + "ccxt>=4.4.60", "SQLAlchemy>=2.0.6", "python-telegram-bot>=20.1", "humanize>=4.0.0",