Remove pair market url
This commit is contained in:
parent
ee0e381d65
commit
6c75b8a36a
@ -654,16 +654,6 @@ class Exchange(object):
|
||||
except ccxt.BaseError as e:
|
||||
raise OperationalException(e)
|
||||
|
||||
def get_pair_detail_url(self, pair: str) -> str:
|
||||
try:
|
||||
url_base = self._api.urls.get('www')
|
||||
base, quote = pair.split('/')
|
||||
|
||||
return url_base + _EXCHANGE_URLS[self._api.id].format(base=base, quote=quote)
|
||||
except KeyError:
|
||||
logger.warning('Could not get exchange url for %s', self.name)
|
||||
return ""
|
||||
|
||||
@retrier
|
||||
def get_markets(self) -> List[dict]:
|
||||
try:
|
||||
|
@ -376,7 +376,6 @@ class FreqtradeBot(object):
|
||||
:return: None
|
||||
"""
|
||||
pair_s = pair.replace('_', '/')
|
||||
pair_url = self.exchange.get_pair_detail_url(pair)
|
||||
stake_currency = self.config['stake_currency']
|
||||
fiat_currency = self.config.get('fiat_display_currency', None)
|
||||
time_in_force = self.strategy.order_time_in_force['buy']
|
||||
@ -441,7 +440,6 @@ class FreqtradeBot(object):
|
||||
'type': RPCMessageType.BUY_NOTIFICATION,
|
||||
'exchange': self.exchange.name.capitalize(),
|
||||
'pair': pair_s,
|
||||
'market_url': pair_url,
|
||||
'limit': buy_limit_filled_price,
|
||||
'stake_amount': stake_amount,
|
||||
'stake_currency': stake_currency,
|
||||
@ -849,7 +847,6 @@ class FreqtradeBot(object):
|
||||
profit_trade = trade.calc_profit(rate=limit)
|
||||
current_rate = self.exchange.get_ticker(trade.pair)['bid']
|
||||
profit_percent = trade.calc_profit_percent(limit)
|
||||
pair_url = self.exchange.get_pair_detail_url(trade.pair)
|
||||
gain = "profit" if profit_percent > 0 else "loss"
|
||||
|
||||
msg = {
|
||||
@ -857,7 +854,6 @@ class FreqtradeBot(object):
|
||||
'exchange': trade.exchange.capitalize(),
|
||||
'pair': trade.pair,
|
||||
'gain': gain,
|
||||
'market_url': pair_url,
|
||||
'limit': limit,
|
||||
'amount': trade.amount,
|
||||
'open_rate': trade.open_rate,
|
||||
|
@ -103,7 +103,6 @@ class RPC(object):
|
||||
results.append(dict(
|
||||
trade_id=trade.id,
|
||||
pair=trade.pair,
|
||||
market_url=self._freqtrade.exchange.get_pair_detail_url(trade.pair),
|
||||
date=arrow.get(trade.open_date),
|
||||
open_rate=trade.open_rate,
|
||||
close_rate=trade.close_rate,
|
||||
|
@ -125,7 +125,7 @@ class Telegram(RPC):
|
||||
else:
|
||||
msg['stake_amount_fiat'] = 0
|
||||
|
||||
message = ("*{exchange}:* Buying [{pair}]({market_url})\n"
|
||||
message = ("*{exchange}:* Buying {pair}\n"
|
||||
"with limit `{limit:.8f}\n"
|
||||
"({stake_amount:.6f} {stake_currency}").format(**msg)
|
||||
|
||||
@ -137,7 +137,7 @@ class Telegram(RPC):
|
||||
msg['amount'] = round(msg['amount'], 8)
|
||||
msg['profit_percent'] = round(msg['profit_percent'] * 100, 2)
|
||||
|
||||
message = ("*{exchange}:* Selling [{pair}]({market_url})\n"
|
||||
message = ("*{exchange}:* Selling {pair}\n"
|
||||
"*Limit:* `{limit:.8f}`\n"
|
||||
"*Amount:* `{amount:.8f}`\n"
|
||||
"*Open Rate:* `{open_rate:.8f}`\n"
|
||||
@ -193,7 +193,7 @@ class Telegram(RPC):
|
||||
|
||||
messages = [
|
||||
"*Trade ID:* `{trade_id}`\n"
|
||||
"*Current Pair:* [{pair}]({market_url})\n"
|
||||
"*Current Pair:* {pair}\n"
|
||||
"*Open Since:* `{date}`\n"
|
||||
"*Amount:* `{amount}`\n"
|
||||
"*Open Rate:* `{open_rate:.8f}`\n"
|
||||
|
Loading…
Reference in New Issue
Block a user