Update leverage tier terminology to be clear and aligned with ccxt

This commit is contained in:
Matthias
2022-08-26 19:34:51 +02:00
parent 53d46a0385
commit 753d1b2aad
6 changed files with 326 additions and 325 deletions

View File

@@ -376,96 +376,96 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
assert exchange._leverage_tiers == {
'ADA/BUSD': [
{
"min": 0,
"max": 100000,
"mmr": 0.025,
"lev": 20,
"minNotional": 0,
"maxNotional": 100000,
"maintenanceMarginRate": 0.025,
"maxLeverage": 20,
"maintAmt": 0.0
},
{
"min": 100000,
"max": 500000,
"mmr": 0.05,
"lev": 10,
"minNotional": 100000,
"maxNotional": 500000,
"maintenanceMarginRate": 0.05,
"maxLeverage": 10,
"maintAmt": 2500.0
},
{
"min": 500000,
"max": 1000000,
"mmr": 0.1,
"lev": 5,
"minNotional": 500000,
"maxNotional": 1000000,
"maintenanceMarginRate": 0.1,
"maxLeverage": 5,
"maintAmt": 27500.0
},
{
"min": 1000000,
"max": 2000000,
"mmr": 0.15,
"lev": 3,
"minNotional": 1000000,
"maxNotional": 2000000,
"maintenanceMarginRate": 0.15,
"maxLeverage": 3,
"maintAmt": 77500.0
},
{
"min": 2000000,
"max": 5000000,
"mmr": 0.25,
"lev": 2,
"minNotional": 2000000,
"maxNotional": 5000000,
"maintenanceMarginRate": 0.25,
"maxLeverage": 2,
"maintAmt": 277500.0
},
{
"min": 5000000,
"max": 30000000,
"mmr": 0.5,
"lev": 1,
"minNotional": 5000000,
"maxNotional": 30000000,
"maintenanceMarginRate": 0.5,
"maxLeverage": 1,
"maintAmt": 1527500.0
}
],
"ZEC/USDT": [
{
'min': 0,
'max': 50000,
'mmr': 0.01,
'lev': 50,
'minNotional': 0,
'maxNotional': 50000,
'maintenanceMarginRate': 0.01,
'maxLeverage': 50,
'maintAmt': 0.0
},
{
'min': 50000,
'max': 150000,
'mmr': 0.025,
'lev': 20,
'minNotional': 50000,
'maxNotional': 150000,
'maintenanceMarginRate': 0.025,
'maxLeverage': 20,
'maintAmt': 750.0
},
{
'min': 150000,
'max': 250000,
'mmr': 0.05,
'lev': 10,
'minNotional': 150000,
'maxNotional': 250000,
'maintenanceMarginRate': 0.05,
'maxLeverage': 10,
'maintAmt': 4500.0
},
{
'min': 250000,
'max': 500000,
'mmr': 0.1,
'lev': 5,
'minNotional': 250000,
'maxNotional': 500000,
'maintenanceMarginRate': 0.1,
'maxLeverage': 5,
'maintAmt': 17000.0
},
{
'min': 500000,
'max': 1000000,
'mmr': 0.125,
'lev': 4,
'minNotional': 500000,
'maxNotional': 1000000,
'maintenanceMarginRate': 0.125,
'maxLeverage': 4,
'maintAmt': 29500.0
},
{
'min': 1000000,
'max': 2000000,
'mmr': 0.25,
'lev': 2,
'minNotional': 1000000,
'maxNotional': 2000000,
'maintenanceMarginRate': 0.25,
'maxLeverage': 2,
'maintAmt': 154500.0
},
{
'min': 2000000,
'max': 30000000,
'mmr': 0.5,
'lev': 1,
'minNotional': 2000000,
'maxNotional': 30000000,
'maintenanceMarginRate': 0.5,
'maxLeverage': 1,
'maintAmt': 654500.0
},
]

View File

@@ -4826,10 +4826,10 @@ def test_parse_leverage_tier(mocker, default_conf):
}
assert exchange.parse_leverage_tier(tier) == {
"min": 0,
"max": 100000,
"mmr": 0.025,
"lev": 20,
"minNotional": 0,
"maxNotional": 100000,
"maintenanceMarginRate": 0.025,
"maxLeverage": 20,
"maintAmt": 0.0,
}
@@ -4855,10 +4855,10 @@ def test_parse_leverage_tier(mocker, default_conf):
}
assert exchange.parse_leverage_tier(tier2) == {
'min': 0,
'max': 2000,
'mmr': 0.01,
'lev': 75,
'minNotional': 0,
'maxNotional': 2000,
'maintenanceMarginRate': 0.01,
'maxLeverage': 75,
"maintAmt": None,
}

View File

@@ -414,47 +414,47 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets, tmpdir, caplog,
assert exchange._leverage_tiers == {
'ADA/USDT:USDT': [
{
'min': 0,
'max': 500,
'mmr': 0.02,
'lev': 75,
'minNotional': 0,
'maxNotional': 500,
'maintenanceMarginRate': 0.02,
'maxLeverage': 75,
'maintAmt': None
},
{
'min': 501,
'max': 1000,
'mmr': 0.025,
'lev': 50,
'minNotional': 501,
'maxNotional': 1000,
'maintenanceMarginRate': 0.025,
'maxLeverage': 50,
'maintAmt': None
},
{
'min': 1001,
'max': 2000,
'mmr': 0.03,
'lev': 20,
'minNotional': 1001,
'maxNotional': 2000,
'maintenanceMarginRate': 0.03,
'maxLeverage': 20,
'maintAmt': None
},
],
'ETH/USDT:USDT': [
{
'min': 0,
'max': 2000,
'mmr': 0.01,
'lev': 75,
'minNotional': 0,
'maxNotional': 2000,
'maintenanceMarginRate': 0.01,
'maxLeverage': 75,
'maintAmt': None
},
{
'min': 2001,
'max': 4000,
'mmr': 0.015,
'lev': 50,
'minNotional': 2001,
'maxNotional': 4000,
'maintenanceMarginRate': 0.015,
'maxLeverage': 50,
'maintAmt': None
},
{
'min': 4001,
'max': 8000,
'mmr': 0.02,
'lev': 20,
'minNotional': 4001,
'maxNotional': 8000,
'maintenanceMarginRate': 0.02,
'maxLeverage': 20,
'maintAmt': None
},
],