Use exchange id for Trade and exchange name for RPC

This commit is contained in:
enenn 2018-03-26 11:31:17 +02:00
parent 7a074f21bd
commit a9ba0981c7
2 changed files with 6 additions and 6 deletions

View File

@ -308,7 +308,7 @@ class FreqtradeBot(object):
self.rpc.send_msg(
'*{}:* Buying [{}]({}) with limit `{:.8f} ({:.6f} {}, {:.3f} {})` '
.format(
exchange.get_name().upper(),
exchange.get_name(),
pair.replace('_', '/'),
exchange.get_pair_detail_url(pair),
buy_limit,
@ -326,7 +326,7 @@ class FreqtradeBot(object):
fee=exchange.get_fee_maker(),
open_rate=buy_limit,
open_date=datetime.utcnow(),
exchange=exchange.get_name().upper(),
exchange=exchange.get_id(),
open_order_id=order_id
)
Trade.session.add(trade)

View File

@ -792,7 +792,7 @@ def test_check_handle_timedout_buy(default_conf, ticker, limit_buy_order_old, mo
trade_buy = Trade(
pair='ETH/BTC',
open_rate=0.00001099,
exchange='BITTREX',
exchange='bittrex',
open_order_id='123456789',
amount=90.99181073,
fee=0.0,
@ -831,7 +831,7 @@ def test_check_handle_timedout_sell(default_conf, ticker, limit_sell_order_old,
trade_sell = Trade(
pair='ETH/BTC',
open_rate=0.00001099,
exchange='BITTREX',
exchange='bittrex',
open_order_id='123456789',
amount=90.99181073,
fee=0.0,
@ -870,7 +870,7 @@ def test_check_handle_timedout_partial(default_conf, ticker, limit_buy_order_old
trade_buy = Trade(
pair='ETH/BTC',
open_rate=0.00001099,
exchange='BITTREX',
exchange='bittrex',
open_order_id='123456789',
amount=90.99181073,
fee=0.0,
@ -917,7 +917,7 @@ def test_check_handle_timedout_exception(default_conf, ticker, mocker, caplog) -
trade_buy = Trade(
pair='ETH/BTC',
open_rate=0.00001099,
exchange='BITTREX',
exchange='bittrex',
open_order_id='123456789',
amount=90.99181073,
fee=0.0,