zklighter-perps 1.0.126 → 1.0.128

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.
@@ -125,6 +125,7 @@ models/RespGetFastBridgeInfo.ts
125
125
  models/RespGetFastwithdrawalInfo.ts
126
126
  models/ResultCode.ts
127
127
  models/RiskInfo.ts
128
+ models/RiskParameters.ts
128
129
  models/SimpleOrder.ts
129
130
  models/Status.ts
130
131
  models/SubAccounts.ts
@@ -103,6 +103,7 @@ export interface LeaderboardRequest {
103
103
  type: LeaderboardTypeEnum;
104
104
  authorization?: string;
105
105
  l1_address?: string;
106
+ competition_id?: string;
106
107
  auth?: string;
107
108
  }
108
109
 
@@ -535,6 +536,10 @@ export class AccountApi extends runtime.BaseAPI {
535
536
  queryParameters['l1_address'] = requestParameters['l1_address'];
536
537
  }
537
538
 
539
+ if (requestParameters['competition_id'] != null) {
540
+ queryParameters['competition_id'] = requestParameters['competition_id'];
541
+ }
542
+
538
543
  if (requestParameters['auth'] != null) {
539
544
  queryParameters['auth'] = requestParameters['auth'];
540
545
  }
@@ -895,7 +900,8 @@ export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof Ac
895
900
  */
896
901
  export const LeaderboardTypeEnum = {
897
902
  Weekly: 'weekly',
898
- All: 'all'
903
+ All: 'all',
904
+ Competition: 'competition'
899
905
  } as const;
900
906
  export type LeaderboardTypeEnum = typeof LeaderboardTypeEnum[keyof typeof LeaderboardTypeEnum];
901
907
  /**
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'],
@@ -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
 
@@ -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}
@@ -164,6 +170,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
164
170
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
165
171
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
166
172
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
173
+ if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
167
174
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
168
175
  if (!('status' in value) || value['status'] === undefined) return false;
169
176
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -196,6 +203,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
196
203
  'l1_address': json['l1_address'],
197
204
  'cancel_all_time': json['cancel_all_time'],
198
205
  'total_order_count': json['total_order_count'],
206
+ 'total_isolated_order_count': json['total_isolated_order_count'],
199
207
  'pending_order_count': json['pending_order_count'],
200
208
  'status': json['status'],
201
209
  'collateral': json['collateral'],
@@ -224,6 +232,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
224
232
  'l1_address': value['l1_address'],
225
233
  'cancel_all_time': value['cancel_all_time'],
226
234
  'total_order_count': value['total_order_count'],
235
+ 'total_isolated_order_count': value['total_isolated_order_count'],
227
236
  'pending_order_count': value['pending_order_count'],
228
237
  'status': value['status'],
229
238
  'collateral': value['collateral'],
@@ -32,12 +32,6 @@ export interface Leaderboard {
32
32
  * @memberof Leaderboard
33
33
  */
34
34
  entries: Array<LeaderboardEntry>;
35
- /**
36
- *
37
- * @type {number}
38
- * @memberof Leaderboard
39
- */
40
- week_start: number;
41
35
  }
42
36
 
43
37
  /**
@@ -45,7 +39,6 @@ export interface Leaderboard {
45
39
  */
46
40
  export function instanceOfLeaderboard(value: object): value is Leaderboard {
47
41
  if (!('entries' in value) || value['entries'] === undefined) return false;
48
- if (!('week_start' in value) || value['week_start'] === undefined) return false;
49
42
  return true;
50
43
  }
51
44
 
@@ -60,7 +53,6 @@ export function LeaderboardFromJSONTyped(json: any, ignoreDiscriminator: boolean
60
53
  return {
61
54
 
62
55
  'entries': ((json['entries'] as Array<any>).map(LeaderboardEntryFromJSON)),
63
- 'week_start': json['week_start'],
64
56
  };
65
57
  }
66
58
 
@@ -71,7 +63,6 @@ export function LeaderboardToJSON(value?: Leaderboard | null): any {
71
63
  return {
72
64
 
73
65
  'entries': ((value['entries'] as Array<any>).map(LeaderboardEntryToJSON)),
74
- 'week_start': value['week_start'],
75
66
  };
76
67
  }
