From 1dfbf6eed646b6fe3575d8703f0f101053f3aad9 Mon Sep 17 00:00:00 2001 From: Misagh Date: Sun, 24 Mar 2019 22:36:33 +0100 Subject: [PATCH 01/13] darfting edge rpc messages --- freqtrade/rpc/rpc.py | 15 +++++++++++++++ freqtrade/rpc/telegram.py | 23 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index a0ffff107..3c0fbeba9 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -460,3 +460,18 @@ class RPC(object): 'whitelist': self._freqtrade.active_pair_whitelist } return res + + def _rpc_edge(self) -> Dict: + """ Returns information related to Edge """ + if not self._freqtrade.edge: + raise RPCException(f'Edge is not enabled.') + + for pair in self._freqtrade.edge._cached_pairs: + res = { + 'pair': pair, + 'winrate': self._freqtrade.edge._cached_pairs[pair].winrate, + 'expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy, + 'stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss, + } + + return res diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 6771ec803..edc380f92 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -470,6 +470,29 @@ class Telegram(RPC): except RPCException as e: self._send_msg(str(e), bot=bot) + @authorized_only + def _edge(self, bot: Bot, update: Update) -> None: + """ + Handler for /edge + Shows informaton related to Edge + """ + try: + edge_pairs = self._rpc_edge() + edge_pairs_tab = tabulate(edge_pairs, + headers=[ + 'Pair', + f'Winrate', + f'Expectancy', + f'Stoploss' + ], + tablefmt='simple') + + message = f'Edge only validated following pairs:\n
{edge_pairs_tab}
' + self._send_msg(message, bot=bot, parse_mode=ParseMode.HTML) + except RPCException as e: + self._send_msg(str(e), bot=bot) + + @authorized_only def _help(self, bot: Bot, update: Update) -> None: """ From a8be277ca022ddf9f41e32a904e3490101e9b6c2 Mon Sep 17 00:00:00 2001 From: Misagh Date: Sun, 24 Mar 2019 22:56:42 +0100 Subject: [PATCH 02/13] cached pairs iteration fixed + help added --- freqtrade/rpc/rpc.py | 16 ++++++++-------- freqtrade/rpc/telegram.py | 13 ++++--------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 3c0fbeba9..fb06c7d86 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -466,12 +466,12 @@ class RPC(object): if not self._freqtrade.edge: raise RPCException(f'Edge is not enabled.') - for pair in self._freqtrade.edge._cached_pairs: - res = { - 'pair': pair, - 'winrate': self._freqtrade.edge._cached_pairs[pair].winrate, - 'expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy, - 'stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss, + return [ + { + 'Pair': pair, + 'Winrate': self._freqtrade.edge._cached_pairs[pair].winrate, + 'Expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy, + 'Stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss, } - - return res + for pair in self._freqtrade.edge._cached_pairs + ] diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index edc380f92..64c35078d 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -93,6 +93,7 @@ class Telegram(RPC): CommandHandler('reload_conf', self._reload_conf), CommandHandler('stopbuy', self._stopbuy), CommandHandler('whitelist', self._whitelist), + CommandHandler('edge', self._edge), CommandHandler('help', self._help), CommandHandler('version', self._version), ] @@ -478,15 +479,8 @@ class Telegram(RPC): """ try: edge_pairs = self._rpc_edge() - edge_pairs_tab = tabulate(edge_pairs, - headers=[ - 'Pair', - f'Winrate', - f'Expectancy', - f'Stoploss' - ], - tablefmt='simple') - + print(edge_pairs) + edge_pairs_tab = tabulate(edge_pairs, headers='keys', tablefmt='simple') message = f'Edge only validated following pairs:\n
{edge_pairs_tab}
' self._send_msg(message, bot=bot, parse_mode=ParseMode.HTML) except RPCException as e: @@ -520,6 +514,7 @@ class Telegram(RPC): "*/stopbuy:* `Stops buying, but handles open trades gracefully` \n" \ "*/reload_conf:* `Reload configuration file` \n" \ "*/whitelist:* `Show current whitelist` \n" \ + "*/edge:* `Shows validated pairs by Edge if it is enabeld` \n" \ "*/help:* `This help message`\n" \ "*/version:* `Show version`" From fd7278517dd7613c9ce7f0f4ba72b24ad4ed21c9 Mon Sep 17 00:00:00 2001 From: Misagh Date: Mon, 25 Mar 2019 09:48:41 +0100 Subject: [PATCH 03/13] using items() --- freqtrade/rpc/rpc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index fb06c7d86..6416a97eb 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -468,10 +468,10 @@ class RPC(object): return [ { - 'Pair': pair, - 'Winrate': self._freqtrade.edge._cached_pairs[pair].winrate, - 'Expectancy': self._freqtrade.edge._cached_pairs[pair].expectancy, - 'Stoploss': self._freqtrade.edge._cached_pairs[pair].stoploss, + 'Pair': k, + 'Winrate': v.winrate, + 'Expectancy': v.expectancy, + 'Stoploss': v.stoploss, } - for pair in self._freqtrade.edge._cached_pairs + for k, v in self._freqtrade.edge._cached_pairs.items() ] From 66f1e0f4cd82597305bfa5ff74d8224973fd1338 Mon Sep 17 00:00:00 2001 From: Misagh Date: Mon, 25 Mar 2019 10:25:07 +0100 Subject: [PATCH 04/13] help added --- docs/telegram-usage.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md index 2f7e9ada8..6788bec90 100644 --- a/docs/telegram-usage.md +++ b/docs/telegram-usage.md @@ -30,6 +30,7 @@ official commands. You can ask at any moment for help with `/help`. | `/daily ` | 7 | Shows profit or loss per day, over the last n days | `/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. | `/help` | | Show help message | `/version` | | Show version @@ -55,7 +56,7 @@ Prevents the bot from opening new trades by temporarily setting "max_open_trades After this, give the bot time to close off open trades (can be checked via `/status table`). Once all positions are sold, run `/stop` to completely stop the bot. -`/reload_conf` resets "max_open_trades" to the value set in the configuration and resets this command. +`/reload_conf` resets "max_open_trades" to the value set in the configuration and resets this command. !!! warning The stop-buy signal is ONLY active while the bot is running, and is not persisted anyway, so restarting the bot will cause this to reset. @@ -166,7 +167,7 @@ Day Profit BTC Profit USD Shows the current whitelist -> Using whitelist `StaticPairList` with 22 pairs +> Using whitelist `StaticPairList` with 22 pairs > `IOTA/BTC, NEO/BTC, TRX/BTC, VET/BTC, ADA/BTC, ETC/BTC, NCASH/BTC, DASH/BTC, XRP/BTC, XVG/BTC, EOS/BTC, LTC/BTC, OMG/BTC, BTG/BTC, LSK/BTC, ZEC/BTC, HOT/BTC, IOTX/BTC, XMR/BTC, AST/BTC, XLM/BTC, NANO/BTC` ### /blacklist [pair] @@ -176,7 +177,7 @@ If Pair is set, then this pair will be added to the pairlist. Also supports multiple pairs, seperated by a space. Use `/reload_conf` to reset the blacklist. -> Using blacklist `StaticPairList` with 2 pairs +> Using blacklist `StaticPairList` with 2 pairs >`DODGE/BTC`, `HOT/BTC`. ### /version From 4e57969e4e2d3e1d49967f46844e744f2f6e2b8d Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 27 Mar 2019 12:54:00 +0100 Subject: [PATCH 05/13] documentation added --- docs/telegram-usage.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md index 6788bec90..fa10969db 100644 --- a/docs/telegram-usage.md +++ b/docs/telegram-usage.md @@ -180,6 +180,21 @@ Use `/reload_conf` to reset the blacklist. > Using blacklist `StaticPairList` with 2 pairs >`DODGE/BTC`, `HOT/BTC`. +### /edge + +Shows pairs accepted by pais along with their corresponding winrate, expectancy and stoploss values. + +> **Edge only validated following pairs:** +``` +Pair Winrate Expectancy Stoploss +-------- --------- ------------ ---------- +DOCK/ETH 0.522727 0.881821 -0.03 +PHX/ETH 0.677419 0.560488 -0.03 +HOT/ETH 0.733333 0.490492 -0.03 +HC/ETH 0.588235 0.280988 -0.02 +ARDR/ETH 0.366667 0.143059 -0.01 +``` + ### /version > **Version:** `0.14.3` From 955e2d28262fd8572cd8983196a0a0bcbdd099f6 Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 27 Mar 2019 12:59:59 +0100 Subject: [PATCH 06/13] Update test_rpc_telegram.py telegram test_init fixed --- freqtrade/tests/rpc/test_rpc_telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/tests/rpc/test_rpc_telegram.py b/freqtrade/tests/rpc/test_rpc_telegram.py index dd49b0000..24e99b1c5 100644 --- a/freqtrade/tests/rpc/test_rpc_telegram.py +++ b/freqtrade/tests/rpc/test_rpc_telegram.py @@ -74,7 +74,7 @@ def test_init(default_conf, mocker, caplog) -> None: message_str = "rpc.telegram is listening for following commands: [['status'], ['profit'], " \ "['balance'], ['start'], ['stop'], ['forcesell'], ['forcebuy'], " \ "['performance'], ['daily'], ['count'], ['reload_conf'], " \ - "['stopbuy'], ['whitelist'], ['blacklist'], ['help'], ['version']]" + "['stopbuy'], ['whitelist'], ['blacklist'], ['edge'], ['help'], ['version']]" assert log_has(message_str, caplog.record_tuples) From 8641da13b908747d49b0b5f39610e8cd104ecdfd Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 27 Mar 2019 14:02:37 +0100 Subject: [PATCH 07/13] added RPC tests in case of edge enabled/disabled --- freqtrade/tests/rpc/test_rpc.py | 36 ++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/freqtrade/tests/rpc/test_rpc.py b/freqtrade/tests/rpc/test_rpc.py index e6f7ea41e..a5ee4a26c 100644 --- a/freqtrade/tests/rpc/test_rpc.py +++ b/freqtrade/tests/rpc/test_rpc.py @@ -2,19 +2,20 @@ # pragma pylint: disable=invalid-sequence-index, invalid-name, too-many-arguments from datetime import datetime -from unittest.mock import MagicMock, ANY, PropertyMock +from unittest.mock import ANY, MagicMock, PropertyMock import pytest from numpy import isnan -from freqtrade import TemporaryError, DependencyException +from freqtrade import DependencyException, TemporaryError +from freqtrade.edge import PairInfo from freqtrade.freqtradebot import FreqtradeBot from freqtrade.persistence import Trade from freqtrade.rpc import RPC, RPCException from freqtrade.rpc.fiat_convert import CryptoToFiatConverter from freqtrade.state import State -from freqtrade.tests.test_freqtradebot import patch_get_signal from freqtrade.tests.conftest import patch_coinmarketcap, patch_exchange +from freqtrade.tests.test_freqtradebot import patch_get_signal # Functions for recurrent object patching @@ -713,3 +714,32 @@ def test_rpc_blacklist(mocker, default_conf) -> None: assert len(ret['blacklist']) == 3 assert ret['blacklist'] == default_conf['exchange']['pair_blacklist'] assert ret['blacklist'] == ['DOGE/BTC', 'HOT/BTC', 'ETH/BTC'] + +def test_rpc_edge_disabled(mocker, default_conf) -> None: + patch_coinmarketcap(mocker) + patch_exchange(mocker) + mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock()) + freqtradebot = FreqtradeBot(default_conf) + rpc = RPC(freqtradebot) + with pytest.raises(RPCException, match=r'Edge is not enabled.'): + ret = rpc._rpc_edge() + +def test_rpc_edge_enabled(mocker, edge_conf) -> None: + patch_coinmarketcap(mocker) + patch_exchange(mocker) + mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock()) + mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock( + return_value={ + 'E/F': PairInfo(-0.02, 0.66, 3.71, 0.50, 1.71, 10, 60), + } + )) + freqtradebot = FreqtradeBot(edge_conf) + + rpc = RPC(freqtradebot) + ret = rpc._rpc_edge() + + assert len(ret) == 1 + assert ret[0]['Pair'] == 'E/F' + assert ret[0]['Winrate'] == 0.66 + assert ret[0]['Expectancy'] == 1.71 + assert ret[0]['Stoploss'] == -0.02 \ No newline at end of file From 0687051ffbd86b821cfdccb228680f6d51df1bd7 Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 27 Mar 2019 14:04:33 +0100 Subject: [PATCH 08/13] Update test_rpc.py flake8 --- freqtrade/tests/rpc/test_rpc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/tests/rpc/test_rpc.py b/freqtrade/tests/rpc/test_rpc.py index a5ee4a26c..8e8e7fc50 100644 --- a/freqtrade/tests/rpc/test_rpc.py +++ b/freqtrade/tests/rpc/test_rpc.py @@ -715,6 +715,7 @@ def test_rpc_blacklist(mocker, default_conf) -> None: assert ret['blacklist'] == default_conf['exchange']['pair_blacklist'] assert ret['blacklist'] == ['DOGE/BTC', 'HOT/BTC', 'ETH/BTC'] + def test_rpc_edge_disabled(mocker, default_conf) -> None: patch_coinmarketcap(mocker) patch_exchange(mocker) @@ -722,7 +723,8 @@ def test_rpc_edge_disabled(mocker, default_conf) -> None: freqtradebot = FreqtradeBot(default_conf) rpc = RPC(freqtradebot) with pytest.raises(RPCException, match=r'Edge is not enabled.'): - ret = rpc._rpc_edge() + rpc._rpc_edge() + def test_rpc_edge_enabled(mocker, edge_conf) -> None: patch_coinmarketcap(mocker) @@ -742,4 +744,4 @@ def test_rpc_edge_enabled(mocker, edge_conf) -> None: assert ret[0]['Pair'] == 'E/F' assert ret[0]['Winrate'] == 0.66 assert ret[0]['Expectancy'] == 1.71 - assert ret[0]['Stoploss'] == -0.02 \ No newline at end of file + assert ret[0]['Stoploss'] == -0.02 From 4038cdf70a25deae3ab1f50399dbd7cbd94d34ce Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 27 Mar 2019 16:04:05 +0100 Subject: [PATCH 09/13] "Edge" test for rpc telegram --- freqtrade/tests/rpc/test_rpc_telegram.py | 47 ++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/freqtrade/tests/rpc/test_rpc_telegram.py b/freqtrade/tests/rpc/test_rpc_telegram.py index 24e99b1c5..8118266cc 100644 --- a/freqtrade/tests/rpc/test_rpc_telegram.py +++ b/freqtrade/tests/rpc/test_rpc_telegram.py @@ -13,16 +13,16 @@ from telegram import Chat, Message, Update from telegram.error import NetworkError from freqtrade import __version__ +from freqtrade.edge import PairInfo from freqtrade.freqtradebot import FreqtradeBot from freqtrade.persistence import Trade from freqtrade.rpc import RPCMessageType from freqtrade.rpc.telegram import Telegram, authorized_only -from freqtrade.strategy.interface import SellType from freqtrade.state import State +from freqtrade.strategy.interface import SellType from freqtrade.tests.conftest import (get_patched_freqtradebot, log_has, - patch_exchange) + patch_coinmarketcap, patch_exchange) from freqtrade.tests.test_freqtradebot import patch_get_signal -from freqtrade.tests.conftest import patch_coinmarketcap class DummyCls(Telegram): @@ -1099,6 +1099,47 @@ def test_blacklist_static(default_conf, update, mocker) -> None: assert freqtradebot.pairlists.blacklist == ["DOGE/BTC", "HOT/BTC", "ETH/BTC"] +def test_edge_disabled(default_conf, update, mocker) -> None: + patch_coinmarketcap(mocker) + msg_mock = MagicMock() + mocker.patch.multiple( + 'freqtrade.rpc.telegram.Telegram', + _init=MagicMock(), + _send_msg=msg_mock + ) + + freqtradebot = get_patched_freqtradebot(mocker, default_conf) + + telegram = Telegram(freqtradebot) + + telegram._edge(bot=MagicMock(), update=update) + assert msg_mock.call_count == 1 + assert "Edge is not enabled." in msg_mock.call_args_list[0][0][0] + + +def test_edge_enabled(edge_conf, update, mocker) -> None: + patch_coinmarketcap(mocker) + msg_mock = MagicMock() + mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock( + return_value={ + 'E/F': PairInfo(-0.01, 0.66, 3.71, 0.50, 1.71, 10, 60), + } + )) + mocker.patch.multiple( + 'freqtrade.rpc.telegram.Telegram', + _init=MagicMock(), + _send_msg=msg_mock + ) + + freqtradebot = get_patched_freqtradebot(mocker, edge_conf) + + telegram = Telegram(freqtradebot) + + telegram._edge(bot=MagicMock(), update=update) + assert msg_mock.call_count == 1 + assert 'Edge only validated following pairs:\n
' in msg_mock.call_args_list[0][0][0]
+    assert 'Pair      Winrate    Expectancy    Stoploss' in msg_mock.call_args_list[0][0][0]
+
 def test_help_handle(default_conf, update, mocker) -> None:
     patch_coinmarketcap(mocker)
     msg_mock = MagicMock()

