@drift-labs/sdk 2.97.0-beta.7 → 2.97.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/lib/driftClient.js +2 -2
- package/lib/idl/drift.json +221 -2
- package/package.json +1 -1
- package/src/driftClient.ts +2 -2
- package/src/idl/drift.json +221 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.97.0-beta.
|
|
1
|
+
2.97.0-beta.9
|
package/lib/driftClient.js
CHANGED
|
@@ -4259,7 +4259,7 @@ class DriftClient {
|
|
|
4259
4259
|
return txSig;
|
|
4260
4260
|
}
|
|
4261
4261
|
async getEnableHighLeverageModeIx(subAccountId) {
|
|
4262
|
-
const ix = await this.program.instruction.
|
|
4262
|
+
const ix = await this.program.instruction.enableUserHighLeverageMode(subAccountId, {
|
|
4263
4263
|
accounts: {
|
|
4264
4264
|
state: await this.getStatePublicKey(),
|
|
4265
4265
|
user: (0, pda_1.getUserAccountPublicKeySync)(this.program.programId, this.wallet.publicKey, subAccountId),
|
|
@@ -4274,7 +4274,7 @@ class DriftClient {
|
|
|
4274
4274
|
return txSig;
|
|
4275
4275
|
}
|
|
4276
4276
|
async getDisableHighLeverageModeIx(user) {
|
|
4277
|
-
const ix = await this.program.instruction.
|
|
4277
|
+
const ix = await this.program.instruction.disableUserHighLeverageMode({
|
|
4278
4278
|
accounts: {
|
|
4279
4279
|
state: await this.getStatePublicKey(),
|
|
4280
4280
|
user,
|
package/lib/idl/drift.json
CHANGED
|
@@ -1283,6 +1283,37 @@
|
|
|
1283
1283
|
],
|
|
1284
1284
|
"args": []
|
|
1285
1285
|
},
|
|
1286
|
+
{
|
|
1287
|
+
"name": "enableUserHighLeverageMode",
|
|
1288
|
+
"accounts": [
|
|
1289
|
+
{
|
|
1290
|
+
"name": "state",
|
|
1291
|
+
"isMut": false,
|
|
1292
|
+
"isSigner": false
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"name": "user",
|
|
1296
|
+
"isMut": true,
|
|
1297
|
+
"isSigner": false
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"name": "authority",
|
|
1301
|
+
"isMut": false,
|
|
1302
|
+
"isSigner": true
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"name": "highLeverageModeConfig",
|
|
1306
|
+
"isMut": true,
|
|
1307
|
+
"isSigner": false
|
|
1308
|
+
}
|
|
1309
|
+
],
|
|
1310
|
+
"args": [
|
|
1311
|
+
{
|
|
1312
|
+
"name": "subAccountId",
|
|
1313
|
+
"type": "u16"
|
|
1314
|
+
}
|
|
1315
|
+
]
|
|
1316
|
+
},
|
|
1286
1317
|
{
|
|
1287
1318
|
"name": "fillPerpOrder",
|
|
1288
1319
|
"accounts": [
|
|
@@ -1498,6 +1529,32 @@
|
|
|
1498
1529
|
],
|
|
1499
1530
|
"args": []
|
|
1500
1531
|
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "disableUserHighLeverageMode",
|
|
1534
|
+
"accounts": [
|
|
1535
|
+
{
|
|
1536
|
+
"name": "state",
|
|
1537
|
+
"isMut": false,
|
|
1538
|
+
"isSigner": false
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"name": "authority",
|
|
1542
|
+
"isMut": false,
|
|
1543
|
+
"isSigner": true
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"name": "user",
|
|
1547
|
+
"isMut": true,
|
|
1548
|
+
"isSigner": false
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "highLeverageModeConfig",
|
|
1552
|
+
"isMut": true,
|
|
1553
|
+
"isSigner": false
|
|
1554
|
+
}
|
|
1555
|
+
],
|
|
1556
|
+
"args": []
|
|
1557
|
+
},
|
|
1501
1558
|
{
|
|
1502
1559
|
"name": "updateUserFuelBonus",
|
|
1503
1560
|
"accounts": [
|
|
@@ -3987,6 +4044,36 @@
|
|
|
3987
4044
|
}
|
|
3988
4045
|
]
|
|
3989
4046
|
},
|
|
4047
|
+
{
|
|
4048
|
+
"name": "updatePerpMarketHighLeverageMarginRatio",
|
|
4049
|
+
"accounts": [
|
|
4050
|
+
{
|
|
4051
|
+
"name": "admin",
|
|
4052
|
+
"isMut": false,
|
|
4053
|
+
"isSigner": true
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"name": "state",
|
|
4057
|
+
"isMut": false,
|
|
4058
|
+
"isSigner": false
|
|
4059
|
+
},
|
|
4060
|
+
{
|
|
4061
|
+
"name": "perpMarket",
|
|
4062
|
+
"isMut": true,
|
|
4063
|
+
"isSigner": false
|
|
4064
|
+
}
|
|
4065
|
+
],
|
|
4066
|
+
"args": [
|
|
4067
|
+
{
|
|
4068
|
+
"name": "marginRatioInitial",
|
|
4069
|
+
"type": "u16"
|
|
4070
|
+
},
|
|
4071
|
+
{
|
|
4072
|
+
"name": "marginRatioMaintenance",
|
|
4073
|
+
"type": "u16"
|
|
4074
|
+
}
|
|
4075
|
+
]
|
|
4076
|
+
},
|
|
3990
4077
|
{
|
|
3991
4078
|
"name": "updatePerpMarketFundingPeriod",
|
|
3992
4079
|
"accounts": [
|
|
@@ -5952,6 +6039,72 @@
|
|
|
5952
6039
|
}
|
|
5953
6040
|
}
|
|
5954
6041
|
]
|
|
6042
|
+
},
|
|
6043
|
+
{
|
|
6044
|
+
"name": "initializeHighLeverageModeConfig",
|
|
6045
|
+
"accounts": [
|
|
6046
|
+
{
|
|
6047
|
+
"name": "admin",
|
|
6048
|
+
"isMut": true,
|
|
6049
|
+
"isSigner": true
|
|
6050
|
+
},
|
|
6051
|
+
{
|
|
6052
|
+
"name": "highLeverageModeConfig",
|
|
6053
|
+
"isMut": true,
|
|
6054
|
+
"isSigner": false
|
|
6055
|
+
},
|
|
6056
|
+
{
|
|
6057
|
+
"name": "state",
|
|
6058
|
+
"isMut": false,
|
|
6059
|
+
"isSigner": false
|
|
6060
|
+
},
|
|
6061
|
+
{
|
|
6062
|
+
"name": "rent",
|
|
6063
|
+
"isMut": false,
|
|
6064
|
+
"isSigner": false
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
"name": "systemProgram",
|
|
6068
|
+
"isMut": false,
|
|
6069
|
+
"isSigner": false
|
|
6070
|
+
}
|
|
6071
|
+
],
|
|
6072
|
+
"args": [
|
|
6073
|
+
{
|
|
6074
|
+
"name": "maxUsers",
|
|
6075
|
+
"type": "u32"
|
|
6076
|
+
}
|
|
6077
|
+
]
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
"name": "updateHighLeverageModeConfig",
|
|
6081
|
+
"accounts": [
|
|
6082
|
+
{
|
|
6083
|
+
"name": "admin",
|
|
6084
|
+
"isMut": true,
|
|
6085
|
+
"isSigner": true
|
|
6086
|
+
},
|
|
6087
|
+
{
|
|
6088
|
+
"name": "highLeverageModeConfig",
|
|
6089
|
+
"isMut": true,
|
|
6090
|
+
"isSigner": false
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"name": "state",
|
|
6094
|
+
"isMut": false,
|
|
6095
|
+
"isSigner": false
|
|
6096
|
+
}
|
|
6097
|
+
],
|
|
6098
|
+
"args": [
|
|
6099
|
+
{
|
|
6100
|
+
"name": "maxUsers",
|
|
6101
|
+
"type": "u32"
|
|
6102
|
+
},
|
|
6103
|
+
{
|
|
6104
|
+
"name": "reduceOnly",
|
|
6105
|
+
"type": "bool"
|
|
6106
|
+
}
|
|
6107
|
+
]
|
|
5955
6108
|
}
|
|
5956
6109
|
],
|
|
5957
6110
|
"accounts": [
|
|
@@ -6158,6 +6311,35 @@
|
|
|
6158
6311
|
]
|
|
6159
6312
|
}
|
|
6160
6313
|
},
|
|
6314
|
+
{
|
|
6315
|
+
"name": "HighLeverageModeConfig",
|
|
6316
|
+
"type": {
|
|
6317
|
+
"kind": "struct",
|
|
6318
|
+
"fields": [
|
|
6319
|
+
{
|
|
6320
|
+
"name": "maxUsers",
|
|
6321
|
+
"type": "u32"
|
|
6322
|
+
},
|
|
6323
|
+
{
|
|
6324
|
+
"name": "currentUsers",
|
|
6325
|
+
"type": "u32"
|
|
6326
|
+
},
|
|
6327
|
+
{
|
|
6328
|
+
"name": "reduceOnly",
|
|
6329
|
+
"type": "u8"
|
|
6330
|
+
},
|
|
6331
|
+
{
|
|
6332
|
+
"name": "padding",
|
|
6333
|
+
"type": {
|
|
6334
|
+
"array": [
|
|
6335
|
+
"u8",
|
|
6336
|
+
31
|
|
6337
|
+
]
|
|
6338
|
+
}
|
|
6339
|
+
}
|
|
6340
|
+
]
|
|
6341
|
+
}
|
|
6342
|
+
},
|
|
6161
6343
|
{
|
|
6162
6344
|
"name": "InsuranceFundStake",
|
|
6163
6345
|
"type": {
|
|
@@ -6546,12 +6728,24 @@
|
|
|
6546
6728
|
],
|
|
6547
6729
|
"type": "u8"
|
|
6548
6730
|
},
|
|
6731
|
+
{
|
|
6732
|
+
"name": "padding1",
|
|
6733
|
+
"type": "u8"
|
|
6734
|
+
},
|
|
6735
|
+
{
|
|
6736
|
+
"name": "highLeverageMarginRatioInitial",
|
|
6737
|
+
"type": "u16"
|
|
6738
|
+
},
|
|
6739
|
+
{
|
|
6740
|
+
"name": "highLeverageMarginRatioMaintenance",
|
|
6741
|
+
"type": "u16"
|
|
6742
|
+
},
|
|
6549
6743
|
{
|
|
6550
6744
|
"name": "padding",
|
|
6551
6745
|
"type": {
|
|
6552
6746
|
"array": [
|
|
6553
6747
|
"u8",
|
|
6554
|
-
|
|
6748
|
+
38
|
|
6555
6749
|
]
|
|
6556
6750
|
}
|
|
6557
6751
|
}
|
|
@@ -7401,12 +7595,18 @@
|
|
|
7401
7595
|
],
|
|
7402
7596
|
"type": "bool"
|
|
7403
7597
|
},
|
|
7598
|
+
{
|
|
7599
|
+
"name": "marginMode",
|
|
7600
|
+
"type": {
|
|
7601
|
+
"defined": "MarginMode"
|
|
7602
|
+
}
|
|
7603
|
+
},
|
|
7404
7604
|
{
|
|
7405
7605
|
"name": "padding1",
|
|
7406
7606
|
"type": {
|
|
7407
7607
|
"array": [
|
|
7408
7608
|
"u8",
|
|
7409
|
-
|
|
7609
|
+
4
|
|
7410
7610
|
]
|
|
7411
7611
|
}
|
|
7412
7612
|
},
|
|
@@ -10659,6 +10859,20 @@
|
|
|
10659
10859
|
}
|
|
10660
10860
|
]
|
|
10661
10861
|
}
|
|
10862
|
+
},
|
|
10863
|
+
{
|
|
10864
|
+
"name": "MarginMode",
|
|
10865
|
+
"type": {
|
|
10866
|
+
"kind": "enum",
|
|
10867
|
+
"variants": [
|
|
10868
|
+
{
|
|
10869
|
+
"name": "Default"
|
|
10870
|
+
},
|
|
10871
|
+
{
|
|
10872
|
+
"name": "HighLeverage"
|
|
10873
|
+
}
|
|
10874
|
+
]
|
|
10875
|
+
}
|
|
10662
10876
|
}
|
|
10663
10877
|
],
|
|
10664
10878
|
"events": [
|
|
@@ -13152,6 +13366,11 @@
|
|
|
13152
13366
|
"code": 6289,
|
|
13153
13367
|
"name": "PlaceAndTakeOrderSuccessConditionFailed",
|
|
13154
13368
|
"msg": "Place and take order success condition failed"
|
|
13369
|
+
},
|
|
13370
|
+
{
|
|
13371
|
+
"code": 6290,
|
|
13372
|
+
"name": "InvalidHighLeverageModeConfig",
|
|
13373
|
+
"msg": "Invalid High Leverage Mode Config"
|
|
13155
13374
|
}
|
|
13156
13375
|
],
|
|
13157
13376
|
"metadata": {
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -8119,7 +8119,7 @@ export class DriftClient {
|
|
|
8119
8119
|
}
|
|
8120
8120
|
|
|
8121
8121
|
public async getEnableHighLeverageModeIx(subAccountId: number) {
|
|
8122
|
-
const ix = await this.program.instruction.
|
|
8122
|
+
const ix = await this.program.instruction.enableUserHighLeverageMode(
|
|
8123
8123
|
subAccountId,
|
|
8124
8124
|
{
|
|
8125
8125
|
accounts: {
|
|
@@ -8156,7 +8156,7 @@ export class DriftClient {
|
|
|
8156
8156
|
}
|
|
8157
8157
|
|
|
8158
8158
|
public async getDisableHighLeverageModeIx(user: PublicKey) {
|
|
8159
|
-
const ix = await this.program.instruction.
|
|
8159
|
+
const ix = await this.program.instruction.disableUserHighLeverageMode({
|
|
8160
8160
|
accounts: {
|
|
8161
8161
|
state: await this.getStatePublicKey(),
|
|
8162
8162
|
user,
|
package/src/idl/drift.json
CHANGED
|
@@ -1283,6 +1283,37 @@
|
|
|
1283
1283
|
],
|
|
1284
1284
|
"args": []
|
|
1285
1285
|
},
|
|
1286
|
+
{
|
|
1287
|
+
"name": "enableUserHighLeverageMode",
|
|
1288
|
+
"accounts": [
|
|
1289
|
+
{
|
|
1290
|
+
"name": "state",
|
|
1291
|
+
"isMut": false,
|
|
1292
|
+
"isSigner": false
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"name": "user",
|
|
1296
|
+
"isMut": true,
|
|
1297
|
+
"isSigner": false
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"name": "authority",
|
|
1301
|
+
"isMut": false,
|
|
1302
|
+
"isSigner": true
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"name": "highLeverageModeConfig",
|
|
1306
|
+
"isMut": true,
|
|
1307
|
+
"isSigner": false
|
|
1308
|
+
}
|
|
1309
|
+
],
|
|
1310
|
+
"args": [
|
|
1311
|
+
{
|
|
1312
|
+
"name": "subAccountId",
|
|
1313
|
+
"type": "u16"
|
|
1314
|
+
}
|
|
1315
|
+
]
|
|
1316
|
+
},
|
|
1286
1317
|
{
|
|
1287
1318
|
"name": "fillPerpOrder",
|
|
1288
1319
|
"accounts": [
|
|
@@ -1498,6 +1529,32 @@
|
|
|
1498
1529
|
],
|
|
1499
1530
|
"args": []
|
|
1500
1531
|
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "disableUserHighLeverageMode",
|
|
1534
|
+
"accounts": [
|
|
1535
|
+
{
|
|
1536
|
+
"name": "state",
|
|
1537
|
+
"isMut": false,
|
|
1538
|
+
"isSigner": false
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"name": "authority",
|
|
1542
|
+
"isMut": false,
|
|
1543
|
+
"isSigner": true
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
"name": "user",
|
|
1547
|
+
"isMut": true,
|
|
1548
|
+
"isSigner": false
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "highLeverageModeConfig",
|
|
1552
|
+
"isMut": true,
|
|
1553
|
+
"isSigner": false
|
|
1554
|
+
}
|
|
1555
|
+
],
|
|
1556
|
+
"args": []
|
|
1557
|
+
},
|
|
1501
1558
|
{
|
|
1502
1559
|
"name": "updateUserFuelBonus",
|
|
1503
1560
|
"accounts": [
|
|
@@ -3987,6 +4044,36 @@
|
|
|
3987
4044
|
}
|
|
3988
4045
|
]
|
|
3989
4046
|
},
|
|
4047
|
+
{
|
|
4048
|
+
"name": "updatePerpMarketHighLeverageMarginRatio",
|
|
4049
|
+
"accounts": [
|
|
4050
|
+
{
|
|
4051
|
+
"name": "admin",
|
|
4052
|
+
"isMut": false,
|
|
4053
|
+
"isSigner": true
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"name": "state",
|
|
4057
|
+
"isMut": false,
|
|
4058
|
+
"isSigner": false
|
|
4059
|
+
},
|
|
4060
|
+
{
|
|
4061
|
+
"name": "perpMarket",
|
|
4062
|
+
"isMut": true,
|
|
4063
|
+
"isSigner": false
|
|
4064
|
+
}
|
|
4065
|
+
],
|
|
4066
|
+
"args": [
|
|
4067
|
+
{
|
|
4068
|
+
"name": "marginRatioInitial",
|
|
4069
|
+
"type": "u16"
|
|
4070
|
+
},
|
|
4071
|
+
{
|
|
4072
|
+
"name": "marginRatioMaintenance",
|
|
4073
|
+
"type": "u16"
|
|
4074
|
+
}
|
|
4075
|
+
]
|
|
4076
|
+
},
|
|
3990
4077
|
{
|
|
3991
4078
|
"name": "updatePerpMarketFundingPeriod",
|
|
3992
4079
|
"accounts": [
|
|
@@ -5952,6 +6039,72 @@
|
|
|
5952
6039
|
}
|
|
5953
6040
|
}
|
|
5954
6041
|
]
|
|
6042
|
+
},
|
|
6043
|
+
{
|
|
6044
|
+
"name": "initializeHighLeverageModeConfig",
|
|
6045
|
+
"accounts": [
|
|
6046
|
+
{
|
|
6047
|
+
"name": "admin",
|
|
6048
|
+
"isMut": true,
|
|
6049
|
+
"isSigner": true
|
|
6050
|
+
},
|
|
6051
|
+
{
|
|
6052
|
+
"name": "highLeverageModeConfig",
|
|
6053
|
+
"isMut": true,
|
|
6054
|
+
"isSigner": false
|
|
6055
|
+
},
|
|
6056
|
+
{
|
|
6057
|
+
"name": "state",
|
|
6058
|
+
"isMut": false,
|
|
6059
|
+
"isSigner": false
|
|
6060
|
+
},
|
|
6061
|
+
{
|
|
6062
|
+
"name": "rent",
|
|
6063
|
+
"isMut": false,
|
|
6064
|
+
"isSigner": false
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
"name": "systemProgram",
|
|
6068
|
+
"isMut": false,
|
|
6069
|
+
"isSigner": false
|
|
6070
|
+
}
|
|
6071
|
+
],
|
|
6072
|
+
"args": [
|
|
6073
|
+
{
|
|
6074
|
+
"name": "maxUsers",
|
|
6075
|
+
"type": "u32"
|
|
6076
|
+
}
|
|
6077
|
+
]
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
"name": "updateHighLeverageModeConfig",
|
|
6081
|
+
"accounts": [
|
|
6082
|
+
{
|
|
6083
|
+
"name": "admin",
|
|
6084
|
+
"isMut": true,
|
|
6085
|
+
"isSigner": true
|
|
6086
|
+
},
|
|
6087
|
+
{
|
|
6088
|
+
"name": "highLeverageModeConfig",
|
|
6089
|
+
"isMut": true,
|
|
6090
|
+
"isSigner": false
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"name": "state",
|
|
6094
|
+
"isMut": false,
|
|
6095
|
+
"isSigner": false
|
|
6096
|
+
}
|
|
6097
|
+
],
|
|
6098
|
+
"args": [
|
|
6099
|
+
{
|
|
6100
|
+
"name": "maxUsers",
|
|
6101
|
+
"type": "u32"
|
|
6102
|
+
},
|
|
6103
|
+
{
|
|
6104
|
+
"name": "reduceOnly",
|
|
6105
|
+
"type": "bool"
|
|
6106
|
+
}
|
|
6107
|
+
]
|
|
5955
6108
|
}
|
|
5956
6109
|
],
|
|
5957
6110
|
"accounts": [
|
|
@@ -6158,6 +6311,35 @@
|
|
|
6158
6311
|
]
|
|
6159
6312
|
}
|
|
6160
6313
|
},
|
|
6314
|
+
{
|
|
6315
|
+
"name": "HighLeverageModeConfig",
|
|
6316
|
+
"type": {
|
|
6317
|
+
"kind": "struct",
|
|
6318
|
+
"fields": [
|
|
6319
|
+
{
|
|
6320
|
+
"name": "maxUsers",
|
|
6321
|
+
"type": "u32"
|
|
6322
|
+
},
|
|
6323
|
+
{
|
|
6324
|
+
"name": "currentUsers",
|
|
6325
|
+
"type": "u32"
|
|
6326
|
+
},
|
|
6327
|
+
{
|
|
6328
|
+
"name": "reduceOnly",
|
|
6329
|
+
"type": "u8"
|
|
6330
|
+
},
|
|
6331
|
+
{
|
|
6332
|
+
"name": "padding",
|
|
6333
|
+
"type": {
|
|
6334
|
+
"array": [
|
|
6335
|
+
"u8",
|
|
6336
|
+
31
|
|
6337
|
+
]
|
|
6338
|
+
}
|
|
6339
|
+
}
|
|
6340
|
+
]
|
|
6341
|
+
}
|
|
6342
|
+
},
|
|
6161
6343
|
{
|
|
6162
6344
|
"name": "InsuranceFundStake",
|
|
6163
6345
|
"type": {
|
|
@@ -6546,12 +6728,24 @@
|
|
|
6546
6728
|
],
|
|
6547
6729
|
"type": "u8"
|
|
6548
6730
|
},
|
|
6731
|
+
{
|
|
6732
|
+
"name": "padding1",
|
|
6733
|
+
"type": "u8"
|
|
6734
|
+
},
|
|
6735
|
+
{
|
|
6736
|
+
"name": "highLeverageMarginRatioInitial",
|
|
6737
|
+
"type": "u16"
|
|
6738
|
+
},
|
|
6739
|
+
{
|
|
6740
|
+
"name": "highLeverageMarginRatioMaintenance",
|
|
6741
|
+
"type": "u16"
|
|
6742
|
+
},
|
|
6549
6743
|
{
|
|
6550
6744
|
"name": "padding",
|
|
6551
6745
|
"type": {
|
|
6552
6746
|
"array": [
|
|
6553
6747
|
"u8",
|
|
6554
|
-
|
|
6748
|
+
38
|
|
6555
6749
|
]
|
|
6556
6750
|
}
|
|
6557
6751
|
}
|
|
@@ -7401,12 +7595,18 @@
|
|
|
7401
7595
|
],
|
|
7402
7596
|
"type": "bool"
|
|
7403
7597
|
},
|
|
7598
|
+
{
|
|
7599
|
+
"name": "marginMode",
|
|
7600
|
+
"type": {
|
|
7601
|
+
"defined": "MarginMode"
|
|
7602
|
+
}
|
|
7603
|
+
},
|
|
7404
7604
|
{
|
|
7405
7605
|
"name": "padding1",
|
|
7406
7606
|
"type": {
|
|
7407
7607
|
"array": [
|
|
7408
7608
|
"u8",
|
|
7409
|
-
|
|
7609
|
+
4
|
|
7410
7610
|
]
|
|
7411
7611
|
}
|
|
7412
7612
|
},
|
|
@@ -10659,6 +10859,20 @@
|
|
|
10659
10859
|
}
|
|
10660
10860
|
]
|
|
10661
10861
|
}
|
|
10862
|
+
},
|
|
10863
|
+
{
|
|
10864
|
+
"name": "MarginMode",
|
|
10865
|
+
"type": {
|
|
10866
|
+
"kind": "enum",
|
|
10867
|
+
"variants": [
|
|
10868
|
+
{
|
|
10869
|
+
"name": "Default"
|
|
10870
|
+
},
|
|
10871
|
+
{
|
|
10872
|
+
"name": "HighLeverage"
|
|
10873
|
+
}
|
|
10874
|
+
]
|
|
10875
|
+
}
|
|
10662
10876
|
}
|
|
10663
10877
|
],
|
|
10664
10878
|
"events": [
|
|
@@ -13152,6 +13366,11 @@
|
|
|
13152
13366
|
"code": 6289,
|
|
13153
13367
|
"name": "PlaceAndTakeOrderSuccessConditionFailed",
|
|
13154
13368
|
"msg": "Place and take order success condition failed"
|
|
13369
|
+
},
|
|
13370
|
+
{
|
|
13371
|
+
"code": 6290,
|
|
13372
|
+
"name": "InvalidHighLeverageModeConfig",
|
|
13373
|
+
"msg": "Invalid High Leverage Mode Config"
|
|
13155
13374
|
}
|
|
13156
13375
|
],
|
|
13157
13376
|
"metadata": {
|