no need to "abs" cost will be fixed in ccxt
This commit is contained in:
parent
f509959bd4
commit
d244391860
@ -66,7 +66,7 @@ class Gateio(Exchange):
|
|||||||
if pair_fees.get(takerOrMaker) is not None:
|
if pair_fees.get(takerOrMaker) is not None:
|
||||||
trades[idx]['fee'] = {
|
trades[idx]['fee'] = {
|
||||||
'currency': self.get_pair_quote_currency(pair),
|
'currency': self.get_pair_quote_currency(pair),
|
||||||
'cost': abs(trade['cost']) * pair_fees[takerOrMaker],
|
'cost': trade['cost'] * pair_fees[takerOrMaker],
|
||||||
'rate': pair_fees[takerOrMaker],
|
'rate': pair_fees[takerOrMaker],
|
||||||
}
|
}
|
||||||
return trades
|
return trades
|
||||||
|
@ -73,10 +73,10 @@ def test_stoploss_adjust_gateio(mocker, default_conf, sl1, sl2, sl3, side):
|
|||||||
assert exchange.stoploss_adjust(sl1, order, side)
|
assert exchange.stoploss_adjust(sl1, order, side)
|
||||||
assert not exchange.stoploss_adjust(sl2, order, side)
|
assert not exchange.stoploss_adjust(sl2, order, side)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('takerormaker,rate,cost', [
|
@pytest.mark.parametrize('takerormaker,rate,cost', [
|
||||||
('taker', 0.0005, 0.0001554325),
|
('taker', 0.0005, 0.0001554325),
|
||||||
('maker', 0.0, 0.0),
|
('maker', 0.0, 0.0),
|
||||||
|
|
||||||
])
|
])
|
||||||
def test_fetch_my_trades_gateio(mocker, default_conf, takerormaker, rate, cost):
|
def test_fetch_my_trades_gateio(mocker, default_conf, takerormaker, rate, cost):
|
||||||
mocker.patch('freqtrade.exchange.Exchange.exchange_has', return_value=True)
|
mocker.patch('freqtrade.exchange.Exchange.exchange_has', return_value=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user