zklighter-perps 1.0.131 → 1.0.133

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.
@@ -15,6 +15,7 @@ index.ts
15
15
  models/Account.ts
16
16
  models/AccountApiKeys.ts
17
17
  models/AccountLimits.ts
18
+ models/AccountMarginStats.ts
18
19
  models/AccountMarketStats.ts
19
20
  models/AccountMetadata.ts
20
21
  models/AccountMetadatas.ts
@@ -125,6 +126,7 @@ models/RespGetFastBridgeInfo.ts
125
126
  models/RespGetFastwithdrawalInfo.ts
126
127
  models/ResultCode.ts
127
128
  models/RiskInfo.ts
129
+ models/RiskParameters.ts
128
130
  models/SimpleOrder.ts
129
131
  models/Status.ts
130
132
  models/SubAccounts.ts
package/models/Account.ts CHANGED
@@ -61,6 +61,12 @@ export interface Account {
61
61
  * @memberof Account
62
62
  */
63
63
  total_order_count: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof Account
68
+ */
69
+ total_isolated_order_count: number;
64
70
  /**
65
71
  *
66
72
  * @type {number}
@@ -91,6 +97,7 @@ export function instanceOfAccount(value: object): value is Account {
91
97
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
92
98
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
93
99
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
100
+ if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
94
101
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
95
102
  if (!('status' in value) || value['status'] === undefined) return false;
96
103
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -114,6 +121,7 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
114
121
  'l1_address': json['l1_address'],
115
122
  'cancel_all_time': json['cancel_all_time'],
116
123
  'total_order_count': json['total_order_count'],
124
+ 'total_isolated_order_count': json['total_isolated_order_count'],
117
125
  'pending_order_count': json['pending_order_count'],
118
126
  'status': json['status'],
119
127
  'collateral': json['collateral'],
@@ -133,6 +141,7 @@ export function AccountToJSON(value?: Account | null): any {
133
141
  'l1_address': value['l1_address'],
134
142
  'cancel_all_time': value['cancel_all_time'],
135
143
  'total_order_count': value['total_order_count'],
144
+ 'total_isolated_order_count': value['total_isolated_order_count'],
136
145
  'pending_order_count': value['pending_order_count'],
137
146
  'status': value['status'],
138
147
  'collateral': value['collateral'],
@@ -0,0 +1,106 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AccountMarginStats
20
+ */
21
+ export interface AccountMarginStats {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AccountMarginStats
26
+ */
27
+ collateral: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AccountMarginStats
32
+ */
33
+ portfolio_value: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AccountMarginStats
38
+ */
39
+ leverage: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccountMarginStats
44
+ */
45
+ available_balance: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AccountMarginStats
50
+ */
51
+ margin_usage: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AccountMarginStats
56
+ */
57
+ buying_power: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the AccountMarginStats interface.
62
+ */
63
+ export function instanceOfAccountMarginStats(value: object): value is AccountMarginStats {
64
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
65
+ if (!('portfolio_value' in value) || value['portfolio_value'] === undefined) return false;
66
+ if (!('leverage' in value) || value['leverage'] === undefined) return false;
67
+ if (!('available_balance' in value) || value['available_balance'] === undefined) return false;
68
+ if (!('margin_usage' in value) || value['margin_usage'] === undefined) return false;
69
+ if (!('buying_power' in value) || value['buying_power'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function AccountMarginStatsFromJSON(json: any): AccountMarginStats {
74
+ return AccountMarginStatsFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function AccountMarginStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountMarginStats {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'collateral': json['collateral'],
84
+ 'portfolio_value': json['portfolio_value'],
85
+ 'leverage': json['leverage'],
86
+ 'available_balance': json['available_balance'],
87
+ 'margin_usage': json['margin_usage'],
88
+ 'buying_power': json['buying_power'],
89
+ };
90
+ }
91
+
92
+ export function AccountMarginStatsToJSON(value?: AccountMarginStats | null): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+
98
+ 'collateral': value['collateral'],
99
+ 'portfolio_value': value['portfolio_value'],
100
+ 'leverage': value['leverage'],
101
+ 'available_balance': value['available_balance'],
102
+ 'margin_usage': value['margin_usage'],
103
+ 'buying_power': value['buying_power'],
104
+ };
105
+ }
106
+
@@ -97,6 +97,18 @@ export interface AccountPosition {
97
97
  * @memberof AccountPosition
98
98
  */
99
99
  total_funding_paid_out?: string;
100
+ /**
101
+ *
102
+ * @type {number}
103
+ * @memberof AccountPosition
104
+ */
105
+ margin_mode: number;
106
+ /**
107
+ *
108
+ * @type {string}
109
+ * @memberof AccountPosition
110
+ */
111
+ allocated_margin: string;
100
112
  }
101
113
 
102
114
  /**
@@ -115,6 +127,8 @@ export function instanceOfAccountPosition(value: object): value is AccountPositi
115
127
  if (!('position_value' in value) || value['position_value'] === undefined) return false;
116
128
  if (!('unrealized_pnl' in value) || value['unrealized_pnl'] === undefined) return false;
117
129
  if (!('realized_pnl' in value) || value['realized_pnl'] === undefined) return false;
130
+ if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
131
+ if (!('allocated_margin' in value) || value['allocated_margin'] === undefined) return false;
118
132
  return true;
119
133
  }
120
134
 
@@ -141,6 +155,8 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
141
155
  'unrealized_pnl': json['unrealized_pnl'],
142
156
  'realized_pnl': json['realized_pnl'],
143
157
  'total_funding_paid_out': json['total_funding_paid_out'] == null ? undefined : json['total_funding_paid_out'],
158
+ 'margin_mode': json['margin_mode'],
159
+ 'allocated_margin': json['allocated_margin'],
144
160
  };
145
161
  }
146
162
 
@@ -163,6 +179,8 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
163
179
  'unrealized_pnl': value['unrealized_pnl'],
164
180
  'realized_pnl': value['realized_pnl'],
165
181
  'total_funding_paid_out': value['total_funding_paid_out'],
182
+ 'margin_mode': value['margin_mode'],
183
+ 'allocated_margin': value['allocated_margin'],
166
184
  };
167
185
  }
168
186
 
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { AccountMarginStats } from './AccountMarginStats';
17
+ import {
18
+ AccountMarginStatsFromJSON,
19
+ AccountMarginStatsFromJSONTyped,
20
+ AccountMarginStatsToJSON,
21
+ } from './AccountMarginStats';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -55,6 +62,18 @@ export interface AccountStats {
55
62
  * @memberof AccountStats
56
63
  */
57
64
  buying_power: string;
65
+ /**
66
+ *
67
+ * @type {AccountMarginStats}
68
+ * @memberof AccountStats
69
+ */
70
+ cross_stats: AccountMarginStats;
71
+ /**
72
+ *
73
+ * @type {AccountMarginStats}
74
+ * @memberof AccountStats
75
+ */
76
+ total_stats: AccountMarginStats;
58
77
  }
59
78
 
60
79
  /**
@@ -67,6 +86,8 @@ export function instanceOfAccountStats(value: object): value is AccountStats {
67
86
  if (!('available_balance' in value) || value['available_balance'] === undefined) return false;
68
87
  if (!('margin_usage' in value) || value['margin_usage'] === undefined) return false;
69
88
  if (!('buying_power' in value) || value['buying_power'] === undefined) return false;
89
+ if (!('cross_stats' in value) || value['cross_stats'] === undefined) return false;
90
+ if (!('total_stats' in value) || value['total_stats'] === undefined) return false;
70
91
  return true;
71
92
  }
72
93
 
@@ -86,6 +107,8 @@ export function AccountStatsFromJSONTyped(json: any, ignoreDiscriminator: boolea
86
107
  'available_balance': json['available_balance'],
87
108
  'margin_usage': json['margin_usage'],
88
109
  'buying_power': json['buying_power'],
110
+ 'cross_stats': AccountMarginStatsFromJSON(json['cross_stats']),
111
+ 'total_stats': AccountMarginStatsFromJSON(json['total_stats']),
89
112
  };
90
113
  }
91
114
 
@@ -101,6 +124,8 @@ export function AccountStatsToJSON(value?: AccountStats | null): any {
101
124
  'available_balance': value['available_balance'],
102
125
  'margin_usage': value['margin_usage'],
103
126
  'buying_power': value['buying_power'],
127
+ 'cross_stats': AccountMarginStatsToJSON(value['cross_stats']),
128
+ 'total_stats': AccountMarginStatsToJSON(value['total_stats']),
104
129
  };
105
130
  }
106
131
 
@@ -80,6 +80,12 @@ export interface DetailedAccount {
80
80
  * @memberof DetailedAccount
81
81
  */
82
82
  total_order_count: number;
83
+ /**
84
+ *
85
+ * @type {number}
86
+ * @memberof DetailedAccount
87
+ */
88
+ total_isolated_order_count: number;
83
89
  /**
84
90
  *
85
91
  * @type {number}
@@ -140,6 +146,12 @@ export interface DetailedAccount {
140
146
  * @memberof DetailedAccount
141
147
  */
142
148
  total_asset_value: string;
149
+ /**
150
+ *
151
+ * @type {string}
152
+ * @memberof DetailedAccount
153
+ */
154
+ cross_asset_value: string;
143
155
  /**
144
156
  *
145
157
  * @type {PublicPoolInfo}
@@ -164,6 +176,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
164
176
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
165
177
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
166
178
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
179
+ if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
167
180
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
168
181
  if (!('status' in value) || value['status'] === undefined) return false;
169
182
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -174,6 +187,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
174
187
  if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
175
188
  if (!('positions' in value) || value['positions'] === undefined) return false;
176
189
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
190
+ if (!('cross_asset_value' in value) || value['cross_asset_value'] === undefined) return false;
177
191
  if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
178
192
  if (!('shares' in value) || value['shares'] === undefined) return false;
179
193
  return true;
@@ -196,6 +210,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
196
210
  'l1_address': json['l1_address'],
197
211
  'cancel_all_time': json['cancel_all_time'],
198
212
  'total_order_count': json['total_order_count'],
213
+ 'total_isolated_order_count': json['total_isolated_order_count'],
199
214
  'pending_order_count': json['pending_order_count'],
200
215
  'status': json['status'],
201
216
  'collateral': json['collateral'],
@@ -206,6 +221,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
206
221
  'referral_points_percentage': json['referral_points_percentage'],
207
222
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
208
223
  'total_asset_value': json['total_asset_value'],
224
+ 'cross_asset_value': json['cross_asset_value'],
209
225
  'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
210
226
  'shares': ((json['shares'] as Array<any>).map(PublicPoolShareFromJSON)),
211
227
  };
@@ -224,6 +240,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
224
240
  'l1_address': value['l1_address'],
225
241
  'cancel_all_time': value['cancel_all_time'],
226
242
  'total_order_count': value['total_order_count'],
243
+ 'total_isolated_order_count': value['total_isolated_order_count'],
227
244
  'pending_order_count': value['pending_order_count'],
228
245
  'status': value['status'],
229
246
  'collateral': value['collateral'],
@@ -234,6 +251,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
234
251
  'referral_points_percentage': value['referral_points_percentage'],
235
252
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
236
253
  'total_asset_value': value['total_asset_value'],
254
+ 'cross_asset_value': value['cross_asset_value'],
237
255
  'pool_info': PublicPoolInfoToJSON(value['pool_info']),
238
256
  'shares': ((value['shares'] as Array<any>).map(PublicPoolShareToJSON)),
239
257
  };
@@ -74,6 +74,12 @@ export interface PublicPool {
74
74
  * @memberof PublicPool
75
75
  */
76
76
  total_order_count: number;
77
+ /**
78
+ *
79
+ * @type {number}
80
+ * @memberof PublicPool
81
+ */
82
+ total_isolated_order_count: number;
77
83
  /**
78
84
  *
79
85
  * @type {number}
@@ -128,6 +134,12 @@ export interface PublicPool {
128
134
  * @memberof PublicPool
129
135
  */
130
136
  total_asset_value: string;
137
+ /**
138
+ *
139
+ * @type {string}
140
+ * @memberof PublicPool
141
+ */
142
+ cross_asset_value: string;
131
143
  /**
132
144
  *
133
145
  * @type {PublicPoolInfo}
@@ -152,6 +164,7 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
152
164
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
153
165
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
154
166
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
167
+ if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
155
168
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
156
169
  if (!('status' in value) || value['status'] === undefined) return false;
157
170
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -161,6 +174,7 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
161
174
  if (!('can_invite' in value) || value['can_invite'] === undefined) return false;
162
175
  if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
163
176
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
177
+ if (!('cross_asset_value' in value) || value['cross_asset_value'] === undefined) return false;
164
178
  if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
165
179
  return true;
166
180
  }
@@ -182,6 +196,7 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
182
196
  'l1_address': json['l1_address'],
183
197
  'cancel_all_time': json['cancel_all_time'],
184
198
  'total_order_count': json['total_order_count'],
199
+ 'total_isolated_order_count': json['total_isolated_order_count'],
185
200
  'pending_order_count': json['pending_order_count'],
186
201
  'status': json['status'],
187
202
  'collateral': json['collateral'],
@@ -191,6 +206,7 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
191
206
  'can_invite': json['can_invite'],
192
207
  'referral_points_percentage': json['referral_points_percentage'],
193
208
  'total_asset_value': json['total_asset_value'],
209
+ 'cross_asset_value': json['cross_asset_value'],
194
210
  'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
195
211
  'account_share': json['account_share'] == null ? undefined : PublicPoolShareFromJSON(json['account_share']),
196
212
  };
@@ -209,6 +225,7 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
209
225
  'l1_address': value['l1_address'],
210
226
  'cancel_all_time': value['cancel_all_time'],
211
227
  'total_order_count': value['total_order_count'],
228
+ 'total_isolated_order_count': value['total_isolated_order_count'],
212
229
  'pending_order_count': value['pending_order_count'],
213
230
  'status': value['status'],
214
231
  'collateral': value['collateral'],
@@ -218,6 +235,7 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
218
235
  'can_invite': value['can_invite'],
219
236
  'referral_points_percentage': value['referral_points_percentage'],
220
237
  'total_asset_value': value['total_asset_value'],
238
+ 'cross_asset_value': value['cross_asset_value'],
221
239
  'pool_info': PublicPoolInfoToJSON(value['pool_info']),
222
240
  'account_share': PublicPoolShareToJSON(value['account_share']),
223
241
  };
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { RiskParameters } from './RiskParameters';
17
+ import {
18
+ RiskParametersFromJSON,
19
+ RiskParametersFromJSONTyped,
20
+ RiskParametersToJSON,
21
+ } from './RiskParameters';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -21,45 +28,24 @@ import { mapValues } from '../runtime';
21
28
  export interface RiskInfo {
22
29
  /**
23
30
  *
24
- * @type {string}
25
- * @memberof RiskInfo
26
- */
27
- collateral: string;
28
- /**
29
- *
30
- * @type {string}
31
- * @memberof RiskInfo
32
- */
33
- total_account_value: string;
34
- /**
35
- *
36
- * @type {string}
37
- * @memberof RiskInfo
38
- */
39
- initial_margin_req: string;
40
- /**
41
- *
42
- * @type {string}
31
+ * @type {RiskParameters}
43
32
  * @memberof RiskInfo
44
33
  */
45
- maintenance_margin_req: string;
34
+ cross_risk_parameters: RiskParameters;
46
35
  /**
47
36
  *
48
- * @type {string}
37
+ * @type {Array<RiskParameters>}
49
38
  * @memberof RiskInfo
50
39
  */
51
- close_out_margin_req: string;
40
+ isolated_risk_parameters: Array<RiskParameters>;
52
41
  }
53
42
 
54
43
  /**
55
44
  * Check if a given object implements the RiskInfo interface.
56
45
  */
57
46
  export function instanceOfRiskInfo(value: object): value is RiskInfo {
58
- if (!('collateral' in value) || value['collateral'] === undefined) return false;
59
- if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
60
- if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
61
- if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
62
- if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
47
+ if (!('cross_risk_parameters' in value) || value['cross_risk_parameters'] === undefined) return false;
48
+ if (!('isolated_risk_parameters' in value) || value['isolated_risk_parameters'] === undefined) return false;
63
49
  return true;
64
50
  }
65
51
 
@@ -73,11 +59,8 @@ export function RiskInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
73
59
  }
