maintenanceMarginRatio -> maintenanceMarginRate

This commit is contained in:
Sam Germain 2022-02-16 09:04:43 -06:00
parent ef5dae2770
commit 124532a4b7
5 changed files with 1107 additions and 1107 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1891,7 +1891,7 @@ class Exchange:
return {
'min': tier['notionalFloor'],
'max': tier['notionalCap'],
'mmr': tier['maintenanceMarginRatio'],
'mmr': tier['maintenanceMarginRate'],
'lev': tier['maxLeverage'],
'maintAmt': float(info['cum']) if 'cum' in info else None,
}

View File

@ -177,7 +177,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 1,
"notionalFloor": 0,
"notionalCap": 100000,
"maintenanceMarginRatio": 0.025,
"maintenanceMarginRate": 0.025,
"maxLeverage": 20,
"info": {
"bracket": "1",
@ -192,7 +192,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 2,
"notionalFloor": 100000,
"notionalCap": 500000,
"maintenanceMarginRatio": 0.05,
"maintenanceMarginRate": 0.05,
"maxLeverage": 10,
"info": {
"bracket": "2",
@ -207,7 +207,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 3,
"notionalFloor": 500000,
"notionalCap": 1000000,
"maintenanceMarginRatio": 0.1,
"maintenanceMarginRate": 0.1,
"maxLeverage": 5,
"info": {
"bracket": "3",
@ -222,7 +222,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 4,
"notionalFloor": 1000000,
"notionalCap": 2000000,
"maintenanceMarginRatio": 0.15,
"maintenanceMarginRate": 0.15,
"maxLeverage": 3,
"info": {
"bracket": "4",
@ -237,7 +237,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 5,
"notionalFloor": 2000000,
"notionalCap": 5000000,
"maintenanceMarginRatio": 0.25,
"maintenanceMarginRate": 0.25,
"maxLeverage": 2,
"info": {
"bracket": "5",
@ -252,7 +252,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 6,
"notionalFloor": 5000000,
"notionalCap": 30000000,
"maintenanceMarginRatio": 0.5,
"maintenanceMarginRate": 0.5,
"maxLeverage": 1,
"info": {
"bracket": "6",
@ -269,7 +269,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 1,
"notionalFloor": 0,
"notionalCap": 50000,
"maintenanceMarginRatio": 0.01,
"maintenanceMarginRate": 0.01,
"maxLeverage": 50,
"info": {
"bracket": "1",
@ -284,7 +284,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 2,
"notionalFloor": 50000,
"notionalCap": 150000,
"maintenanceMarginRatio": 0.025,
"maintenanceMarginRate": 0.025,
"maxLeverage": 20,
"info": {
"bracket": "2",
@ -299,7 +299,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 3,
"notionalFloor": 150000,
"notionalCap": 250000,
"maintenanceMarginRatio": 0.05,
"maintenanceMarginRate": 0.05,
"maxLeverage": 10,
"info": {
"bracket": "3",
@ -314,7 +314,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 4,
"notionalFloor": 250000,
"notionalCap": 500000,
"maintenanceMarginRatio": 0.1,
"maintenanceMarginRate": 0.1,
"maxLeverage": 5,
"info": {
"bracket": "4",
@ -329,7 +329,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 5,
"notionalFloor": 500000,
"notionalCap": 1000000,
"maintenanceMarginRatio": 0.125,
"maintenanceMarginRate": 0.125,
"maxLeverage": 4,
"info": {
"bracket": "5",
@ -344,7 +344,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 6,
"notionalFloor": 1000000,
"notionalCap": 2000000,
"maintenanceMarginRatio": 0.25,
"maintenanceMarginRate": 0.25,
"maxLeverage": 2,
"info": {
"bracket": "6",
@ -359,7 +359,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
"tier": 7,
"notionalFloor": 2000000,
"notionalCap": 30000000,
"maintenanceMarginRatio": 0.5,
"maintenanceMarginRate": 0.5,
"maxLeverage": 1,
"info": {
"bracket": "7",

View File

@ -4250,7 +4250,7 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers, exchange_name
'tier': 1,
'notionalFloor': 0,
'notionalCap': 500,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -4291,7 +4291,7 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers, exchange_name
'tier': 1,
'notionalFloor': 0,
'notionalCap': 500,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -4327,7 +4327,7 @@ def test_parse_leverage_tier(mocker, default_conf):
"tier": 1,
"notionalFloor": 0,
"notionalCap": 100000,
"maintenanceMarginRatio": 0.025,
"maintenanceMarginRate": 0.025,
"maxLeverage": 20,
"info": {
"bracket": "1",
@ -4351,7 +4351,7 @@ def test_parse_leverage_tier(mocker, default_conf):
'tier': 1,
'notionalFloor': 0,
'notionalCap': 2000,
'maintenanceMarginRatio': 0.01,
'maintenanceMarginRate': 0.01,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',

View File

@ -21,7 +21,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 1,
'notionalFloor': 0,
'notionalCap': 2000,
'maintenanceMarginRatio': 0.01,
'maintenanceMarginRate': 0.01,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -41,7 +41,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 2,
'notionalFloor': 2001,
'notionalCap': 4000,
'maintenanceMarginRatio': 0.015,
'maintenanceMarginRate': 0.015,
'maxLeverage': 50,
'info': {
'baseMaxLoan': '',
@ -61,7 +61,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 3,
'notionalFloor': 4001,
'notionalCap': 8000,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 20,
'info': {
'baseMaxLoan': '',
@ -83,7 +83,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 1,
'notionalFloor': 0,
'notionalCap': 500,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -103,7 +103,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 2,
'notionalFloor': 501,
'notionalCap': 1000,
'maintenanceMarginRatio': 0.025,
'maintenanceMarginRate': 0.025,
'maxLeverage': 50,
'info': {
'baseMaxLoan': '',
@ -123,7 +123,7 @@ def test_get_maintenance_ratio_and_amt_okx(
'tier': 3,
'notionalFloor': 1001,
'notionalCap': 2000,
'maintenanceMarginRatio': 0.03,
'maintenanceMarginRate': 0.03,
'maxLeverage': 20,
'info': {
'baseMaxLoan': '',
@ -179,7 +179,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 1,
'notionalFloor': 0,
'notionalCap': 500,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -199,7 +199,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 2,
'notionalFloor': 501,
'notionalCap': 1000,
'maintenanceMarginRatio': 0.025,
'maintenanceMarginRate': 0.025,
'maxLeverage': 50,
'info': {
'baseMaxLoan': '',
@ -219,7 +219,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 3,
'notionalFloor': 1001,
'notionalCap': 2000,
'maintenanceMarginRatio': 0.03,
'maintenanceMarginRate': 0.03,
'maxLeverage': 20,
'info': {
'baseMaxLoan': '',
@ -243,7 +243,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 1,
'notionalFloor': 0,
'notionalCap': 2000,
'maintenanceMarginRatio': 0.01,
'maintenanceMarginRate': 0.01,
'maxLeverage': 75,
'info': {
'baseMaxLoan': '',
@ -263,7 +263,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 2,
'notionalFloor': 2001,
'notionalCap': 4000,
'maintenanceMarginRatio': 0.015,
'maintenanceMarginRate': 0.015,
'maxLeverage': 50,
'info': {
'baseMaxLoan': '',
@ -283,7 +283,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
'tier': 3,
'notionalFloor': 4001,
'notionalCap': 8000,
'maintenanceMarginRatio': 0.02,
'maintenanceMarginRate': 0.02,
'maxLeverage': 20,
'info': {
'baseMaxLoan': '',