From 1e37d8ccb3266be217847865e4fa9154d3d83583 Mon Sep 17 00:00:00 2001
From: Misagh 
Date: Wed, 27 Mar 2019 16:58:53 +0100
Subject: [PATCH 10/13] flake8

---
 freqtrade/tests/rpc/test_rpc_telegram.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/freqtrade/tests/rpc/test_rpc_telegram.py b/freqtrade/tests/rpc/test_rpc_telegram.py
index 8118266cc..c6a5fff54 100644
--- a/freqtrade/tests/rpc/test_rpc_telegram.py
+++ b/freqtrade/tests/rpc/test_rpc_telegram.py
@@ -1140,6 +1140,7 @@ def test_edge_enabled(edge_conf, update, mocker) -> None:
     assert 'Edge only validated following pairs:\n
' in msg_mock.call_args_list[0][0][0]
     assert 'Pair      Winrate    Expectancy    Stoploss' in msg_mock.call_args_list[0][0][0]
 
+
 def test_help_handle(default_conf, update, mocker) -> None:
     patch_coinmarketcap(mocker)
     msg_mock = MagicMock()

From 753b03d581d2f435f70c44ca96fcbcd4589a45a7 Mon Sep 17 00:00:00 2001
From: Misagh 
Date: Wed, 27 Mar 2019 18:19:42 +0100
Subject: [PATCH 11/13] rolback on removing MD whitespaces

