stable/freqtrade/__init__.py

45 lines
1.2 KiB
Python
Raw Normal View History

2017-11-18 07:52:28 +00:00
""" FreqTrade bot """
2019-10-01 17:35:47 +00:00
__version__ = '2019.9'
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
class DependencyException(Exception):
"""
Indicates that an assumed dependency is not met.
This could happen when there is currently not enough money on the account.
"""
class OperationalException(Exception):
"""
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.
"""
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.
"""
class TemporaryError(Exception):
"""
2018-04-21 20:37:27 +00:00
Temporary network or exchange related error.
This could happen when an exchange is congested, unavailable, or the user
has networking problems. Usually resolves itself after a time.
"""