77
68
 
@@ -43,6 +43,12 @@ export interface LeaderboardEntry {
43
43
  * @memberof LeaderboardEntry
44
44
  */
45
45
  entryId: number;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof LeaderboardEntry
50
+ */
51
+ metadata: string;
46
52
  }
47
53
 
48
54
  /**
@@ -53,6 +59,7 @@ export function instanceOfLeaderboardEntry(value: object): value is LeaderboardE
53
59
  if (!('points' in value) || value['points'] === undefined) return false;
54
60
  if (!('entry' in value) || value['entry'] === undefined) return false;
55
61
  if (!('entryId' in value) || value['entryId'] === undefined) return false;
62
+ if (!('metadata' in value) || value['metadata'] === undefined) return false;
56
63
  return true;
57
64
  }
58
65
 
@@ -70,6 +77,7 @@ export function LeaderboardEntryFromJSONTyped(json: any, ignoreDiscriminator: bo
70
77
  'points': json['points'],
71
78
  'entry': json['entry'],
72
79
  'entryId': json['entryId'],
80
+ 'metadata': json['metadata'],
73
81
  };
74
82
  }
75
83
 
@@ -83,6 +91,7 @@ export function LeaderboardEntryToJSON(value?: LeaderboardEntry | null): any {
83
91
  'points': value['points'],
84
92
  'entry': value['entry'],
85
93
  'entryId': value['entryId'],
94
+ 'metadata': value['metadata'],
86
95
  };
87
96
  }
88
97
 
@@ -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}
@@ -152,6 +158,7 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
152
158
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
153
159
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
154
160
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
161
+ if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
155
162
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
156
163
  if (!('status' in value) || value['status'] === undefined) return false;
157
164
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -182,6 +189,7 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
182
189
  'l1_address': json['l1_address'],
183
190
  'cancel_all_time': json['cancel_all_time'],
184
191
  'total_order_count': json['total_order_count'],
192
+ 'total_isolated_order_count': json['total_isolated_order_count'],
185
193
  'pending_order_count': json['pending_order_count'],
186
194
  'status': json['status'],
187
195
  'collateral': json['collateral'],
@@ -209,6 +217,7 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
209
217
  'l1_address': value['l1_address'],
210
218
  'cancel_all_time': value['cancel_all_time'],
211
219
  'total_order_count': value['total_order_count'],
220
+ 'total_isolated_order_count': value['total_isolated_order_count'],
212
221
  'pending_order_count': value['pending_order_count'],
213
222
  'status': value['status'],
214
223
  'collateral': value['collateral'],
@@ -68,12 +68,6 @@ export interface ReferralPoints {
68
68
  * @memberof ReferralPoints
69
69
  */
70
70
  referral_with_account_count: number;
71
- /**
72
- *
73
- * @type {number}
74
- * @memberof ReferralPoints
75
- */
76
- week_start: number;
77
71
  /**
78
72
  *
79
73
  * @type {string}
@@ -93,7 +87,6 @@ export function instanceOfReferralPoints(value: object): value is ReferralPoints
93
87
  if (!('user_last_week_referral_reward_points' in value) || value['user_last_week_referral_reward_points'] === undefined) return false;
94
88
  if (!('all_referral_count' in value) || value['all_referral_count'] === undefined) return false;
95
89
  if (!('referral_with_account_count' in value) || value['referral_with_account_count'] === undefined) return false;
96
- if (!('week_start' in value) || value['week_start'] === undefined) return false;
97
90
  if (!('reward_point_multiplier' in value) || value['reward_point_multiplier'] === undefined) return false;
98
91
  return true;
99
92
  }
@@ -115,7 +108,6 @@ export function ReferralPointsFromJSONTyped(json: any, ignoreDiscriminator: bool
115
108
  'user_last_week_referral_reward_points': json['user_last_week_referral_reward_points'],
116
109
  'all_referral_count': json['all_referral_count'],
117
110
  'referral_with_account_count': json['referral_with_account_count'],
118
- 'week_start': json['week_start'],
119
111
  'reward_point_multiplier': json['reward_point_multiplier'],
120
112
  };
121
113
  }
@@ -133,7 +125,6 @@ export function ReferralPointsToJSON(value?: ReferralPoints | null): any {
133
125
  'user_last_week_referral_reward_points': value['user_last_week_referral_reward_points'],
134
126
  'all_referral_count': value['all_referral_count'],
135
127
  'referral_with_account_count': value['referral_with_account_count'],
136
- 'week_start': value['week_start'],
137
128
  'reward_point_multiplier': value['reward_point_multiplier'],
138
129
  };
139
130
  }
@@ -31,6 +31,12 @@ export interface ReqGetLeaderboard {
31
31
  * @memberof ReqGetLeaderboard
32
32
  */
