mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
chore: ftclient - Update naming of argument in main method
This commit is contained in:
parent
619484a4fd
commit
61971f3949
|
@ -81,12 +81,12 @@ def print_commands():
|
||||||
print(f"{x}\n\t{doc}\n")
|
print(f"{x}\n\t{doc}\n")
|
||||||
|
|
||||||
|
|
||||||
def main_exec(args: Dict[str, Any]):
|
def main_exec(parsed: Dict[str, Any]):
|
||||||
if args.get("show"):
|
if parsed.get("show"):
|
||||||
print_commands()
|
print_commands()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
config = load_config(args["config"])
|
config = load_config(parsed["config"])
|
||||||
url = config.get("api_server", {}).get("listen_ip_address", "127.0.0.1")
|
url = config.get("api_server", {}).get("listen_ip_address", "127.0.0.1")
|
||||||
port = config.get("api_server", {}).get("listen_port", "8080")
|
port = config.get("api_server", {}).get("listen_port", "8080")
|
||||||
username = config.get("api_server", {}).get("username")
|
username = config.get("api_server", {}).get("username")
|
||||||
|
@ -96,13 +96,13 @@ def main_exec(args: Dict[str, Any]):
|
||||||
client = FtRestClient(server_url, username, password)
|
client = FtRestClient(server_url, username, password)
|
||||||
|
|
||||||
m = [x for x, y in inspect.getmembers(client) if not x.startswith("_")]
|
m = [x for x, y in inspect.getmembers(client) if not x.startswith("_")]
|
||||||
command = args["command"]
|
command = parsed["command"]
|
||||||
if command not in m:
|
if command not in m:
|
||||||
logger.error(f"Command {command} not defined")
|
logger.error(f"Command {command} not defined")
|
||||||
print_commands()
|
print_commands()
|
||||||
return
|
return
|
||||||
|
|
||||||
print(json.dumps(getattr(client, command)(*args["command_arguments"])))
|
print(json.dumps(getattr(client, command)(*parsed["command_arguments"])))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user