74
60
  return {
75
61
 
76
- 'collateral': json['collateral'],
77
- 'total_account_value': json['total_account_value'],
78
- 'initial_margin_req': json['initial_margin_req'],
79
- 'maintenance_margin_req': json['maintenance_margin_req'],
80
- 'close_out_margin_req': json['close_out_margin_req'],
62
+ 'cross_risk_parameters': RiskParametersFromJSON(json['cross_risk_parameters']),
63
+ 'isolated_risk_parameters': ((json['isolated_risk_parameters'] as Array<any>).map(RiskParametersFromJSON)),
81
64
  };
82
65
  }
83
66
 
@@ -87,11 +70,8 @@ export function RiskInfoToJSON(value?: RiskInfo | null): any {
87
70
  }
88
71
  return {
89
72
 
90
- 'collateral': value['collateral'],
91
- 'total_account_value': value['total_account_value'],
92
- 'initial_margin_req': value['initial_margin_req'],
93
- 'maintenance_margin_req': value['maintenance_margin_req'],
94
- 'close_out_margin_req': value['close_out_margin_req'],
73
+ 'cross_risk_parameters': RiskParametersToJSON(value['cross_risk_parameters']),
74
+ 'isolated_risk_parameters': ((value['isolated_risk_parameters'] as Array<any>).map(RiskParametersToJSON)),
95
75
  };