33
33
  l1_address?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetLeaderboard
38
+ */
39
+ competition_id?: string;
34
40
  /**
35
41
  *
36
42
  * @type {string}
@@ -45,7 +51,8 @@ export interface ReqGetLeaderboard {
45
51
  */
46
52
  export const ReqGetLeaderboardTypeEnum = {
47
53
  Weekly: 'weekly',
48
- All: 'all'
54
+ All: 'all',
55
+ Competition: 'competition'
49
56
  } as const;
50
57
  export type ReqGetLeaderboardTypeEnum = typeof ReqGetLeaderboardTypeEnum[keyof typeof ReqGetLeaderboardTypeEnum];
51
58
 
@@ -70,6 +77,7 @@ export function ReqGetLeaderboardFromJSONTyped(json: any, ignoreDiscriminator: b
70
77
 
71
78
  'type': json['type'],
72
79
  'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
80
+ 'competition_id': json['competition_id'] == null ? undefined : json['competition_id'],
73
81
  'auth': json['auth'] == null ? undefined : json['auth'],
74
82
  };
75
83
  }
@@ -82,6 +90,7 @@ export function ReqGetLeaderboardToJSON(value?: ReqGetLeaderboard | null): any {
82
90
 
83
91
  'type': value['type'],
84
92
  'l1_address': value['l1_address'],
93
+ 'competition_id': value['competition_id'],
85
94
  'auth': value['auth'],
86
95
  };
87
96
  }
@@ -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
 
@@ -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 RiskParameters
20
+ */
21
+ export interface RiskParameters {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof RiskParameters
26
+ */
27
+ market_id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RiskParameters
32
+ */
33
+ collateral: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof RiskParameters
38
+ */
39
+ total_account_value: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RiskParameters
44
+ */
45
+ initial_margin_req: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof RiskParameters
50
+ */
51
+ maintenance_margin_req: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof RiskParameters
56
+ */
57
+ close_out_margin_req: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the RiskParameters interface.
62
+ */
63
+ export function instanceOfRiskParameters(value: object): value is RiskParameters {
64
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
65
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
66
+ if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
67
+ if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
68
+ if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
69
+ if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function RiskParametersFromJSON(json: any): RiskParameters {
74
+ return RiskParametersFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function RiskParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): RiskParameters {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'market_id': json['market_id'],
84
+ 'collateral': json['collateral'],
85
+ 'total_account_value': json['total_account_value'],
86
+ 'initial_margin_req': json['initial_margin_req'],
87
+ 'maintenance_margin_req': json['maintenance_margin_req'],
88
+ 'close_out_margin_req': json['close_out_margin_req'],
89
+ };
90
+ }
91
+
92
+ export function RiskParametersToJSON(value?: RiskParameters | null): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+
98
+ 'market_id': value['market_id'],
99
+ 'collateral': value['collateral'],
100
+ 'total_account_value': value['total_account_value'],
101
+ 'initial_margin_req': value['initial_margin_req'],
102
+ 'maintenance_margin_req': value['maintenance_margin_req'],
103
+ 'close_out_margin_req': value['close_out_margin_req'],
104
+ };
105
+ }
106
+
package/models/index.ts CHANGED
@@ -113,6 +113,7 @@ export * from './RespGetFastBridgeInfo';
113
113
  export * from './RespGetFastwithdrawalInfo';
