Skip to content

Commit 1fa9aae

Browse files
authored
Merge pull request #841 from whittlem/beta
Merging beta into main
2 parents c193d59 + 5be74cf commit 1fa9aae

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Python Crypto Bot v8.2.3 (pycryptobot)
1+
# Python Crypto Bot v8.2.4 (pycryptobot)
22

33
[![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)
44

@@ -38,10 +38,10 @@ Follow my Medium publication for PyCryptoBot articles
3838
For information about installing, using, and getting the most out of the bot... please refer to the articles on Medium!
3939

4040
Install and Setup of PyCryptoBot 7
41-
https://trading-data-analysis.pro/install-and-setup-of-pycryptobot-7-f1b2c832e795
41+
<https://trading-data-analysis.pro/install-and-setup-of-pycryptobot-7-f1b2c832e795>
4242

4343
PyCryptoBot 7 Live Test Results
44-
https://trading-data-analysis.pro/pycryptobot-7-live-test-results-b56316e0995c
44+
<https://trading-data-analysis.pro/pycryptobot-7-live-test-results-b56316e0995c>
4545

4646
PyCryptoBot 7 Configuration
47-
https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94
47+
<https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94>

models/AppState.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,19 @@ def minimum_order_quote(self, quote: float = 0.0, balancechk: bool = False):
216216
raise Exception(f"Market not found! ({self.app.market})")
217217

218218
elif self.app.exchange == Exchange.COINBASE:
219+
product = self.api.auth_api("GET", f"api/v3/brokerage/products/{self.app.market}")
220+
if len(product) == 0:
221+
sys.tracebacklimit = 0
222+
raise Exception(f"Market not found! ({self.app.market})")
223+
219224
ticker = self.api.get_ticker(self.app.market, None)
220225
price = float(ticker[1])
221-
222226
quote = float(quote)
223-
base_min = self.api.market_quote_increment(self.app.market, quote)
227+
228+
try:
229+
base_min = float(product[["base_min_size"]].values[0])
230+
except Exception:
231+
base_min = 0.0
224232

225233
elif self.app.exchange == Exchange.COINBASEPRO:
226234
product = self.api.auth_api("GET", f"products/{self.app.market}")

models/config/binance_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def parse_market(market):
3333
"ETH",
3434
"USDT",
3535
"TUSD",
36-
"BUSD",
3736
"DAX",
3837
"NGN",
3938
"RUB",

scanner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from models.Trading import TechnicalAnalysis
99
from models.exchange.binance import PublicAPI as BPublicAPI
1010
from models.exchange.coinbase import AuthAPI as CBAuthAPI
11+
from models.config.coinbase_parser import parser as coinbaseParser
1112
from models.exchange.coinbase_pro import PublicAPI as CPublicAPI
1213
from models.exchange.kucoin import PublicAPI as KPublicAPI
1314
from models.exchange.Granularity import Granularity
@@ -34,6 +35,8 @@
3435
if ex == Exchange.BINANCE:
3536
api = BPublicAPI(bot_config[ex.value]["api_url"])
3637
elif ex == Exchange.COINBASE:
38+
# Read config from key file
39+
coinbaseParser(app, bot_config[ex.value])
3740
api = CBAuthAPI(bot_config[ex.value]["api_key"], bot_config[ex.value]["api_secret"], bot_config[ex.value]["api_url"])
3841
elif ex == Exchange.COINBASEPRO:
3942
api = CPublicAPI()

telegram_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
EXCHANGE, MARKET, ANYOVERRIDES, OVERRIDES, SAVE, START = range(6)
5252
EXCEPT_EXCHANGE, EXCEPT_MARKET = range(2)
5353

54-
replykeyboard = [["Coinbase Pro", "Binance", "Kucoin"]]
54+
replykeyboard = [["Coinbase", "Coinbase Pro", "Binance", "Kucoin"]]
5555

5656
markup = ReplyKeyboardMarkup(replykeyboard, one_time_keyboard=True)
5757

0 commit comments

Comments
 (0)