New version bittrex not working
See original GitHub issueI had a code running without any problems. I updated the bittrex.py file and now I get an error:
Traceback (most recent call last): File “C:/Lori/Adam/bitcoin/cryptoarb/rsi_bot.py”, line 50, in <module> balance_btc = xchange.fetch_balance()[‘BTC’][‘total’] File “C:\Python27\lib\site-packages\ccxt\bittrex.py”, line 201, in fetch_balance response = self.accountGetBalances() File “C:\Python27\lib\site-packages\ccxt\bittrex.py”, line 616, in request response = self.fetch2(path, api, method, params, headers, body) File “C:\Python27\lib\site-packages\ccxt\base\exchange.py”, line 258, in fetch2 request = self.sign(path, api, method, params, headers, body) File “C:\Python27\lib\site-packages\ccxt\bittrex.py”, line 584, in sign self.check_required_credentials() AttributeError: ‘bittrex’ object has no attribute ‘check_required_credentials’
OS: Win7
Programming Language: Python 2.7
CCXT version: 10.477
Exchange: Bittrex
Method: fetch_ohlcv()
This is my code… so far it worked allright, now it wont work because of the error message. What is wrong? Thank you in advance!
import ccxt
import time
import pandas as pd
from stockstats import StockDataFrame as sdf
from openpyxl import load_workbook
proxies = [
'', # no proxy by default
'https://crossorigin.me/',
'https://cors-anywhere.herokuapp.com/',
]
wait_time = 600 # seconds
counter = 1
max_rsi = 31.0
min_vol = 0.1 # btc
min_gain = 0.015
stop_loss_ratio = 0.15
stop_loss_rate = 1 - stop_loss_ratio
while(True):
# -----------------------------------------------
# connection
maxRetries = 30
for numRetries in range(0, maxRetries):
try:
currentProxy = proxies[(numRetries + 1) % len(proxies) - 1]
xchange = ccxt.bittrex({'proxy': currentProxy,
'apiKey': 'XXX',
'secret': 'XXX'
})
xchange.load_markets()
symbols_list = xchange.symbols
break
except :
print 'Proxy fail:', currentProxy
print 'numRetries:', numRetries
if currentProxy == 'https://cors-anywhere.herokuapp.com/' :
print 'waiting'
time.sleep(30)
# -----------------------------------------------
# check if we are in BTC and have no open orders
balance_btc = xchange.fetch_balance()['BTC']['total']
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Sorry for my late reply. I had very strange issues and finally figured out what the problem was. I did not update ccxt for a while now only some of the exchanges.
So I did a thorough update of everything and now it works like a charm. Thank you again for your continuous support and help! Have a happy new year!
Yes, it solved my problem!
Thank you very much for your help!