From 9b327f451e8605e238edcdc6b87ae9ef3067eeec Mon Sep 17 00:00:00 2001 From: warproxxx Date: Sun, 22 Jun 2025 10:07:14 -0700 Subject: [PATCH] Fix a bug with max size calculation --- trading.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trading.py b/trading.py index 0be12e6..0dd0d77 100644 --- a/trading.py +++ b/trading.py @@ -227,6 +227,9 @@ async def perform_trade(market): # Calculate how much to buy or sell based on our position buy_amount, sell_amount = get_buy_sell_amount(position, bid_price, row, other_position) + + # Get max_size for logging (same logic as in get_buy_sell_amount) + max_size = row.get('max_size', row['trade_size']) # Prepare order object with all necessary information order = {