maintenanceMarginRatio -> maintenanceMarginRate
This commit is contained in:
parent
ef5dae2770
commit
124532a4b7
File diff suppressed because it is too large
Load Diff
@ -1891,7 +1891,7 @@ class Exchange:
|
|||||||
return {
|
return {
|
||||||
'min': tier['notionalFloor'],
|
'min': tier['notionalFloor'],
|
||||||
'max': tier['notionalCap'],
|
'max': tier['notionalCap'],
|
||||||
'mmr': tier['maintenanceMarginRatio'],
|
'mmr': tier['maintenanceMarginRate'],
|
||||||
'lev': tier['maxLeverage'],
|
'lev': tier['maxLeverage'],
|
||||||
'maintAmt': float(info['cum']) if 'cum' in info else None,
|
'maintAmt': float(info['cum']) if 'cum' in info else None,
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 1,
|
"tier": 1,
|
||||||
"notionalFloor": 0,
|
"notionalFloor": 0,
|
||||||
"notionalCap": 100000,
|
"notionalCap": 100000,
|
||||||
"maintenanceMarginRatio": 0.025,
|
"maintenanceMarginRate": 0.025,
|
||||||
"maxLeverage": 20,
|
"maxLeverage": 20,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "1",
|
"bracket": "1",
|
||||||
@ -192,7 +192,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 2,
|
"tier": 2,
|
||||||
"notionalFloor": 100000,
|
"notionalFloor": 100000,
|
||||||
"notionalCap": 500000,
|
"notionalCap": 500000,
|
||||||
"maintenanceMarginRatio": 0.05,
|
"maintenanceMarginRate": 0.05,
|
||||||
"maxLeverage": 10,
|
"maxLeverage": 10,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "2",
|
"bracket": "2",
|
||||||
@ -207,7 +207,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 3,
|
"tier": 3,
|
||||||
"notionalFloor": 500000,
|
"notionalFloor": 500000,
|
||||||
"notionalCap": 1000000,
|
"notionalCap": 1000000,
|
||||||
"maintenanceMarginRatio": 0.1,
|
"maintenanceMarginRate": 0.1,
|
||||||
"maxLeverage": 5,
|
"maxLeverage": 5,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "3",
|
"bracket": "3",
|
||||||
@ -222,7 +222,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 4,
|
"tier": 4,
|
||||||
"notionalFloor": 1000000,
|
"notionalFloor": 1000000,
|
||||||
"notionalCap": 2000000,
|
"notionalCap": 2000000,
|
||||||
"maintenanceMarginRatio": 0.15,
|
"maintenanceMarginRate": 0.15,
|
||||||
"maxLeverage": 3,
|
"maxLeverage": 3,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "4",
|
"bracket": "4",
|
||||||
@ -237,7 +237,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 5,
|
"tier": 5,
|
||||||
"notionalFloor": 2000000,
|
"notionalFloor": 2000000,
|
||||||
"notionalCap": 5000000,
|
"notionalCap": 5000000,
|
||||||
"maintenanceMarginRatio": 0.25,
|
"maintenanceMarginRate": 0.25,
|
||||||
"maxLeverage": 2,
|
"maxLeverage": 2,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "5",
|
"bracket": "5",
|
||||||
@ -252,7 +252,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 6,
|
"tier": 6,
|
||||||
"notionalFloor": 5000000,
|
"notionalFloor": 5000000,
|
||||||
"notionalCap": 30000000,
|
"notionalCap": 30000000,
|
||||||
"maintenanceMarginRatio": 0.5,
|
"maintenanceMarginRate": 0.5,
|
||||||
"maxLeverage": 1,
|
"maxLeverage": 1,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "6",
|
"bracket": "6",
|
||||||
@ -269,7 +269,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 1,
|
"tier": 1,
|
||||||
"notionalFloor": 0,
|
"notionalFloor": 0,
|
||||||
"notionalCap": 50000,
|
"notionalCap": 50000,
|
||||||
"maintenanceMarginRatio": 0.01,
|
"maintenanceMarginRate": 0.01,
|
||||||
"maxLeverage": 50,
|
"maxLeverage": 50,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "1",
|
"bracket": "1",
|
||||||
@ -284,7 +284,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 2,
|
"tier": 2,
|
||||||
"notionalFloor": 50000,
|
"notionalFloor": 50000,
|
||||||
"notionalCap": 150000,
|
"notionalCap": 150000,
|
||||||
"maintenanceMarginRatio": 0.025,
|
"maintenanceMarginRate": 0.025,
|
||||||
"maxLeverage": 20,
|
"maxLeverage": 20,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "2",
|
"bracket": "2",
|
||||||
@ -299,7 +299,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 3,
|
"tier": 3,
|
||||||
"notionalFloor": 150000,
|
"notionalFloor": 150000,
|
||||||
"notionalCap": 250000,
|
"notionalCap": 250000,
|
||||||
"maintenanceMarginRatio": 0.05,
|
"maintenanceMarginRate": 0.05,
|
||||||
"maxLeverage": 10,
|
"maxLeverage": 10,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "3",
|
"bracket": "3",
|
||||||
@ -314,7 +314,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 4,
|
"tier": 4,
|
||||||
"notionalFloor": 250000,
|
"notionalFloor": 250000,
|
||||||
"notionalCap": 500000,
|
"notionalCap": 500000,
|
||||||
"maintenanceMarginRatio": 0.1,
|
"maintenanceMarginRate": 0.1,
|
||||||
"maxLeverage": 5,
|
"maxLeverage": 5,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "4",
|
"bracket": "4",
|
||||||
@ -329,7 +329,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 5,
|
"tier": 5,
|
||||||
"notionalFloor": 500000,
|
"notionalFloor": 500000,
|
||||||
"notionalCap": 1000000,
|
"notionalCap": 1000000,
|
||||||
"maintenanceMarginRatio": 0.125,
|
"maintenanceMarginRate": 0.125,
|
||||||
"maxLeverage": 4,
|
"maxLeverage": 4,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "5",
|
"bracket": "5",
|
||||||
@ -344,7 +344,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 6,
|
"tier": 6,
|
||||||
"notionalFloor": 1000000,
|
"notionalFloor": 1000000,
|
||||||
"notionalCap": 2000000,
|
"notionalCap": 2000000,
|
||||||
"maintenanceMarginRatio": 0.25,
|
"maintenanceMarginRate": 0.25,
|
||||||
"maxLeverage": 2,
|
"maxLeverage": 2,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "6",
|
"bracket": "6",
|
||||||
@ -359,7 +359,7 @@ def test_fill_leverage_tiers_binance(default_conf, mocker):
|
|||||||
"tier": 7,
|
"tier": 7,
|
||||||
"notionalFloor": 2000000,
|
"notionalFloor": 2000000,
|
||||||
"notionalCap": 30000000,
|
"notionalCap": 30000000,
|
||||||
"maintenanceMarginRatio": 0.5,
|
"maintenanceMarginRate": 0.5,
|
||||||
"maxLeverage": 1,
|
"maxLeverage": 1,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "7",
|
"bracket": "7",
|
||||||
|
@ -4250,7 +4250,7 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers, exchange_name
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 500,
|
'notionalCap': 500,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -4291,7 +4291,7 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers, exchange_name
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 500,
|
'notionalCap': 500,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -4327,7 +4327,7 @@ def test_parse_leverage_tier(mocker, default_conf):
|
|||||||
"tier": 1,
|
"tier": 1,
|
||||||
"notionalFloor": 0,
|
"notionalFloor": 0,
|
||||||
"notionalCap": 100000,
|
"notionalCap": 100000,
|
||||||
"maintenanceMarginRatio": 0.025,
|
"maintenanceMarginRate": 0.025,
|
||||||
"maxLeverage": 20,
|
"maxLeverage": 20,
|
||||||
"info": {
|
"info": {
|
||||||
"bracket": "1",
|
"bracket": "1",
|
||||||
@ -4351,7 +4351,7 @@ def test_parse_leverage_tier(mocker, default_conf):
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 2000,
|
'notionalCap': 2000,
|
||||||
'maintenanceMarginRatio': 0.01,
|
'maintenanceMarginRate': 0.01,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
|
@ -21,7 +21,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 2000,
|
'notionalCap': 2000,
|
||||||
'maintenanceMarginRatio': 0.01,
|
'maintenanceMarginRate': 0.01,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -41,7 +41,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 2,
|
'tier': 2,
|
||||||
'notionalFloor': 2001,
|
'notionalFloor': 2001,
|
||||||
'notionalCap': 4000,
|
'notionalCap': 4000,
|
||||||
'maintenanceMarginRatio': 0.015,
|
'maintenanceMarginRate': 0.015,
|
||||||
'maxLeverage': 50,
|
'maxLeverage': 50,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -61,7 +61,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 3,
|
'tier': 3,
|
||||||
'notionalFloor': 4001,
|
'notionalFloor': 4001,
|
||||||
'notionalCap': 8000,
|
'notionalCap': 8000,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 20,
|
'maxLeverage': 20,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -83,7 +83,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 500,
|
'notionalCap': 500,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -103,7 +103,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 2,
|
'tier': 2,
|
||||||
'notionalFloor': 501,
|
'notionalFloor': 501,
|
||||||
'notionalCap': 1000,
|
'notionalCap': 1000,
|
||||||
'maintenanceMarginRatio': 0.025,
|
'maintenanceMarginRate': 0.025,
|
||||||
'maxLeverage': 50,
|
'maxLeverage': 50,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -123,7 +123,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
'tier': 3,
|
'tier': 3,
|
||||||
'notionalFloor': 1001,
|
'notionalFloor': 1001,
|
||||||
'notionalCap': 2000,
|
'notionalCap': 2000,
|
||||||
'maintenanceMarginRatio': 0.03,
|
'maintenanceMarginRate': 0.03,
|
||||||
'maxLeverage': 20,
|
'maxLeverage': 20,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -179,7 +179,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 500,
|
'notionalCap': 500,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -199,7 +199,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 2,
|
'tier': 2,
|
||||||
'notionalFloor': 501,
|
'notionalFloor': 501,
|
||||||
'notionalCap': 1000,
|
'notionalCap': 1000,
|
||||||
'maintenanceMarginRatio': 0.025,
|
'maintenanceMarginRate': 0.025,
|
||||||
'maxLeverage': 50,
|
'maxLeverage': 50,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -219,7 +219,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 3,
|
'tier': 3,
|
||||||
'notionalFloor': 1001,
|
'notionalFloor': 1001,
|
||||||
'notionalCap': 2000,
|
'notionalCap': 2000,
|
||||||
'maintenanceMarginRatio': 0.03,
|
'maintenanceMarginRate': 0.03,
|
||||||
'maxLeverage': 20,
|
'maxLeverage': 20,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -243,7 +243,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 1,
|
'tier': 1,
|
||||||
'notionalFloor': 0,
|
'notionalFloor': 0,
|
||||||
'notionalCap': 2000,
|
'notionalCap': 2000,
|
||||||
'maintenanceMarginRatio': 0.01,
|
'maintenanceMarginRate': 0.01,
|
||||||
'maxLeverage': 75,
|
'maxLeverage': 75,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -263,7 +263,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 2,
|
'tier': 2,
|
||||||
'notionalFloor': 2001,
|
'notionalFloor': 2001,
|
||||||
'notionalCap': 4000,
|
'notionalCap': 4000,
|
||||||
'maintenanceMarginRatio': 0.015,
|
'maintenanceMarginRate': 0.015,
|
||||||
'maxLeverage': 50,
|
'maxLeverage': 50,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
@ -283,7 +283,7 @@ def test_load_leverage_tiers_okx(default_conf, mocker, markets):
|
|||||||
'tier': 3,
|
'tier': 3,
|
||||||
'notionalFloor': 4001,
|
'notionalFloor': 4001,
|
||||||
'notionalCap': 8000,
|
'notionalCap': 8000,
|
||||||
'maintenanceMarginRatio': 0.02,
|
'maintenanceMarginRate': 0.02,
|
||||||
'maxLeverage': 20,
|
'maxLeverage': 20,
|
||||||
'info': {
|
'info': {
|
||||||
'baseMaxLoan': '',
|
'baseMaxLoan': '',
|
||||||
|
Loading…
Reference in New Issue
Block a user