---
 docs/telegram-usage.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md
index fa10969db..d68183537 100644
--- a/docs/telegram-usage.md
+++ b/docs/telegram-usage.md
@@ -56,7 +56,7 @@ Prevents the bot from opening new trades by temporarily setting "max_open_trades
 After this, give the bot time to close off open trades (can be checked via `/status table`).
 Once all positions are sold, run `/stop` to completely stop the bot.
 
-`/reload_conf` resets "max_open_trades" to the value set in the configuration and resets this command.
+`/reload_conf` resets "max_open_trades" to the value set in the configuration and resets this command. 
 
 !!! warning
    The stop-buy signal is ONLY active while the bot is running, and is not persisted anyway, so restarting the bot will cause this to reset.
@@ -167,7 +167,7 @@ Day         Profit BTC      Profit USD
 
 Shows the current whitelist
 
-> Using whitelist `StaticPairList` with 22 pairs
+> Using whitelist `StaticPairList` with 22 pairs  
 > `IOTA/BTC, NEO/BTC, TRX/BTC, VET/BTC, ADA/BTC, ETC/BTC, NCASH/BTC, DASH/BTC, XRP/BTC, XVG/BTC, EOS/BTC, LTC/BTC, OMG/BTC, BTG/BTC, LSK/BTC, ZEC/BTC, HOT/BTC, IOTX/BTC, XMR/BTC, AST/BTC, XLM/BTC, NANO/BTC`
 
 ### /blacklist [pair]