96
76
  }
97
77
 
package/models/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  export * from './Account';
4
4
  export * from './AccountApiKeys';
5
5
  export * from './AccountLimits';
6
+ export * from './AccountMarginStats';
6
7
  export * from './AccountMarketStats';
7
8
  export * from './AccountMetadata';
8
9
  export * from './AccountMetadatas';
@@ -113,6 +114,7 @@ export * from './RespGetFastBridgeInfo';
113
114
  export * from './RespGetFastwithdrawalInfo';
114
115
  export * from './ResultCode';
115
116
  export * from './RiskInfo';
117
+ export * from './RiskParameters';
116
118
  export * from './SimpleOrder';
117
119
  export * from './Status';
118
120
  export * from './SubAccounts';
package/openapi.json CHANGED
@@ -2830,6 +2830,11 @@
2830
2830
  "format": "int64",
2831
2831
  "example": "100"
2832
2832
  },
2833
+ "total_isolated_order_count": {
2834
+ "type": "integer",
2835
+ "format": "int64",
2836
+ "example": "100"
2837
+ },
2833
2838
  "pending_order_count": {
2834
2839
  "type": "integer",
2835
2840
  "format": "int64",
@@ -2853,6 +2858,7 @@
2853
2858
  "l1_address",
2854
2859
  "cancel_all_time",
2855
2860
  "total_order_count",
2861
+ "total_isolated_order_count",
2856
2862
  "pending_order_count",
2857
2863
  "status",
2858
2864
  "collateral"
@@ -2905,6 +2911,44 @@
2905
2911
  "max_llp_percentage"
2906
2912
  ]
