From f82276eac7e03f46bcf4360a0c646890abed4481 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 2 Sep 2024 20:09:09 +0200 Subject: [PATCH] Rounding --- crypto_seller/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto_seller/__init__.py b/crypto_seller/__init__.py index ff75cf1..d3dd1ee 100644 --- a/crypto_seller/__init__.py +++ b/crypto_seller/__init__.py @@ -214,6 +214,7 @@ def run_auto_sell(config: AutoSellConfig) -> AutoSellRunResults: if input_amount_available > 0: amount_to_sell = sample_from_range(rng, config.input_amount_range) amount_to_sell = min(input_amount_available, amount_to_sell) + amount_to_sell = int(amount_to_sell + Decimal('0.5')) logger.info('Attempting to sell %s %s', amount_to_sell, config.input_asset) order_details = config.seller.place_market_order(