@@ -177,7 +177,7 @@ If Pair is set, then this pair will be added to the pairlist.
 Also supports multiple pairs, seperated by a space.
 Use `/reload_conf` to reset the blacklist.
 
-> Using blacklist `StaticPairList` with 2 pairs
+> Using blacklist `StaticPairList` with 2 pairs  
 >`DODGE/BTC`, `HOT/BTC`.
 
 ### /edge

From 4d9ca71c82c08270d8fcb8c102c1c52670c60f9e Mon Sep 17 00:00:00 2001
From: Misagh 
Date: Wed, 27 Mar 2019 21:20:09 +0100
Subject: [PATCH 12/13] shifting edge help message a line lower

---
 freqtrade/rpc/telegram.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py
index 553f1a1fb..919c45757 100644
--- a/freqtrade/rpc/telegram.py
+++ b/freqtrade/rpc/telegram.py
@@ -533,8 +533,8 @@ class Telegram(RPC):
                   "*/reload_conf:* `Reload configuration file` \n" \
                   "*/whitelist:* `Show current whitelist` \n" \
                   "*/blacklist [pair]:* `Show current blacklist, or adds one or more pairs " \
-                  "*/edge:* `Shows validated pairs by Edge if it is enabeld` \n" \
                   "to the blacklist.` \n" \
