From 11f84116e9e0c1166bc917fcffb4546331a27680 Mon Sep 17 00:00:00 2001 From: hammedb197 <30192139+hammedb197@users.noreply.github.com> Date: Sun, 21 Jan 2024 14:42:30 +0100 Subject: [PATCH 1/4] remove busd Binance discontinued BUSD pair recently --- models/config/binance_parser.py | 1 - 1 file changed, 1 deletion(-) diff --git a/models/config/binance_parser.py b/models/config/binance_parser.py index a0fa89d1..c4d28683 100644 --- a/models/config/binance_parser.py +++ b/models/config/binance_parser.py @@ -33,7 +33,6 @@ def parse_market(market): "ETH", "USDT", "TUSD", - "BUSD", "DAX", "NGN", "RUB", From 9ca6b31f120dcdc4389efcb4f3a15a475bca9f8f Mon Sep 17 00:00:00 2001 From: Afiz Momin Date: Sat, 2 Mar 2024 16:51:38 -0800 Subject: [PATCH 2/4] fix: add missing 'Coinbase' exchange to the Telegram Bot list --- telegram_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram_bot.py b/telegram_bot.py index 8273d514..52edb875 100644 --- a/telegram_bot.py +++ b/telegram_bot.py @@ -51,7 +51,7 @@ EXCHANGE, MARKET, ANYOVERRIDES, OVERRIDES, SAVE, START = range(6) EXCEPT_EXCHANGE, EXCEPT_MARKET = range(2) -replykeyboard = [["Coinbase Pro", "Binance", "Kucoin"]] +replykeyboard = [["Coinbase", "Coinbase Pro", "Binance", "Kucoin"]] markup = ReplyKeyboardMarkup(replykeyboard, one_time_keyboard=True) From 8d13a0e4df3e8f3640b44f48a5e082d6065f022c Mon Sep 17 00:00:00 2001 From: Afiz Momin Date: Sat, 2 Mar 2024 16:53:26 -0800 Subject: [PATCH 3/4] fix: get minimum quote order from the product API --- README.md | 6 +++--- models/AppState.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fae7d3b4..6f53b434 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ Follow my Medium publication for PyCryptoBot articles For information about installing, using, and getting the most out of the bot... please refer to the articles on Medium! Install and Setup of PyCryptoBot 7 -https://trading-data-analysis.pro/install-and-setup-of-pycryptobot-7-f1b2c832e795 + PyCryptoBot 7 Live Test Results -https://trading-data-analysis.pro/pycryptobot-7-live-test-results-b56316e0995c + PyCryptoBot 7 Configuration -https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94 + diff --git a/models/AppState.py b/models/AppState.py index 52c4da8c..04cc9329 100644 --- a/models/AppState.py +++ b/models/AppState.py @@ -216,11 +216,19 @@ def minimum_order_quote(self, quote: float = 0.0, balancechk: bool = False): raise Exception(f"Market not found! ({self.app.market})") elif self.app.exchange == Exchange.COINBASE: + product = self.api.auth_api("GET", f"api/v3/brokerage/products/{self.app.market}") + if len(product) == 0: + sys.tracebacklimit = 0 + raise Exception(f"Market not found! ({self.app.market})") + ticker = self.api.get_ticker(self.app.market, None) price = float(ticker[1]) - quote = float(quote) - base_min = self.api.market_quote_increment(self.app.market, quote) + + try: + base_min = float(product[["base_min_size"]].values[0]) + except Exception: + base_min = 0.0 elif self.app.exchange == Exchange.COINBASEPRO: product = self.api.auth_api("GET", f"products/{self.app.market}") From 2cbc020ad9e5cf40418c193194467faaad51497d Mon Sep 17 00:00:00 2001 From: Afiz Momin Date: Sat, 2 Mar 2024 15:53:47 -0800 Subject: [PATCH 4/4] fix: Coinbase missing API key and secret when starting scanner --- README.md | 8 ++++---- scanner.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fae7d3b4..90fb48f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Python Crypto Bot v8.2.3 (pycryptobot) +# Python Crypto Bot v8.2.4 (pycryptobot) [![Docker](https://github.com/whittlem/pycryptobot/actions/workflows/container.yml/badge.svg)](https://github.com/whittlem/pycryptobot/actions/workflows/container.yml/badge.svg) [![Tests](https://github.com/whittlem/pycryptobot/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/whittlem/pycryptobot/actions/workflows/unit-tests.yml/badge.svg) @@ -38,10 +38,10 @@ Follow my Medium publication for PyCryptoBot articles For information about installing, using, and getting the most out of the bot... please refer to the articles on Medium! Install and Setup of PyCryptoBot 7 -https://trading-data-analysis.pro/install-and-setup-of-pycryptobot-7-f1b2c832e795 + PyCryptoBot 7 Live Test Results -https://trading-data-analysis.pro/pycryptobot-7-live-test-results-b56316e0995c + PyCryptoBot 7 Configuration -https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94 + diff --git a/scanner.py b/scanner.py index 7109f5f5..f04beb81 100644 --- a/scanner.py +++ b/scanner.py @@ -8,6 +8,7 @@ from models.Trading import TechnicalAnalysis from models.exchange.binance import PublicAPI as BPublicAPI from models.exchange.coinbase import AuthAPI as CBAuthAPI +from models.config.coinbase_parser import parser as coinbaseParser from models.exchange.coinbase_pro import PublicAPI as CPublicAPI from models.exchange.kucoin import PublicAPI as KPublicAPI from models.exchange.Granularity import Granularity @@ -34,6 +35,8 @@ if ex == Exchange.BINANCE: api = BPublicAPI(bot_config[ex.value]["api_url"]) elif ex == Exchange.COINBASE: + # Read config from key file + coinbaseParser(app, bot_config[ex.value]) api = CBAuthAPI(bot_config[ex.value]["api_key"], bot_config[ex.value]["api_secret"], bot_config[ex.value]["api_url"]) elif ex == Exchange.COINBASEPRO: api = CPublicAPI()