2017-11-18 07:52:28 +00:00
|
|
|
""" FreqTrade bot """
|
2019-12-14 15:11:34 +00:00
|
|
|
__version__ = '2019.11'
|
2019-08-28 05:05:48 +00:00
|
|
|
|
|
|
|
if __version__ == 'develop':
|
|
|
|
|
|
|
|
try:
|
|
|
|
import subprocess
|
2019-09-09 18:18:47 +00:00
|
|
|
__version__ = 'develop-' + subprocess.check_output(
|
|
|
|
['git', 'log', '--format="%h"', '-n 1'],
|
|
|
|
stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
|
2019-08-28 05:05:48 +00:00
|
|
|
except Exception:
|
|
|
|
# git not available, ignore
|
|
|
|
pass
|
2017-09-28 21:47:51 +00:00
|
|
|
|
2017-11-20 21:15:19 +00:00
|
|
|
|
2019-05-16 19:38:59 +00:00
|
|
|
class DependencyException(Exception):
|
2017-11-20 21:15:19 +00:00
|
|
|
"""
|
2019-05-16 19:38:59 +00:00
|
|
|
Indicates that an assumed dependency is not met.
|
2017-11-20 21:15:19 +00:00
|
|
|
This could happen when there is currently not enough money on the account.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
2019-05-16 19:38:59 +00:00
|
|
|
class OperationalException(Exception):
|
2017-11-20 21:15:19 +00:00
|
|
|
"""
|
2019-08-25 08:07:47 +00:00
|
|
|
Requires manual intervention and will usually stop the bot.
|
2018-06-07 19:35:57 +00:00
|
|
|
This happens when an exchange returns an unexpected error during runtime
|
|
|
|
or given configuration is invalid.
|
2017-11-20 21:15:19 +00:00
|
|
|
"""
|
2018-03-24 18:51:40 +00:00
|
|
|
|
|
|
|
|
2019-05-16 19:38:59 +00:00
|
|
|
class InvalidOrderException(Exception):
|
2019-04-02 16:25:17 +00:00
|
|
|
"""
|
|
|
|
This is returned when the order is not valid. Example:
|
|
|
|
If stoploss on exchange order is hit, then trying to cancel the order
|
|
|
|
should return this exception.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
2019-05-16 19:38:59 +00:00
|
|
|
class TemporaryError(Exception):
|
2018-03-24 18:51:40 +00:00
|
|
|
"""
|
2018-04-21 20:37:27 +00:00
|
|
|
Temporary network or exchange related error.
|
2018-03-24 18:51:40 +00:00
|
|
|
This could happen when an exchange is congested, unavailable, or the user
|
|
|
|
has networking problems. Usually resolves itself after a time.
|
|
|
|
"""
|