2907
2913
  },
2914
+ "AccountMarginStats": {
2915
+ "type": "object",
2916
+ "properties": {
2917
+ "collateral": {
2918
+ "type": "string",
2919
+ "example": "199955"
2920
+ },
2921
+ "portfolio_value": {
2922
+ "type": "string",
2923
+ "example": "199955"
2924
+ },
2925
+ "leverage": {
2926
+ "type": "string",
2927
+ "example": "1.0"
2928
+ },
2929
+ "available_balance": {
2930
+ "type": "string",
2931
+ "example": "199955"
2932
+ },
2933
+ "margin_usage": {
2934
+ "type": "string",
2935
+ "example": "0.0"
2936
+ },
2937
+ "buying_power": {
2938
+ "type": "string",
2939
+ "example": "199955"
2940
+ }
2941
+ },
2942
+ "title": "AccountMarginStats",
2943
+ "required": [
2944
+ "collateral",
2945
+ "portfolio_value",
2946
+ "leverage",
2947
+ "available_balance",
2948
+ "margin_usage",
2949
+ "buying_power"
2950
+ ]
2951
+ },
2908
2952
  "AccountMarketStats": {
2909
2953
  "type": "object",
2910
2954
  "properties": {
@@ -3135,6 +3179,15 @@
3135
3179
  "total_funding_paid_out": {
3136
3180
  "type": "string",
3137
3181
  "example": "34.2"
3182
+ },
3183
+ "margin_mode": {
3184
+ "type": "integer",
3185
+ "format": "int32",
3186
+ "example": "1"
3187
+ },
3188
+ "allocated_margin": {
3189
+ "type": "string",
3190
+ "example": "46342"
3138
3191
  }
3139
3192
  },
3140
3193
  "title": "AccountPosition",
@@ -3150,7 +3203,9 @@
3150
3203
  "avg_entry_price",
3151
3204
  "position_value",
3152
3205
  "unrealized_pnl",
3153
- "realized_pnl"
3206
+ "realized_pnl",
3207
+ "margin_mode",
3208
+ "allocated_margin"
3154
3209
  ]