114
114
  export * from './ResultCode';
115
115
  export * from './RiskInfo';
116
+ export * from './RiskParameters';
116
117
  export * from './SimpleOrder';
117
118
  export * from './Status';
118
119
  export * from './SubAccounts';
package/openapi.json CHANGED
@@ -1499,7 +1499,8 @@
1499
1499
  "type": "string",
1500
1500
  "enum": [
1501
1501
  "weekly",
1502
- "all"
1502
+ "all",
1503
+ "competition"
1503
1504
  ]
1504
1505
  },
1505
1506
  {
@@ -1508,6 +1509,12 @@
1508
1509
  "required": false,
1509
1510
  "type": "string"
1510
1511
  },
1512
+ {
1513
+ "name": "competition_id",
1514
+ "in": "query",
1515
+ "required": false,
1516
+ "type": "string"
1517
+ },
1511
1518
  {
1512
1519
  "name": "auth",
1513
1520
  "in": "query",
@@ -2823,6 +2830,11 @@
2823
2830
  "format": "int64",
2824
2831
  "example": "100"
2825
2832
  },
2833
+ "total_isolated_order_count": {
2834
+ "type": "integer",
2835
+ "format": "int64",
2836
+ "example": "100"
2837
+ },
2826
2838
  "pending_order_count": {
2827
2839
  "type": "integer",
2828
2840
  "format": "int64",
@@ -2846,6 +2858,7 @@
2846
2858
  "l1_address",
2847
2859
  "cancel_all_time",
2848
2860
  "total_order_count",
2861
+ "total_isolated_order_count",
2849
2862
  "pending_order_count",
2850
2863
  "status",
2851
2864
  "collateral"
@@ -3128,6 +3141,15 @@
3128
3141
  "total_funding_paid_out": {
3129
3142
  "type": "string",
3130
3143
  "example": "34.2"
3144
+ },
3145
+ "margin_mode": {
3146
+ "type": "integer",
3147
+ "format": "int32",
3148
+ "example": "1"
3149
+ },
3150
+ "allocated_margin": {
3151
+ "type": "string",
3152
+ "example": "46342"
3131
3153
  }
3132
3154
  },
3133
3155
  "title": "AccountPosition",
@@ -3143,7 +3165,9 @@
3143
3165
  "avg_entry_price",
3144
3166
  "position_value",
3145
3167
  "unrealized_pnl",
3146
- "realized_pnl"
3168
+ "realized_pnl",
3169
+ "margin_mode",
3170
+ "allocated_margin"
3147
3171
  ]
3148
3172
  },
3149
3173
  "AccountStats": {
@@ -3814,6 +3838,11 @@
3814
3838
  "format": "int64",
3815
3839
  "example": "100"
3816
3840
  },
3841
+ "total_isolated_order_count": {
3842
+ "type": "integer",
3843
+ "format": "int64",
3844
+ "example": "100"
3845
+ },
3817
3846
  "pending_order_count": {
3818
3847
  "type": "integer",
3819
3848
  "format": "int64",
@@ -3875,6 +3904,7 @@
3875
3904
  "l1_address",
3876
3905
  "cancel_all_time",
3877
3906
  "total_order_count",
3907
+ "total_isolated_order_count",
3878
3908
  "pending_order_count",
3879
3909
  "status",
3880
3910
  "collateral",
@@ -4418,17 +4448,11 @@
4418
4448
  "items": {
4419
4449
  "$ref": "#/definitions/LeaderboardEntry"
4420
4450
  }
4421
- },
4422
- "week_start": {
4423
- "type": "integer",
4424
- "format": "int64",
4425
- "example": "1730073600000"
4426
4451
  }
4427
4452
  },
4428
4453
  "title": "Leaderboard",
4429
4454
  "required": [
4430
- "entries",
4431
- "week_start"
4455
+ "entries"
4432
4456
  ]
4433
4457
  },
