zklighter-perps 1.0.239 → 1.0.240
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/.openapi-generator/FILES +1 -0
- package/models/AccountAsset.ts +29 -0
- package/models/Asset.ts +63 -0
- package/models/index.ts +1 -0
- package/openapi.json +73 -6
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/models/AccountAsset.ts
CHANGED
|
@@ -43,8 +43,31 @@ export interface AccountAsset {
|
|
|
43
43
|
* @memberof AccountAsset
|
|
44
44
|
*/
|
|
45
45
|
locked_balance: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AccountAsset
|
|
50
|
+
*/
|
|
51
|
+
margin_mode: AccountAssetMarginModeEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof AccountAsset
|
|
56
|
+
*/
|
|
57
|
+
margin_balance: string;
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const AccountAssetMarginModeEnum = {
|
|
65
|
+
Enabled: 'enabled',
|
|
66
|
+
Disabled: 'disabled'
|
|
67
|
+
} as const;
|
|
68
|
+
export type AccountAssetMarginModeEnum = typeof AccountAssetMarginModeEnum[keyof typeof AccountAssetMarginModeEnum];
|
|
69
|
+
|
|
70
|
+
|
|
48
71
|
/**
|
|
49
72
|
* Check if a given object implements the AccountAsset interface.
|
|
50
73
|
*/
|
|
@@ -53,6 +76,8 @@ export function instanceOfAccountAsset(value: object): value is AccountAsset {
|
|
|
53
76
|
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
54
77
|
if (!('balance' in value) || value['balance'] === undefined) return false;
|
|
55
78
|
if (!('locked_balance' in value) || value['locked_balance'] === undefined) return false;
|
|
79
|
+
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
80
|
+
if (!('margin_balance' in value) || value['margin_balance'] === undefined) return false;
|
|
56
81
|
return true;
|
|
57
82
|
}
|
|
58
83
|
|
|
@@ -70,6 +95,8 @@ export function AccountAssetFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
70
95
|
'asset_id': json['asset_id'],
|
|
71
96
|
'balance': json['balance'],
|
|
72
97
|
'locked_balance': json['locked_balance'],
|
|
98
|
+
'margin_mode': json['margin_mode'],
|
|
99
|
+
'margin_balance': json['margin_balance'],
|
|
73
100
|
};
|
|
74
101
|
}
|
|
75
102
|
|
|
@@ -83,6 +110,8 @@ export function AccountAssetToJSON(value?: AccountAsset | null): any {
|
|
|
83
110
|
'asset_id': value['asset_id'],
|
|
84
111
|
'balance': value['balance'],
|
|
85
112
|
'locked_balance': value['locked_balance'],
|
|
113
|
+
'margin_mode': value['margin_mode'],
|
|
114
|
+
'margin_balance': value['margin_balance'],
|
|
86
115
|
};
|
|
87
116
|
}
|
|
88
117
|
|
package/models/Asset.ts
CHANGED
|
@@ -67,12 +67,54 @@ export interface Asset {
|
|
|
67
67
|
* @memberof Asset
|
|
68
68
|
*/
|
|
69
69
|
index_price: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof Asset
|
|
74
|
+
*/
|
|
75
|
+
price_decimals: number;
|
|
70
76
|
/**
|
|
71
77
|
*
|
|
72
78
|
* @type {string}
|
|
73
79
|
* @memberof Asset
|
|
74
80
|
*/
|
|
75
81
|
l1_address: string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof Asset
|
|
86
|
+
*/
|
|
87
|
+
loan_to_value: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Asset
|
|
92
|
+
*/
|
|
93
|
+
liquidation_threshold: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @memberof Asset
|
|
98
|
+
*/
|
|
99
|
+
liquidation_fee: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof Asset
|
|
104
|
+
*/
|
|
105
|
+
global_supply_cap: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof Asset
|
|
110
|
+
*/
|
|
111
|
+
user_supply_cap: string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Asset
|
|
116
|
+
*/
|
|
117
|
+
total_supplied: string;
|
|
76
118
|
}
|
|
77
119
|
|
|
78
120
|
|
|
@@ -98,7 +140,14 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
98
140
|
if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false;
|
|
99
141
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
100
142
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
143
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
101
144
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
145
|
+
if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
|
|
146
|
+
if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
|
|
147
|
+
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
148
|
+
if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
|
|
149
|
+
if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
|
|
150
|
+
if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
|
|
102
151
|
return true;
|
|
103
152
|
}
|
|
104
153
|
|
|
@@ -120,7 +169,14 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
120
169
|
'min_withdrawal_amount': json['min_withdrawal_amount'],
|
|
121
170
|
'margin_mode': json['margin_mode'],
|
|
122
171
|
'index_price': json['index_price'],
|
|
172
|
+
'price_decimals': json['price_decimals'],
|
|
123
173
|
'l1_address': json['l1_address'],
|
|
174
|
+
'loan_to_value': json['loan_to_value'],
|
|
175
|
+
'liquidation_threshold': json['liquidation_threshold'],
|
|
176
|
+
'liquidation_fee': json['liquidation_fee'],
|
|
177
|
+
'global_supply_cap': json['global_supply_cap'],
|
|
178
|
+
'user_supply_cap': json['user_supply_cap'],
|
|
179
|
+
'total_supplied': json['total_supplied'],
|
|
124
180
|
};
|
|
125
181
|
}
|
|
126
182
|
|
|
@@ -138,7 +194,14 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
138
194
|
'min_withdrawal_amount': value['min_withdrawal_amount'],
|
|
139
195
|
'margin_mode': value['margin_mode'],
|
|
140
196
|
'index_price': value['index_price'],
|
|
197
|
+
'price_decimals': value['price_decimals'],
|
|
141
198
|
'l1_address': value['l1_address'],
|
|
199
|
+
'loan_to_value': value['loan_to_value'],
|
|
200
|
+
'liquidation_threshold': value['liquidation_threshold'],
|
|
201
|
+
'liquidation_fee': value['liquidation_fee'],
|
|
202
|
+
'global_supply_cap': value['global_supply_cap'],
|
|
203
|
+
'user_supply_cap': value['user_supply_cap'],
|
|
204
|
+
'total_supplied': value['total_supplied'],
|
|
142
205
|
};
|
|
143
206
|
}
|
|
144
207
|
|
package/models/index.ts
CHANGED
package/openapi.json
CHANGED
|
@@ -689,8 +689,7 @@
|
|
|
689
689
|
"in": "query",
|
|
690
690
|
"required": false,
|
|
691
691
|
"type": "integer",
|
|
692
|
-
"format": "int16"
|
|
693
|
-
"default": "0"
|
|
692
|
+
"format": "int16"
|
|
694
693
|
}
|
|
695
694
|
],
|
|
696
695
|
"tags": [
|
|
@@ -4812,6 +4811,18 @@
|
|
|
4812
4811
|
"locked_balance": {
|
|
4813
4812
|
"type": "string",
|
|
4814
4813
|
"example": "1000"
|
|
4814
|
+
},
|
|
4815
|
+
"margin_mode": {
|
|
4816
|
+
"type": "string",
|
|
4817
|
+
"example": "enabled",
|
|
4818
|
+
"enum": [
|
|
4819
|
+
"enabled",
|
|
4820
|
+
"disabled"
|
|
4821
|
+
]
|
|
4822
|
+
},
|
|
4823
|
+
"margin_balance": {
|
|
4824
|
+
"type": "string",
|
|
4825
|
+
"example": "1000"
|
|
4815
4826
|
}
|
|
4816
4827
|
},
|
|
4817
4828
|
"title": "AccountAsset",
|
|
@@ -4819,7 +4830,9 @@
|
|
|
4819
4830
|
"symbol",
|
|
4820
4831
|
"asset_id",
|
|
4821
4832
|
"balance",
|
|
4822
|
-
"locked_balance"
|
|
4833
|
+
"locked_balance",
|
|
4834
|
+
"margin_mode",
|
|
4835
|
+
"margin_balance"
|
|
4823
4836
|
]
|
|
4824
4837
|
},
|
|
4825
4838
|
"AccountLimits": {
|
|
@@ -5571,9 +5584,38 @@
|
|
|
5571
5584
|
"type": "string",
|
|
5572
5585
|
"example": "3024.66"
|
|
5573
5586
|
},
|
|
5587
|
+
"price_decimals": {
|
|
5588
|
+
"type": "integer",
|
|
5589
|
+
"format": "uint8",
|
|
5590
|
+
"example": "4"
|
|
5591
|
+
},
|
|
5574
5592
|
"l1_address": {
|
|
5575
5593
|
"type": "string",
|
|
5576
5594
|
"example": "0x0000000000000000000000000000000000000000"
|
|
5595
|
+
},
|
|
5596
|
+
"loan_to_value": {
|
|
5597
|
+
"type": "string",
|
|
5598
|
+
"example": "0.5"
|
|
5599
|
+
},
|
|
5600
|
+
"liquidation_threshold": {
|
|
5601
|
+
"type": "string",
|
|
5602
|
+
"example": "0.8"
|
|
5603
|
+
},
|
|
5604
|
+
"liquidation_fee": {
|
|
5605
|
+
"type": "string",
|
|
5606
|
+
"example": "0.01"
|
|
5607
|
+
},
|
|
5608
|
+
"global_supply_cap": {
|
|
5609
|
+
"type": "string",
|
|
5610
|
+
"example": "1000000"
|
|
5611
|
+
},
|
|
5612
|
+
"user_supply_cap": {
|
|
5613
|
+
"type": "string",
|
|
5614
|
+
"example": "1000"
|
|
5615
|
+
},
|
|
5616
|
+
"total_supplied": {
|
|
5617
|
+
"type": "string",
|
|
5618
|
+
"example": "100"
|
|
5577
5619
|
}
|
|
5578
5620
|
},
|
|
5579
5621
|
"title": "Asset",
|
|
@@ -5586,7 +5628,14 @@
|
|
|
5586
5628
|
"min_withdrawal_amount",
|
|
5587
5629
|
"margin_mode",
|
|
5588
5630
|
"index_price",
|
|
5589
|
-
"
|
|
5631
|
+
"price_decimals",
|
|
5632
|
+
"l1_address",
|
|
5633
|
+
"loan_to_value",
|
|
5634
|
+
"liquidation_threshold",
|
|
5635
|
+
"liquidation_fee",
|
|
5636
|
+
"global_supply_cap",
|
|
5637
|
+
"user_supply_cap",
|
|
5638
|
+
"total_supplied"
|
|
5590
5639
|
]
|
|
5591
5640
|
},
|
|
5592
5641
|
"AssetDetails": {
|
|
@@ -5613,6 +5662,25 @@
|
|
|
5613
5662
|
"asset_details"
|
|
5614
5663
|
]
|
|
5615
5664
|
},
|
|
5665
|
+
"AssetStats": {
|
|
5666
|
+
"type": "object",
|
|
5667
|
+
"properties": {
|
|
5668
|
+
"asset_id": {
|
|
5669
|
+
"type": "integer",
|
|
5670
|
+
"format": "int16",
|
|
5671
|
+
"example": "1"
|
|
5672
|
+
},
|
|
5673
|
+
"index_price": {
|
|
5674
|
+
"type": "string",
|
|
5675
|
+
"example": "3024.66"
|
|
5676
|
+
}
|
|
5677
|
+
},
|
|
5678
|
+
"title": "AssetStats",
|
|
5679
|
+
"required": [
|
|
5680
|
+
"asset_id",
|
|
5681
|
+
"index_price"
|
|
5682
|
+
]
|
|
5683
|
+
},
|
|
5616
5684
|
"Auth": {
|
|
5617
5685
|
"type": "object",
|
|
5618
5686
|
"properties": {
|
|
@@ -9989,8 +10057,7 @@
|
|
|
9989
10057
|
"properties": {
|
|
9990
10058
|
"asset_id": {
|
|
9991
10059
|
"type": "integer",
|
|
9992
|
-
"format": "int16"
|
|
9993
|
-
"default": "0"
|
|
10060
|
+
"format": "int16"
|
|
9994
10061
|
}
|
|
9995
10062
|
},
|
|
9996
10063
|
"title": "ReqGetAssetDetails"
|