3155
3210
  },
3156
3211
  "AccountStats": {
@@ -3179,6 +3234,12 @@
3179
3234
  "buying_power": {
3180
3235
  "type": "string",
3181
3236
  "example": "199955"
3237
+ },
3238
+ "cross_stats": {
3239
+ "$ref": "#/definitions/AccountMarginStats"
3240
+ },
3241
+ "total_stats": {
3242
+ "$ref": "#/definitions/AccountMarginStats"
3182
3243
  }
3183
3244
  },
3184
3245
  "title": "AccountStats",
@@ -3188,7 +3249,9 @@
3188
3249
  "leverage",
3189
3250
  "available_balance",
3190
3251
  "margin_usage",
3191
- "buying_power"
3252
+ "buying_power",
3253
+ "cross_stats",
3254
+ "total_stats"
3192
3255
  ]
3193
3256
  },
3194
3257
  "AccountTradeStats": {
@@ -3821,6 +3884,11 @@
3821
3884
  "format": "int64",
3822
3885
  "example": "100"
3823
3886
  },
3887
+ "total_isolated_order_count": {
3888
+ "type": "integer",
3889
+ "format": "int64",
3890
+ "example": "100"
3891
+ },
3824
3892
  "pending_order_count": {
3825
3893
  "type": "integer",
3826
3894
  "format": "int64",
@@ -3864,6 +3932,10 @@
3864
3932
  "type": "string",
3865
3933
  "example": "19995"
3866
3934
  },