4434
4458
  "LeaderboardEntry": {
@@ -4450,6 +4474,10 @@
4450
4474
  "entryId": {
4451
4475
  "type": "integer",
4452
4476
  "format": "int32"
4477
+ },
4478
+ "metadata": {
4479
+ "type": "string",
4480
+ "example": "{}"
4453
4481
  }
4454
4482
  },
4455
4483
  "title": "LeaderboardEntry",
@@ -4457,7 +4485,8 @@
4457
4485
  "l1_address",
4458
4486
  "points",
4459
4487
  "entry",
4460
- "entryId"
4488
+ "entryId",
4489
+ "metadata"
4461
4490
  ]
4462
4491
  },
4463
4492
  "LiqTrade": {
@@ -5517,6 +5546,11 @@
5517
5546
  "format": "int64",
5518
5547
  "example": "100"
5519
5548
  },
5549
+ "total_isolated_order_count": {
5550
+ "type": "integer",
5551
+ "format": "int64",
5552
+ "example": "100"
5553
+ },
5520
5554
  "pending_order_count": {
5521
5555
  "type": "integer",
5522
5556
  "format": "int64",
@@ -5569,6 +5603,7 @@
5569
5603
  "l1_address",
5570
5604
  "cancel_all_time",
5571
5605
  "total_order_count",
5606
+ "total_isolated_order_count",
5572
5607
  "pending_order_count",
5573
5608
  "status",
5574
5609
  "collateral",
@@ -5805,11 +5840,6 @@
5805
5840
  "format": "int32",
5806
5841
  "example": "100"
5807
5842
  },
5808
- "week_start": {
5809
- "type": "integer",
5810
- "format": "int64",
5811
- "example": "1730073600000"
5812
- },
5813
5843
  "reward_point_multiplier": {
5814
5844
  "type": "string",
5815
5845
  "example": "0.1"
@@ -5824,7 +5854,6 @@
5824
5854
  "user_last_week_referral_reward_points",
5825
5855
  "all_referral_count",
5826
5856
  "referral_with_account_count",
5827
- "week_start",
5828
5857
  "reward_point_multiplier"
5829
5858
  ]
5830
5859
  },
@@ -6473,12 +6502,16 @@
6473
6502
  "type": "string",
6474
6503
  "enum": [
6475
6504
  "weekly",
6476
- "all"
6505
+ "all",
6506
+ "competition"
6477
6507
  ]
6478
6508
  },
6479
6509
  "l1_address": {
6480
6510
  "type": "string"
6481
6511
  },
6512
+ "competition_id": {
6513
+ "type": "string"
6514
+ },
6482
6515
  "auth": {
6483
6516
  "type": "string"
6484
6517
  }
@@ -7058,6 +7091,29 @@
7058
7091
  "RiskInfo": {
7059
7092
  "type": "object",
7060
7093
  "properties": {
7094
+ "cross_risk_parameters": {
7095
+ "$ref": "#/definitions/RiskParameters"
7096
+ },
7097
+ "isolated_risk_parameters": {
7098
+ "type": "array",
7099
+ "items": {
7100
+ "$ref": "#/definitions/RiskParameters"
7101
+ }
7102
+ }
7103
+ },
7104
+ "title": "RiskInfo",
7105
+ "required": [
7106
+ "cross_risk_parameters",
7107
+ "isolated_risk_parameters"
7108
+ ]
7109
+ },
7110
+ "RiskParameters": {
7111
+ "type": "object",
7112
+ "properties": {
7113
+ "market_id": {
7114
+ "type": "integer",
7115
+ "format": "uint8"
7116
+ },
7061
7117
  "collateral": {
7062
7118
  "type": "string"
7063
7119
  },
@@ -7074,8 +7130,9 @@
7074
7130
  "type": "string"
7075
7131
  }
7076
7132
  },
7077
- "title": "RiskInfo",
7133
+ "title": "RiskParameters",
7078
7134
  "required": [
7135
+ "market_id",
7079
7136
  "collateral",
7080
7137
  "total_account_value",
7081
7138
  "initial_margin_req",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.126",
3
+ "version": "1.0.128",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {