mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve commands help list
This commit is contained in:
parent
3aee8d2b2a
commit
633996216a
|
@ -65,100 +65,99 @@ class FtRestClient():
|
|||
return self._call("POST", apipath, params=params, data=data)
|
||||
|
||||
def start(self):
|
||||
"""
|
||||
Start the bot if it's in stopped state.
|
||||
"""Start the bot if it's in the stopped state.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._post("start")
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
Stop the bot. Use start to restart
|
||||
"""Stop the bot. Use `start` to restart.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._post("stop")
|
||||
|
||||
def stopbuy(self):
|
||||
"""
|
||||
Stop buying (but handle sells gracefully).
|
||||
use reload_conf to reset
|
||||
"""Stop buying (but handle sells gracefully). Use `reload_conf` to reset.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._post("stopbuy")
|
||||
|
||||
def reload_conf(self):
|
||||
"""
|
||||
Reload configuration
|
||||
"""Reload configuration.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._post("reload_conf")
|
||||
|
||||
def balance(self):
|
||||
"""
|
||||
Get the account balance
|
||||
"""Get the account balance.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("balance")
|
||||
|
||||
def count(self):
|
||||
"""
|
||||
Returns the amount of open trades
|
||||
"""Return the amount of open trades.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("count")
|
||||
|
||||
def daily(self, days=None):
|
||||
"""
|
||||
Returns the amount of open trades
|
||||
"""Return the amount of open trades.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("daily", params={"timescale": days} if days else None)
|
||||
|
||||
def edge(self):
|
||||
"""
|
||||
Returns information about edge
|
||||
"""Return information about edge.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("edge")
|
||||
|
||||
def profit(self):
|
||||
"""
|
||||
Returns the profit summary
|
||||
"""Return the profit summary.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("profit")
|
||||
|
||||
def performance(self):
|
||||
"""
|
||||
Returns the performance of the different coins
|
||||
"""Return the performance of the different coins.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("performance")
|
||||
|
||||
def status(self):
|
||||
"""
|
||||
Get the status of open trades
|
||||
"""Get the status of open trades.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("status")
|
||||
|
||||
def version(self):
|
||||
"""
|
||||
Returns the version of the bot
|
||||
"""Return the version of the bot.
|
||||
|
||||
:return: json object containing the version
|
||||
"""
|
||||
return self._get("version")
|
||||
|
||||
def whitelist(self):
|
||||
"""
|
||||
Show the current whitelist
|
||||
"""Show the current whitelist.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("whitelist")
|
||||
|
||||
def blacklist(self, *args):
|
||||
"""
|
||||
Show the current blacklist
|
||||
"""Show the current blacklist.
|
||||
|
||||
:param add: List of coins to add (example: "BNB/BTC")
|
||||
:return: json object
|
||||
"""
|
||||
|
@ -168,8 +167,8 @@ class FtRestClient():
|
|||
return self._post("blacklist", data={"blacklist": args})
|
||||
|
||||
def forcebuy(self, pair, price=None):
|
||||
"""
|
||||
Buy an asset
|
||||
"""Buy an asset.
|
||||
|
||||
:param pair: Pair to buy (ETH/BTC)
|
||||
:param price: Optional - price to buy
|
||||
:return: json object of the trade
|
||||
|
@ -180,8 +179,8 @@ class FtRestClient():
|
|||
return self._post("forcebuy", data=data)
|
||||
|
||||
def forcesell(self, tradeid):
|
||||
"""
|
||||
Force-sell a trade
|
||||
"""Force-sell a trade.
|
||||
|
||||
:param tradeid: Id of the trade (can be received via status command)
|
||||
:return: json object
|
||||
"""
|
||||
|
@ -236,10 +235,10 @@ def load_config(configfile):
|
|||
def print_commands():
|
||||
# Print dynamic help for the different commands using the commands doc-strings
|
||||
client = FtRestClient(None)
|
||||
print("Possible commands:")
|
||||
print("Possible commands:\n")
|
||||
for x, y in inspect.getmembers(client):
|
||||
if not x.startswith('_'):
|
||||
print(f"{x} {getattr(client, x).__doc__}")
|
||||
print(f"{x}""\n "f"{getattr(client, x).__doc__.splitlines()[0]}""\n")
|
||||
|
||||
|
||||
def main(args):
|
||||
|
|
Loading…
Reference in New Issue
Block a user