3935
+ "cross_asset_value": {
3936
+ "type": "string",
3937
+ "example": "19995"
3938
+ },
3867
3939
  "pool_info": {
3868
3940
  "$ref": "#/definitions/PublicPoolInfo"
3869
3941
  },
@@ -3882,6 +3954,7 @@
3882
3954
  "l1_address",
3883
3955
  "cancel_all_time",
3884
3956
  "total_order_count",
3957
+ "total_isolated_order_count",
3885
3958
  "pending_order_count",
3886
3959
  "status",
3887
3960
  "collateral",
@@ -3892,6 +3965,7 @@
3892
3965
  "referral_points_percentage",
3893
3966
  "positions",
3894
3967
  "total_asset_value",
3968
+ "cross_asset_value",
3895
3969
  "pool_info",
3896
3970
  "shares"
3897
3971
  ]
@@ -5529,6 +5603,11 @@
5529
5603
  "format": "int64",
5530
5604
  "example": "100"
5531
5605
  },
5606
+ "total_isolated_order_count": {
5607
+ "type": "integer",
5608
+ "format": "int64",
5609
+ "example": "100"
5610
+ },
5532
5611
  "pending_order_count": {
5533
5612
  "type": "integer",
5534
5613
  "format": "int64",
@@ -5566,6 +5645,10 @@
5566
5645
  "type": "string",
5567
5646
  "example": "19995"
5568
5647
  },
5648
+ "cross_asset_value": {
5649
+ "type": "string",
5650
+ "example": "19995"
5651
+ },
5569
5652
  "pool_info": {
5570
5653
  "$ref": "#/definitions/PublicPoolInfo"
5571
5654
  },
@@ -5581,6 +5664,7 @@
5581
5664
  "l1_address",
5582
5665
  "cancel_all_time",
5583
5666
  "total_order_count",
5667
+ "total_isolated_order_count",
5584
5668
  "pending_order_count",
5585
5669
  "status",
5586
5670
  "collateral",
@@ -5590,6 +5674,7 @@
5590
5674
  "can_invite",
5591
5675
  "referral_points_percentage",
5592
5676
  "total_asset_value",
5677
+ "cross_asset_value",
5593
5678
  "pool_info"
5594
5679
  ]
5595
5680
  },
@@ -7061,6 +7146,29 @@
7061
7146
  "RiskInfo": {
7062
7147
  "type": "object",
7063
7148
  "properties": {
7149
+ "cross_risk_parameters": {
7150
+ "$ref": "#/definitions/RiskParameters"
7151
+ },
7152
+ "isolated_risk_parameters": {
7153
+ "type": "array",
7154
+ "items": {
7155
+ "$ref": "#/definitions/RiskParameters"
7156
+ }
7157
+ }
7158
+ },
7159
+ "title": "RiskInfo",
7160
+ "required": [
7161
+ "cross_risk_parameters",
7162
+ "isolated_risk_parameters"
7163
+ ]
7164
+ },
7165
+ "RiskParameters": {
7166
+ "type": "object",
7167
+ "properties": {
7168
+ "market_id": {
7169
+ "type": "integer",
7170
+ "format": "uint8"
7171
+ },
7064
7172
  "collateral": {
7065
7173
  "type": "string"
7066
7174
  },
@@ -7077,8 +7185,9 @@
7077
7185
  "type": "string"
7078
7186
  }
7079
7187
  },
7080
- "title": "RiskInfo",
7188
+ "title": "RiskParameters",
7081
7189
  "required": [
7190
+ "market_id",
7082
7191
  "collateral",
7083
7192
  "total_account_value",
7084
7193
  "initial_margin_req",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.131",
3
+ "version": "1.0.133",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {