From 06e20b38b563d4501f76e7b532d7591c2b296ff0 Mon Sep 17 00:00:00 2001 From: froggleston Date: Thu, 19 Dec 2024 16:18:30 +0000 Subject: [PATCH] Add params to REST API table description, fix first column width --- docs/rest-api.md | 94 +++++++++++++++++------------------ docs/stylesheets/ft.extra.css | 4 ++ 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 81b4d4c26..b958c0927 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -316,53 +316,53 @@ whitelist If you wish to call the REST API manually via another route, e.g. directly via `curl`, the table below shows the relevant URL endpoints and parameters. All endpoints in the below table need to be prefixed with the base URL of the API, e.g. `http://127.0.0.1:8080/api/v1/` - so the command becomes `http://127.0.0.1:8080/api/v1/`. -| Endpoint | Params (type) | Method | Description | -|-----------|---------------|--------|-------------| -| `/ping` | | GET | Simple command testing the API Readiness - requires no authentication. -| `/start` | | POST | Starts the trader. -| `/stop` | | POST | Stops the trader. -| `/stopbuy` | | POST | Stops the trader from opening new trades. Gracefully closes open trades according to their rules. -| `/reload_config` | | POST | Reloads the configuration file. -| `/trades` | | GET | List last trades. Limited to 500 trades per call. -| `/trade/` | `tradeid` (`int`) | GET | Get specific trade. -| `/trades/` | `tradeid` (`int`) | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange. -| `/trades//open-order` | `tradeid` (`int`) | DELETE | Cancel open order for this trade. -| `/trades//reload` | `tradeid` (`int`) | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange. -| `/show_config` | | GET | Shows part of the current configuration with relevant settings to operation. -| `/logs` | | GET | Shows last log messages. -| `/status` | | GET | Lists all open trades. -| `/count` | | GET | Displays number of trades used and available. -| `/entries` | `pair` (`str`) | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional. -| `/exits` | `pair` (`str`) | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional. -| `/mix_tags` | `pair` (`str`) | GET | Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional. -| `/locks` | | GET | Displays currently locked pairs. -| `/locks` | `` (`str`)
`` (`datetime`)
`[side]` (`str`)
`[reason]` (`str`) | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional. -| `/locks/` | `lockid` (`int`) | DELETE | Deletes (disables) the lock by id. -| `/profit` | | GET | Display a summary of your profit/loss from close trades and some stats about your performance. -| `/forceexit` | `` (`int` or `str`)
`` (`str`)
`[amount]` (`float`) | POST | Instantly exits the given trade (ignoring `minimum_roi`), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified). If `all` is supplied as the `tradeid`, then all currently open trades will be forced to exit. -| `/forceenter` | `` (`str`)
`` (`str`)
`[rate]` (`float`) | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Rate is optional. (`force_entry_enable` must be set to True) -| `/performance` | | GET | Show performance of each finished trade grouped by pair. -| `/balance` | | GET | Show account balance per currency. -| `/daily` | `` (`int`) | GET | Shows profit or loss per day, over the last n days (n defaults to 7). -| `/weekly` | `` (`int`) | GET | Shows profit or loss per week, over the last n days (n defaults to 4). -| `/monthly` | `` (`int`) | GET | Shows profit or loss per month, over the last n days (n defaults to 3). -| `/stats` | | GET | Display a summary of profit / loss reasons as well as average holding times. -| `/whitelist` | | GET | Show the current whitelist. -| `/blacklist` | | GET | Show the current blacklist. -| `/blacklist` | `pair` (`str`) | POST | Adds the specified pair to the blacklist. -| `/blacklist` | `[pair,pair]` (`list[str]`) | DELETE | Deletes the specified list of pairs from the blacklist. -| `/edge` | | GET | Show validated pairs by Edge if it is enabled. -| `/pair_candles` | | GET | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha** -| `/pair_candles` | `` (`list[str]`) | POST | Returns dataframe for a pair / timeframe combination while the bot is running, filtered by a provided list of columns to return. **Alpha** -| `/pair_history` | | GET | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. **Alpha** -| `/pair_history` | `` (`list[str]`) | POST | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy, filtered by a provided list of columns to return. **Alpha** -| `/plot_config` | | GET | Get plot config from the strategy (or nothing if not configured). **Alpha** -| `/strategies` | | GET | List strategies in strategy directory. **Alpha** -| `/strategy/` | `` (`str`) | GET | Get specific Strategy content by strategy class name. **Alpha** -| `/available_pairs` | | GET | List available backtest data. **Alpha** -| `/version` | | GET | Show version. -| `/sysinfo` | | GET | Show information about the system load. -| `/health` | | GET | Show bot health (last bot loop). +| Endpoint | Method | Description / Parameters | +|-----------|--------|--------------------------| +| `/ping` | GET | Simple command testing the API Readiness - requires no authentication. +| `/start` | POST | Starts the trader. +| `/stop` | POST | Stops the trader. +| `/stopbuy` | POST | Stops the trader from opening new trades. Gracefully closes open trades according to their rules. +| `/reload_config` | POST | Reloads the configuration file. +| `/trades` | GET | List last trades. Limited to 500 trades per call. +| `/trade/` | GET | Get specific trade.
*Params:*
- `tradeid` (`int`) +| `/trades/` | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.
*Params:*
- `tradeid` (`int`) +| `/trades//open-order` | DELETE | Cancel open order for this trade.
*Params:*
- `tradeid` (`int`) +| `/trades//reload` | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.
*Params:*
- `tradeid` (`int`) +| `/show_config` | GET | Shows part of the current configuration with relevant settings to operation. +| `/logs` | GET | Shows last log messages. +| `/status` | GET | Lists all open trades. +| `/count` | GET | Displays number of trades used and available. +| `/entries` | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.
*Params:*
- `pair` (`str`) +| `/exits` | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.
*Params:*
- `pair` (`str`) +| `/mix_tags` | GET | Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.
*Params:*
- `pair` (`str`) +| `/locks` | GET | Displays currently locked pairs. +| `/locks` | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional.
*Params:*
- `` (`str`)
- `` (`datetime`)
- `[side]` (`str`)
- `[reason]` (`str`) +| `/locks/` | DELETE | Deletes (disables) the lock by id.
*Params:*
- `lockid` (`int`) +| `/profit` | GET | Display a summary of your profit/loss from close trades and some stats about your performance. +| `/forceexit` | POST | Instantly exits the given trade (ignoring `minimum_roi`), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified). If `all` is supplied as the `tradeid`, then all currently open trades will be forced to exit.
*Params:*
- `` (`int` or `str`)
- `` (`str`)
- `[amount]` (`float`) +| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Rate is optional. (`force_entry_enable` must be set to True)
*Params:*
- `` (`str`)
- `` (`str`)
- `[rate]` (`float`) +| `/performance` | GET | Show performance of each finished trade grouped by pair. +| `/balance` | GET | Show account balance per currency. +| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).
*Params:*
- `` (`int`) +| `/weekly` | GET | Shows profit or loss per week, over the last n days (n defaults to 4).
*Params:*
- `` (`int`) +| `/monthly` | GET | Shows profit or loss per month, over the last n days (n defaults to 3).
*Params:*
- `` (`int`) +| `/stats` | GET | Display a summary of profit / loss reasons as well as average holding times. +| `/whitelist` | GET | Show the current whitelist. +| `/blacklist` | GET | Show the current blacklist. +| `/blacklist` | POST | Adds the specified pair to the blacklist.
*Params:*
- `pair` (`str`) +| `/blacklist` | DELETE | Deletes the specified list of pairs from the blacklist.
*Params:*
- `[pair,pair]` (`list[str]`) +| `/edge` | GET | Show validated pairs by Edge if it is enabled. +| `/pair_candles` | GET | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha** +| `/pair_candles` | POST | Returns dataframe for a pair / timeframe combination while the bot is running, filtered by a provided list of columns to return. **Alpha**
*Params:*
- `` (`list[str]`) +| `/pair_history` | GET | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. **Alpha** +| `/pair_history` | POST | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy, filtered by a provided list of columns to return. **Alpha**
*Params:*
- `` (`list[str]`) +| `/plot_config` | GET | Get plot config from the strategy (or nothing if not configured). **Alpha** +| `/strategies` | GET | List strategies in strategy directory. **Alpha** +| `/strategy/` | GET | Get specific Strategy content by strategy class name. **Alpha**
*Params:*
- `` (`str`) +| `/available_pairs` | GET | List available backtest data. **Alpha** +| `/version` | GET | Show version. +| `/sysinfo` | GET | Show information about the system load. +| `/health` | GET | Show bot health (last bot loop). !!! Warning "Alpha status" Endpoints labeled with *Alpha status* above may change at any time without notice. diff --git a/docs/stylesheets/ft.extra.css b/docs/stylesheets/ft.extra.css index 18985baf0..d6e64d80a 100644 --- a/docs/stylesheets/ft.extra.css +++ b/docs/stylesheets/ft.extra.css @@ -15,3 +15,7 @@ .md-version__list { font-weight: 500 !important; } + +#available-endpoints + p + .md-typeset__scrollwrap .md-typeset__table th:first-of-type { + width: 35% !important; +} \ No newline at end of file