From 59a723aec82bdc2c8cacbb2ebe90bb9d8d50f6e2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 27 Aug 2022 15:12:04 +0200 Subject: [PATCH] Add /health to rest client discovered in #7299 --- docs/rest-api.md | 8 ++++++++ scripts/rest_client.py | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/docs/rest-api.md b/docs/rest-api.md index d9840a09c..cc82aadda 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -163,6 +163,8 @@ python3 scripts/rest_client.py --config rest_config.json [optional par | `strategy ` | Get specific Strategy content. **Alpha** | `available_pairs` | List available backtest data. **Alpha** | `version` | Show version. +| `sysinfo` | Show informations about the system load. +| `health` | Show bot health (last bot loop). !!! Warning "Alpha status" Endpoints labeled with *Alpha status* above may change at any time without notice. @@ -227,6 +229,11 @@ forceexit Force-exit a trade. :param tradeid: Id of the trade (can be received via status command) + :param ordertype: Order type to use (must be market or limit) + :param amount: Amount to sell. Full sell if not given + +health + Provides a quick health check of the running bot. locks Return current locks @@ -312,6 +319,7 @@ version whitelist Show the current whitelist. + ``` ### OpenAPI interface diff --git a/scripts/rest_client.py b/scripts/rest_client.py index 989e6a50d..ac6d97133 100755 --- a/scripts/rest_client.py +++ b/scripts/rest_client.py @@ -361,6 +361,13 @@ class FtRestClient(): """ return self._get("sysinfo") + def health(self): + """Provides a quick health check of the running bot. + + :return: json object + """ + return self._get("health") + def add_arguments(): parser = argparse.ArgumentParser()