Document new api method

This commit is contained in:
Matthias 2020-10-18 10:48:39 +02:00
parent 1156f5e686
commit 64e680d7ee
4 changed files with 16 additions and 22 deletions

View File

@ -109,24 +109,25 @@ python3 scripts/rest_client.py --config rest_config.json <command> [optional par
| Command | Description |
|----------|-------------|
| `ping` | Simple command testing the API Readiness - requires no authentication.
| `start` | Starts the trader
| `stop` | Stops the trader
| `start` | Starts the trader.
| `stop` | Stops the trader.
| `stopbuy` | Stops the trader from opening new trades. Gracefully closes open trades according to their rules.
| `reload_config` | Reloads the configuration file
| `reload_config` | Reloads the configuration file.
| `trades` | List last trades.
| `delete_trade <trade_id>` | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.
| `show_config` | Shows part of the current configuration with relevant settings to operation
| `logs` | Shows last log messages
| `status` | Lists all open trades
| `count` | Displays number of trades used and available
| `profit` | Display a summary of your profit/loss from close trades and some stats about your performance
| `show_config` | Shows part of the current configuration with relevant settings to operation.
| `logs` | Shows last log messages.
| `status` | Lists all open trades.
| `count` | Displays number of trades used and available.
| `locks` | Displays currently locked pairs.
| `profit` | Display a summary of your profit/loss from close trades and some stats about your performance.
| `forcesell <trade_id>` | Instantly sells the given trade (Ignoring `minimum_roi`).
| `forcesell all` | Instantly sells all open trades (Ignoring `minimum_roi`).
| `forcebuy <pair> [rate]` | Instantly buys the given pair. Rate is optional. (`forcebuy_enable` must be set to True)
| `performance` | Show performance of each finished trade grouped by pair
| `balance` | Show account balance per currency
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7)
| `whitelist` | Show the current whitelist
| `performance` | Show performance of each finished trade grouped by pair.
| `balance` | Show account balance per currency.
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7).
| `whitelist` | Show the current whitelist.
| `blacklist [pair]` | Show the current blacklist, or adds a pair to the blacklist.
| `edge` | Show validated pairs by Edge if it is enabled.
| `pair_candles` | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha**
@ -135,7 +136,7 @@ python3 scripts/rest_client.py --config rest_config.json <command> [optional par
| `strategies` | List strategies in strategy directory. **Alpha**
| `strategy <strategy>` | Get specific Strategy content. **Alpha**
| `available_pairs` | List available backtest data. **Alpha**
| `version` | Show version
| `version` | Show version.
!!! Warning "Alpha status"
Endpoints labeled with *Alpha status* above may change at any time without notice.

View File

@ -744,9 +744,8 @@ class Telegram(RPC):
"*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
"*/performance:* `Show performance of each finished trade grouped by pair`\n"
"*/daily <n>:* `Shows profit or loss per day, over the last n days`\n"
"*/count:* `Show number of trades running compared to allowed number of trades`"
"*/locks:* `Show currently locked pairs`"
"\n"
"*/count:* `Show number of active trades compared to allowed number of trades`\n"
"*/locks:* `Show currently locked pairs`\n"
"*/balance:* `Show account balance per currency`\n"
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n"
"*/reload_config:* `Reload configuration file` \n"

View File

@ -388,9 +388,6 @@ def test_is_pair_locked(default_conf):
# Lock until 14:30
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
strategy.lock_pair(pair, lock_time)
# Lock is in the past, so we must fake the lock
lock = PairLock.query.filter(PairLock.pair == pair).first()
lock.lock_time = lock_time - timedelta(hours=2)
assert not strategy.is_pair_locked(pair)
# latest candle is from 14:20, lock goes to 14:30

View File

@ -1194,9 +1194,6 @@ def test_PairLock(default_conf):
# Lock until 14:30
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
PairLock.lock_pair(pair, lock_time)
# Lock is in the past, so we must fake the lock
lock = PairLock.query.filter(PairLock.pair == pair).first()
lock.lock_time = lock_time - timedelta(hours=2)
assert not PairLock.is_pair_locked(pair)
assert PairLock.is_pair_locked(pair, lock_time + timedelta(minutes=-10))