Document new api method
This commit is contained in:
parent
1156f5e686
commit
64e680d7ee
@ -109,24 +109,25 @@ python3 scripts/rest_client.py --config rest_config.json <command> [optional par
|
|||||||
| Command | Description |
|
| Command | Description |
|
||||||
|----------|-------------|
|
|----------|-------------|
|
||||||
| `ping` | Simple command testing the API Readiness - requires no authentication.
|
| `ping` | Simple command testing the API Readiness - requires no authentication.
|
||||||
| `start` | Starts the trader
|
| `start` | Starts the trader.
|
||||||
| `stop` | Stops the trader
|
| `stop` | Stops the trader.
|
||||||
| `stopbuy` | Stops the trader from opening new trades. Gracefully closes open trades according to their rules.
|
| `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.
|
| `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.
|
| `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
|
| `show_config` | Shows part of the current configuration with relevant settings to operation.
|
||||||
| `logs` | Shows last log messages
|
| `logs` | Shows last log messages.
|
||||||
| `status` | Lists all open trades
|
| `status` | Lists all open trades.
|
||||||
| `count` | Displays number of trades used and available
|
| `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
|
| `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 <trade_id>` | Instantly sells the given trade (Ignoring `minimum_roi`).
|
||||||
| `forcesell all` | Instantly sells all open trades (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)
|
| `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
|
| `performance` | Show performance of each finished trade grouped by pair.
|
||||||
| `balance` | Show account balance per currency
|
| `balance` | Show account balance per currency.
|
||||||
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7)
|
| `daily <n>` | Shows profit or loss per day, over the last n days (n defaults to 7).
|
||||||
| `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. **Alpha**
|
| `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**
|
| `strategies` | List strategies in strategy directory. **Alpha**
|
||||||
| `strategy <strategy>` | Get specific Strategy content. **Alpha**
|
| `strategy <strategy>` | Get specific Strategy content. **Alpha**
|
||||||
| `available_pairs` | List available backtest data. **Alpha**
|
| `available_pairs` | List available backtest data. **Alpha**
|
||||||
| `version` | Show version
|
| `version` | Show version.
|
||||||
|
|
||||||
!!! Warning "Alpha status"
|
!!! Warning "Alpha status"
|
||||||
Endpoints labeled with *Alpha status* above may change at any time without notice.
|
Endpoints labeled with *Alpha status* above may change at any time without notice.
|
||||||
|
@ -744,9 +744,8 @@ class Telegram(RPC):
|
|||||||
"*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
|
"*/delete <trade_id>:* `Instantly delete the given trade in the database`\n"
|
||||||
"*/performance:* `Show performance of each finished trade grouped by pair`\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"
|
"*/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`"
|
"*/count:* `Show number of active trades compared to allowed number of trades`\n"
|
||||||
"*/locks:* `Show currently locked pairs`"
|
"*/locks:* `Show currently locked pairs`\n"
|
||||||
"\n"
|
|
||||||
"*/balance:* `Show account balance per currency`\n"
|
"*/balance:* `Show account balance per currency`\n"
|
||||||
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n"
|
"*/stopbuy:* `Stops buying, but handles open trades gracefully` \n"
|
||||||
"*/reload_config:* `Reload configuration file` \n"
|
"*/reload_config:* `Reload configuration file` \n"
|
||||||
|
@ -388,9 +388,6 @@ def test_is_pair_locked(default_conf):
|
|||||||
# Lock until 14:30
|
# Lock until 14:30
|
||||||
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
|
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
|
||||||
strategy.lock_pair(pair, lock_time)
|
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)
|
assert not strategy.is_pair_locked(pair)
|
||||||
# latest candle is from 14:20, lock goes to 14:30
|
# latest candle is from 14:20, lock goes to 14:30
|
||||||
|
@ -1194,9 +1194,6 @@ def test_PairLock(default_conf):
|
|||||||
# Lock until 14:30
|
# Lock until 14:30
|
||||||
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
|
lock_time = datetime(2020, 5, 1, 14, 30, 0, tzinfo=timezone.utc)
|
||||||
PairLock.lock_pair(pair, lock_time)
|
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 not PairLock.is_pair_locked(pair)
|
||||||
assert PairLock.is_pair_locked(pair, lock_time + timedelta(minutes=-10))
|
assert PairLock.is_pair_locked(pair, lock_time + timedelta(minutes=-10))
|
||||||
|
Loading…
Reference in New Issue
Block a user