From f121151e1c142f73460ec78a21f84e7dbd70e809 Mon Sep 17 00:00:00 2001 From: Dane Isburgh Date: Sun, 4 Feb 2024 20:13:57 -0500 Subject: [PATCH] feat: increase coinbase min buy amount --- invaas/coinbase/coinbase_task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invaas/coinbase/coinbase_task.py b/invaas/coinbase/coinbase_task.py index 0266bbf..cd6ff6b 100644 --- a/invaas/coinbase/coinbase_task.py +++ b/invaas/coinbase/coinbase_task.py @@ -26,7 +26,7 @@ def __init__(self, env: str): self.logger.info(f"Minimum fear greed index to buy: {self.min_fear_greed_index_to_buy}") self.logger.info(f"Current fear greed index: {self.current_fear_greed_index}") - self.min_buy_amount = 2 + self.min_buy_amount = 10 self.max_buy_amount = 100 self.logger.info(f"Min buy amount: ${self.min_buy_amount}") self.logger.info(f"Max buy amount: ${self.max_buy_amount}") @@ -40,7 +40,7 @@ def __get_crypto_id(self, product_id: str): return product_id.split("-")[0] def __buy_product(self, product_id: str, available_cash: float): - buy_amount = self.floor_value(value=(available_cash / len(self.product_ids) / 10), precision=2) + buy_amount = self.floor_value(value=(available_cash / len(self.product_ids)), precision=2) buy_amount = buy_amount if buy_amount >= self.min_buy_amount else self.min_buy_amount buy_amount = buy_amount if buy_amount <= self.max_buy_amount else self.max_buy_amount self.logger.info(f"Buy amount: ${buy_amount:.2f}")