Merge branch 'freqtrade:develop' into dca

This commit is contained in:
Reigo Reinmets 2021-12-17 21:59:58 +02:00 committed by GitHub
commit cea023399e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -110,6 +110,7 @@ Possible parameters are:
* `open_date` * `open_date`
* `stake_amount` * `stake_amount`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `order_type` * `order_type`
* `current_rate` * `current_rate`
@ -128,6 +129,7 @@ Possible parameters are:
* `open_date` * `open_date`
* `stake_amount` * `stake_amount`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `order_type` * `order_type`
* `current_rate` * `current_rate`
@ -146,6 +148,7 @@ Possible parameters are:
* `open_date` * `open_date`
* `stake_amount` * `stake_amount`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `order_type` * `order_type`
* `current_rate` * `current_rate`
@ -166,6 +169,7 @@ Possible parameters are:
* `profit_amount` * `profit_amount`
* `profit_ratio` * `profit_ratio`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `sell_reason` * `sell_reason`
* `order_type` * `order_type`
@ -188,6 +192,7 @@ Possible parameters are:
* `profit_amount` * `profit_amount`
* `profit_ratio` * `profit_ratio`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `sell_reason` * `sell_reason`
* `order_type` * `order_type`
@ -210,6 +215,7 @@ Possible parameters are:
* `profit_amount` * `profit_amount`
* `profit_ratio` * `profit_ratio`
* `stake_currency` * `stake_currency`
* `base_currency`
* `fiat_currency` * `fiat_currency`
* `sell_reason` * `sell_reason`
* `order_type` * `order_type`

View File

@ -60,6 +60,10 @@ class RPCManager:
} }
""" """
logger.info('Sending rpc message: %s', msg) logger.info('Sending rpc message: %s', msg)
if 'pair' in msg:
msg.update({
'base_currency': self._rpc._freqtrade.exchange.get_pair_base_currency(msg['pair'])
})
for mod in self.registered_modules: for mod in self.registered_modules:
logger.debug('Forwarding message to rpc.%s', mod.name) logger.debug('Forwarding message to rpc.%s', mod.name)
try: try:

View File

@ -952,6 +952,7 @@ def test_telegram_forcesell_handle(default_conf, update, ticker, fee,
'profit_amount': 6.314e-05, 'profit_amount': 6.314e-05,
'profit_ratio': 0.0629778, 'profit_ratio': 0.0629778,
'stake_currency': 'BTC', 'stake_currency': 'BTC',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'buy_tag': ANY, 'buy_tag': ANY,
'sell_reason': SellType.FORCE_SELL.value, 'sell_reason': SellType.FORCE_SELL.value,
@ -1016,6 +1017,7 @@ def test_telegram_forcesell_down_handle(default_conf, update, ticker, fee,
'profit_amount': -5.497e-05, 'profit_amount': -5.497e-05,
'profit_ratio': -0.05482878, 'profit_ratio': -0.05482878,
'stake_currency': 'BTC', 'stake_currency': 'BTC',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'buy_tag': ANY, 'buy_tag': ANY,
'sell_reason': SellType.FORCE_SELL.value, 'sell_reason': SellType.FORCE_SELL.value,
@ -1070,6 +1072,7 @@ def test_forcesell_all_handle(default_conf, update, ticker, fee, mocker) -> None
'profit_amount': -4.09e-06, 'profit_amount': -4.09e-06,
'profit_ratio': -0.00408133, 'profit_ratio': -0.00408133,
'stake_currency': 'BTC', 'stake_currency': 'BTC',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'buy_tag': ANY, 'buy_tag': ANY,
'sell_reason': SellType.FORCE_SELL.value, 'sell_reason': SellType.FORCE_SELL.value,