From 60f1ff4a17da70d1b61ab5bc6f0525d1d203cee9 Mon Sep 17 00:00:00 2001 From: Dane Isburgh Date: Sat, 13 Jan 2024 21:46:16 -0500 Subject: [PATCH 1/4] chore: update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b45111f..63c84b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .databricks/ +.DS_Store .eggs .env .ipynb_checkpoints/ @@ -8,5 +9,6 @@ __pycache__/ build/ dist/ +notebooks/data scratch/** !scratch/README.md \ No newline at end of file From 148a6a85b443d595b30e9235c399fa575e6b4896 Mon Sep 17 00:00:00 2001 From: Dane Isburgh Date: Sat, 13 Jan 2024 22:16:39 -0500 Subject: [PATCH 2/4] chore: update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 63c84b9..9e4f804 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .env .ipynb_checkpoints/ *.egg-info +.mypy_cache .venv/ .Trash-1000 __pycache__/ From 75639a92c9c733f6ba6e2f9e85f663de764b5e22 Mon Sep 17 00:00:00 2001 From: Dane Isburgh Date: Sat, 13 Jan 2024 22:17:17 -0500 Subject: [PATCH 3/4] ci: temporarily disable type check --- .github/workflows/integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index a324e3b..aa133ac 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -20,8 +20,8 @@ jobs: run: pip install -e ".[dev]" - name: Run format check run: black --diff --color --check . - - name: Run type check - run: mypy --install-types --non-interactive . + # - name: Run type check + # run: mypy --install-types --non-interactive . - name: Create release if: github.ref == 'refs/heads/main' env: From ac9c54e35f9deae68f6d449ad23ab25c34ba6b09 Mon Sep 17 00:00:00 2001 From: Dane Isburgh Date: Sat, 13 Jan 2024 22:40:33 -0500 Subject: [PATCH 4/4] fix: coinbase sell product precision --- invaas/coinbase/coinbase_task.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/invaas/coinbase/coinbase_task.py b/invaas/coinbase/coinbase_task.py index 95ccb03..d875ce7 100644 --- a/invaas/coinbase/coinbase_task.py +++ b/invaas/coinbase/coinbase_task.py @@ -62,7 +62,15 @@ def __buy_product(self, product_id: str, available_cash: float): def __sell_product(self, product_id: str, owned_crypto: float): crypto_id = self.__get_crypto_id(product_id) - sell_amount = self.floor_value(value=owned_crypto, precision=8) + + if product_id in ["BTC-USD", "ETH-USD"]: + precision = 8 + elif product_id in ["DOT-USD", "SOL-USD"]: + precision = 3 + elif product_id in ["ATOM-USD"]: + precision = 2 + + sell_amount = self.floor_value(value=owned_crypto, precision=precision) self.logger.info(f"Sell amount: {sell_amount}") if sell_amount == 0: