From a0bb3899e56622676ed449de45d93222efe85cc1 Mon Sep 17 00:00:00 2001 From: holger Date: Fri, 3 Sep 2021 15:26:17 +0200 Subject: [PATCH] [ADD] added ssl_verify=True to the head of the btcde.py file, use this variable for the requests Method to enable ssl verify and change it centrally --- btcde.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/btcde.py b/btcde.py index 26eb228..2c23e67 100644 --- a/btcde.py +++ b/btcde.py @@ -18,7 +18,7 @@ log = logging.getLogger(__name__) requests_log = logging.getLogger("requests.packages.urllib3") requests_log.propagate = True - +ssl_verify = True __version__ = '4.0' class ParameterBuilder(object): @@ -66,11 +66,11 @@ def create_url(self, uri): self.url = uri - TRADING_PAIRS = ['btceur', 'bcheur', 'etheur', 'btgeur', 'bsveur', 'ltceur', - 'iotabtc', 'dashbtc', 'gntbtc', 'ltcbtc'] + TRADING_PAIRS = ['btceur', 'bcheur', 'etheur', 'btgeur', 'bsveur', 'ltceur', 'xrpeur', 'dogeeur', + 'iotabtc', 'dashbtc', 'gntbtc', 'ltcbtc', 'xrpbtc', 'dogebtc'] ORDER_TYPES = ['buy', 'sell'] CURRENCIES = ['btc', 'bch', 'eth', 'btg', 'bsv', 'ltc', - 'iota', 'dash', 'gnt'] + 'iota', 'dash', 'gnt', 'xrp', 'doge'] BANK_SEATS = ['AT', 'BE', 'BG', 'CH', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IS', @@ -142,13 +142,13 @@ def set_header(self, url, method, encoded_string): def send_request(self, url, method, header, encoded_string): if method == 'GET': r = requests.get(url, headers=(header), - stream=True, verify=False) + stream=True, verify=ssl_verify) elif method == 'POST': r = requests.post(url, headers=(header), data=encoded_string, - stream=True, verify=False) + stream=True, verify=ssl_verify) elif method == 'DELETE': r = requests.delete(url, headers=(header), - stream=True, verify=False) + stream=True, verify=ssl_verify) return r def APIConnect(self, method, params):