+                  "*/edge:* `Shows validated pairs by Edge if it is enabeld` \n" \
                   "*/help:* `This help message`\n" \
                   "*/version:* `Show version`"
 

From e5406ed3cfe41d75a8381ab5112c80451023bf03 Mon Sep 17 00:00:00 2001
From: Misagh 
Date: Wed, 27 Mar 2019 21:22:25 +0100
Subject: [PATCH 13/13] typo in docs and comments

---
 docs/telegram-usage.md    | 2 +-
 freqtrade/rpc/telegram.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/telegram-usage.md b/docs/telegram-usage.md
index d68183537..1ca61e54a 100644
--- a/docs/telegram-usage.md
+++ b/docs/telegram-usage.md
@@ -182,7 +182,7 @@ Use `/reload_conf` to reset the blacklist.
 
 ### /edge
 
-Shows pairs accepted by pais along with their corresponding winrate, expectancy and stoploss values.
+Shows pairs validated by Edge along with their corresponding winrate, expectancy and stoploss values.
 
 > **Edge only validated following pairs:**
 ```
diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py
index 919c45757..06bf5efe9 100644
--- a/freqtrade/rpc/telegram.py
+++ b/freqtrade/rpc/telegram.py
@@ -494,7 +494,7 @@ class Telegram(RPC):
     def _edge(self, bot: Bot, update: Update) -> None:
         """
         Handler for /edge
-        Shows informaton related to Edge
+        Shows information related to Edge
         """
         try:
             edge_pairs = self._rpc_edge()