Skip to content

Commit

Permalink
Add documentation for fill messages
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Apr 20, 2021
1 parent d740aae commit efbe084
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion docs/telegram-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,19 @@ Example configuration showing the different settings:
"buy": "silent",
"sell": "on",
"buy_cancel": "silent",
"sell_cancel": "on"
"sell_cancel": "on",
"buy_fill": "off",
"sell_fill": "off"
},
"balance_dust_level": 0.01
},
```

`buy` notifications are sent when the order is placed, while `buy_fill` notifications are sent when the order is filled on the exchange.
`sell` notifications are sent when the order is placed, while `sell_fill` notifications are sent when the order is filled on the exchange.
`*_fill` notifications are off by default and must be explicitly enabled.


`balance_dust_level` will define what the `/balance` command takes as "dust" - Currencies with a balance below this will be shown.

## Create a custom keyboard (command shortcut buttons)
Expand Down
8 changes: 4 additions & 4 deletions tests/rpc/test_rpc_telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,8 +1335,8 @@ def test_send_msg_sell_cancel_notification(default_conf, mocker) -> None:
'reason': 'Cancelled on exchange'
})
assert msg_mock.call_args[0][0] \
== ('\N{WARNING SIGN} *Binance:* Cancelling Open Sell Order for KEY/ETH (#1).'
' Reason: Cancelled on exchange')
== ('\N{WARNING SIGN} *Binance:* Cancelling open sell Order for KEY/ETH (#1).'
' Reason: Cancelled on exchange.')

msg_mock.reset_mock()
telegram.send_msg({
Expand All @@ -1347,8 +1347,8 @@ def test_send_msg_sell_cancel_notification(default_conf, mocker) -> None:
'reason': 'timeout'
})
assert msg_mock.call_args[0][0] \
== ('\N{WARNING SIGN} *Binance:* Cancelling Open Sell Order for KEY/ETH (#1).'
' Reason: timeout')
== ('\N{WARNING SIGN} *Binance:* Cancelling open sell Order for KEY/ETH (#1).'
' Reason: timeout.')
# Reset singleton function to avoid random breaks
telegram._rpc._fiat_converter.convert_amount = old_convamount

Expand Down
2 changes: 1 addition & 1 deletion tests/test_freqtradebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ def test_check_handle_timedout_sell(default_conf, ticker, limit_sell_order_old,
# check it does cancel sell orders over the time limit
freqtrade.check_handle_timedout()
assert cancel_order_mock.call_count == 1
assert rpc_mock.call_count == 2
assert rpc_mock.call_count == 1
assert open_trade.is_open is True
# Custom user sell-timeout is never called
assert freqtrade.strategy.check_sell_timeout.call_count == 0
Expand Down

0 comments on commit efbe084

Please sign in to comment.