gateio, ftx and binance all use same funding fee formula

This commit is contained in:
Sam Germain
2021-10-09 12:49:00 -06:00
parent badc0fa445
commit ef8b617eb2
6 changed files with 14 additions and 90 deletions

View File

@@ -342,14 +342,6 @@ def test__set_leverage_binance(mocker, default_conf):
)
def test_get_funding_rate():
return
def test__get_funding_fee():
return
@pytest.mark.asyncio
async def test__async_get_historic_ohlcv_binance(default_conf, mocker, caplog):
ohlcv = [

View File

@@ -3292,3 +3292,11 @@ def test_get_funding_fee_dates():
def test_calculate_funding_fees():
return
def test__get_funding_rate(default_conf, mocker):
return
def test__get_funding_fee():
return

View File

@@ -1,4 +1,3 @@
from datetime import datetime, timedelta
from random import randint
from unittest.mock import MagicMock
@@ -268,18 +267,3 @@ def test_fill_leverage_brackets_ftx(default_conf, mocker):
exchange = get_patched_exchange(mocker, default_conf, id="ftx")
exchange.fill_leverage_brackets()
assert exchange._leverage_brackets == {}
@pytest.mark.parametrize("pair,when", [
('XRP/USDT', datetime.utcnow()),
('ADA/BTC', datetime.utcnow()),
('XRP/USDT', datetime.utcnow() - timedelta(hours=30)),
])
def test__get_funding_rate(default_conf, mocker, pair, when):
api_mock = MagicMock()
exchange = get_patched_exchange(mocker, default_conf, api_mock, id="ftx")
assert exchange._get_funding_rate(pair, when) is None
def test__get_funding_fee():
return