Add new endpoints to the documentation

This commit is contained in:
Matthias 2020-09-11 20:15:54 +02:00
parent c0654f3caf
commit bb4993dc20
2 changed files with 8 additions and 2 deletions

View File

@ -104,7 +104,7 @@ By default, the script assumes `127.0.0.1` (localhost) and port `8080` to be use
python3 scripts/rest_client.py --config rest_config.json <command> [optional parameters] python3 scripts/rest_client.py --config rest_config.json <command> [optional parameters]
``` ```
## Available commands ## Available endpoints
| Command | Description | | Command | Description |
|----------|-------------| |----------|-------------|
@ -129,6 +129,11 @@ python3 scripts/rest_client.py --config rest_config.json <command> [optional par
| `whitelist` | Show the current whitelist | `whitelist` | Show the current whitelist
| `blacklist [pair]` | Show the current blacklist, or adds a pair to the blacklist. | `blacklist [pair]` | Show the current blacklist, or adds a pair to the blacklist.
| `edge` | Show validated pairs by Edge if it is enabled. | `edge` | Show validated pairs by Edge if it is enabled.
| `pair_candles` | Returns dataframe for a pair / timeframe combination while the bot is running.
| `pair_history` | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy.
| `plot_config` | Get plot config from the strategy (or nothing if not configured).
| `strategies` | List strategies in strategy directory.
| `available_pairs` | List available backtest data.
| `version` | Show version | `version` | Show version
Possible commands can be listed from the rest-client script using the `help` command. Possible commands can be listed from the rest-client script using the `help` command.

View File

@ -214,6 +214,7 @@ class ApiServer(RPC):
view_func=self._trades, methods=['GET']) view_func=self._trades, methods=['GET'])
self.app.add_url_rule(f'{BASE_URI}/trades/<int:tradeid>', 'trades_delete', self.app.add_url_rule(f'{BASE_URI}/trades/<int:tradeid>', 'trades_delete',
view_func=self._trades_delete, methods=['DELETE']) view_func=self._trades_delete, methods=['DELETE'])
self.app.add_url_rule(f'{BASE_URI}/pair_candles', 'pair_candles', self.app.add_url_rule(f'{BASE_URI}/pair_candles', 'pair_candles',
view_func=self._analysed_candles, methods=['GET']) view_func=self._analysed_candles, methods=['GET'])
self.app.add_url_rule(f'{BASE_URI}/pair_history', 'pair_history', self.app.add_url_rule(f'{BASE_URI}/pair_history', 'pair_history',
@ -518,7 +519,7 @@ class ApiServer(RPC):
@rpc_catch_errors @rpc_catch_errors
def _analysed_candles(self): def _analysed_candles(self):
""" """
Handler for /pair_history. Handler for /pair_candles.
Returns the dataframe the bot is using during live/dry operations. Returns the dataframe the bot is using during live/dry operations.
Takes the following get arguments: Takes the following get arguments:
get: get: