jpstrydom / crypto-trading-bot Goto Github PK
View Code? Open in Web Editor NEWAutomated Bittrex crypto-currency technical analysis and trading tool
License: MIT License
Automated Bittrex crypto-currency technical analysis and trading tool
License: MIT License
Hello
please rewrite other project for Dovewallet.
bittrex v1.1 compatible & similar with Dovewallet
Link help Api https://developer.dovewallet.com/api/v1/
Thanks.
If you don't want to use the email notifications, you can leave out the
gmail
code.
I've removed the code block for gmail, but got an error:
2018/12/03 10:51:58 AM - ERROR: <class 'Exception'>
Traceback (most recent call last):
File "app.py", line 95, in <module>
Trader.analyse_buys()
File "/.../src/trader.py", line 60, in analyse_buys
self.buy_strategy(coin_pair)
File "/.../src/trader.py", line 92, in buy_strategy
self.buy(coin_pair, self.trade_params["buy"]["btcAmount"], current_buy_price, buy_stats)
File "/.../src/trader.py", line 197, in buy
self.Messenger.send_buy_gmail(buy_order_data["result"], stats)
File ".../src/messenger.py", line 169, in send_buy_gmail
recipient_name = self.recipient_name
AttributeError: 'Messenger' object has no attribute 'recipient_name'
just added new api keys from bittrex, got python full working and deps tru pip... created json files and this outputs on log:
2018/04/30 09:02:00 AM - ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 49, in analyse_pauses
self.Database.get_previous_total_balance())
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\messenger.py", line 221, in send_balance_slack
for balance in balance_items:
TypeError: 'NoneType' object is not iterable
2018/04/30 09:02:30 AM - ERROR: Failed to fetch user Bittrex balances.
2018/04/30 09:02:30 AM - ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 49, in analyse_pauses
self.Database.get_previous_total_balance())
File "C:\Users\Leonardo\Desktop\Crypto-Trading-Bot-master\src\messenger.py", line 221, in send_balance_slack
for balance in balance_items:
TypeError: 'NoneType' object is not iterable
2018/04/30 09:02:41 AM - ERROR: Failed to fetch user Bittrex balances.
2018/04/30 09:02:41 AM - ERROR: 'NoneType' object is not iterable
python app.py
Traceback (most recent call last):
File "app.py", line 81, in
secrets = get_secrets()
File "app.py", line 33, in get_secrets
secrets_content = get_json_from_file(secrets_file_directory, secrets_template)
File "/home/node/Crypto-Trading-Bot/src/directory_utilities.py", line 38, in get_json_from_file
except (IOError, json.decoder.JSONDecodeError):
AttributeError: 'module' object has no attribute 'JSONDecodeError'
Can you customize the coinpair list or remove certain pairs?
Is there a chance we can trigger our auto-buys/auto-sells with a MACD (Moving Average Convergence Divergence) indicator in the feature?
Seeing this error occur in groups of 4, at a variable frequency from 4-30 mins:
2018/12/04 12:07:37 AM - ERROR: 'NoneType' object is not subscriptable Traceback (most recent call last): File "/.../Crypto-Trading-Bot-master/src/bittrex.py", line 153, in get_historical_data return historical_data["result"][-period:] TypeError: 'NoneType' object is not subscriptable
I ran the program overnight, and the log file has 7600 of these entries.
I'm assuming the second error is what's causing the main problems.
2018/05/01 11:36:44 AM - ERROR: Failed to fetch Bittrex market summary for the BTC-USDT market.
2018/05/01 11:36:44 AM - ERROR: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
File "C:\Users\bmw18\Desktop\Crypto-Trading-Bot-master\src\trader.py", line 429, in create_balance_object
btc_value = round(btc_price * balance_item["Balance"], 8)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
Crypto-Trading-Bot-master\src>python app.py
Traceback (most recent call last):
File "app.py", line 5, in
from messenger import Messenger
File "C:\Users\Dready\Desktop\crypto files\Crypto-Trading-Bot-master\src\messenger.py", line 3, in
from slackclient import SlackClient
ModuleNotFoundError: No module named 'slackclient'
Resuming tracking on all 197 markets.
No Sell on BTC-FCT -> RSI: 43 Profit Margin: 0.86% Sell Price: 0.00207551 URL: https://bittrex.com/Market/Index?MarketName=BTC-FCT
Resuming tracking on all 197 markets.
Sell on BTC-FCT -> RSI: 43 Profit Margin: 2.05% Sell Price: 0.00210000 URL: https://bittrex.com/Market/Index?MarketName=BTC-FCT
An unknown exception occurred. Exiting program.
See the latest log file for more information.
the log says :
2018/06/03 02:20:17 PM - ERROR: <class 'Exception'>
Traceback (most recent call last):
File "app.py", line 96, in
Trader.analyse_sells()
File "/Users/nameless/botz/Crypto-Trading-Bot/src/trader.py", line 68, in analyse_sells
self.sell_strategy(coin_pair)
File "/Users/nameless/botz/Crypto-Trading-Bot/src/trader.py", line 121, in sell_strategy
self.sell(coin_pair, current_sell_price, sell_stats)
File "/Users/nameless/botz/Crypto-Trading-Bot/src/trader.py", line 227, in sell
self.Messenger.send_sell_gmail(sell_order_data["result"], stats)
File "/Users/nameless/botz/Crypto-Trading-Bot/src/messenger.py", line 203, in send_sell_gmail
self.send_email(subject, message)
File "/Users/nameless/botz/Crypto-Trading-Bot/src/messenger.py", line 134, in send_email
server.login(self.login, self.password)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/smtplib.py", line 730, in login
raise last_exception
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/smtplib.py", line 721, in login
initial_response_ok=initial_response_ok)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/smtplib.py", line 642, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs_\n5.7.14 4HTmswob-IAJ2LK6l-yT2LBRKNwxLu1E_KLi-GS3dsP2YNNlPwrcR5Fi9UNAskCyh37gIBxNy1\n5.7.14 DsHrtQSbBYMuY4hRhWOCda1ECsdfsf6_H0JFJnsSzdQV3JS0JXSDADKUAai8yTUdsZjmfqkIh-MJ9xw8HE\n5.7.14 \n5.7.14 3vBXKDkONhMJM2RQwLkUZvPBEjdus> Please log in via your web browser and\n5.7.14 then try again.\n5.7.14 Learn more at\n5.7.14 https://support.google.com/mail/answer/78754 r26-v6sm43896861pfj.180 - gsmtp')
I keep getting the following error message:
Invalid key provided to obj/dict
I've checked the api keys and secrets, tried creating new ones. but I always get this error.
From the logs it looks like there is no attempt to buy after one buy is done. I only see No sell logs.
If the current code only allows one buy/sell I'd love to see the possibility of several buy and sell orders.
Hi i have done the setup in windows and i am getting below error can you help me out here
BOT logs
2018/08/30 10:29:43 PM - ERROR: 'buy'
Traceback (most recent call last):
File "app.py", line 94, in
Trader.analyse_pauses()
File "C:\Users\Akki\Desktop\New folder\Crypto-Trading-Bot-master\Crypto-Trading-Bot-master\src\trader.py", line 40, in analyse_pauses
if self.Database.check_resume(self.pause_params["buy"]["pauseTime"], "buy"):
KeyError: 'buy'
except (IOError, json.decoder.JSONDecodeError):
AttributeError: 'module' object has no attribute 'JSONDecodeError'
python3.6 app.py
Traceback (most recent call last):
File "app.py", line 5, in
from messenger import Messenger
File "/home/node/Crypto-Trading-Bot/src/messenger.py", line 3, in
from slackclient import SlackClient
ModuleNotFoundError: No module named 'slackclient'
When a coin being tracked for sale has a negative margin, and the sell pause profitMarginThreshold is set at a positive number, there is no pause.
Example:
I have sell pause profitMarginThreshold set at 0.5 (a reasonable number IMO)
I have sell pauseTime set to 30
I have a coin at -6.61% profit margin.
Since -6.61 is less than 0.5 the sell tracking should have paused for 30 minutes
Would this be hard to implement? considering you are using crypto-signal, and they use ccxt?
I Pulled the latest code of yesterday but after a while it crashes and I need to restart the app (and it works again for some time):
2018/05/01 09:28:32 AM - ERROR: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/app.py", line 94, in <module>
Trader.analyse_pauses()
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/trader.py", line 48, in analyse_pauses
current_balance = self.Messenger.send_balance_slack(self.get_non_zero_balances(),
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/trader.py", line 406, in get_non_zero_balances
balances_data = self.Bittrex.get_balances()
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/bittrex.py", line 320, in get_balances
return self.api_query("getbalances", {})
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/bittrex.py", line 129, in api_query
return self.dispatch(request_url, apisign)
File "/Users/xxx/Documents/Crypto-Trading-Bot/src/bittrex.py", line 67, in using_requests
headers={"apisign": apisign}
File "/Users/xxx/venv/lib/python3.6/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I've also disabled my slackbot.
Is there any way to keep checking the market for beneficial trades while the bot is already looking for a sellout position?
Hello,
Any plans on upgrading to API v3?
The current one is going to be turned off by the end of the month.
https://bittrex.github.io/api/v1-1
Thank you!
Please implement a moving average calculation.
I am not sure if this is an issue or perhaps I am missing something. The profit/loss calculation in the current implementation seems to take into account only the 'quantity' value of the BTC before and after the SELL. It does not account for any corresponding FIAT value and so what appears to be profit may not be an actual profit but rather a loss, say for e.g. if the current price value of BTC (in USD) has dropped. Again, sorry if I have missed something basic here, but would appreciate if someone could validate this. Perhaps this is how the strategy was intended to be but I am not sure.
Just a note that there are a number of traders that attempt to use Fibonacci retracement, and including it here might make for a nice metric.
Maybe I'll try to add it myself once I dig into the codebase a bit more =).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.