Skip to content

Commit

Permalink
Merge pull request #841 from whittlem/beta
Browse files Browse the repository at this point in the history
Merging beta into main
  • Loading branch information
whittlem authored Mar 4, 2024
2 parents c193d59 + 5be74cf commit 1fa9aae
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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
<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
<https://trading-data-analysis.pro/pycryptobot-7-live-test-results-b56316e0995c>

PyCryptoBot 7 Configuration
https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94
<https://trading-data-analysis.pro/pycryptobot-7-configuration-e314931f94>
12 changes: 10 additions & 2 deletions models/AppState.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 0 additions & 1 deletion models/config/binance_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def parse_market(market):
"ETH",
"USDT",
"TUSD",
"BUSD",
"DAX",
"NGN",
"RUB",
Expand Down
3 changes: 3 additions & 0 deletions scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion telegram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1fa9aae

Please sign in to comment.