Fix the fee calculation

This commit is contained in:
Gerald Lonlas
2017-12-17 13:07:56 -08:00
parent 642422d5c4
commit d613d63fdc
9 changed files with 344 additions and 83 deletions

View File

@@ -15,7 +15,7 @@ def default_conf():
configuration = {
"max_open_trades": 1,
"stake_currency": "BTC",
"stake_amount": 0.05,
"stake_amount": 0.001,
"dry_run": True,
"minimal_roi": {
"40": 0.0,
@@ -61,11 +61,26 @@ def update():
@pytest.fixture
def ticker():
return MagicMock(return_value={
'bid': 0.07256061,
'ask': 0.072661,
'last': 0.07256061,
'bid': 0.00001098,
'ask': 0.00001099,
'last': 0.00001098,
})
@pytest.fixture
def ticker_sell_up():
return MagicMock(return_value={
'bid': 0.00001172,
'ask': 0.00001173,
'last': 0.00001172,
})
@pytest.fixture
def ticker_sell_down():
return MagicMock(return_value={
'bid': 0.00001044,
'ask': 0.00001043,
'last': 0.00001044,
})
@pytest.fixture
def health():
@@ -104,8 +119,8 @@ def limit_buy_order():
'type': 'LIMIT_BUY',
'pair': 'mocked',
'opened': datetime.utcnow(),
'rate': 0.07256061,
'amount': 206.43811673387373,
'rate': 0.00001099,
'amount': 90.99181073,
'remaining': 0.0,
'closed': datetime.utcnow(),
}
@@ -118,8 +133,8 @@ def limit_sell_order():
'type': 'LIMIT_SELL',
'pair': 'mocked',
'opened': datetime.utcnow(),
'rate': 0.0802134,
'amount': 206.43811673387373,
'rate': 0.00001173,
'amount': 90.99181073,
'remaining': 0.0,
'closed': datetime.utcnow(),
}
@@ -155,4 +170,4 @@ def ticker_history():
"T": "2017-11-26T09:00:00",
"BV": 0.7039405
}
]
]