zklighter-perps 1.0.310 → 1.0.312

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.
@@ -169,7 +169,6 @@ models/ReqGetAccount.ts
169
169
  models/ReqGetAccountActiveOrders.ts
170
170
  models/ReqGetAccountApiKeys.ts
171
171
  models/ReqGetAccountByL1Address.ts
172
- models/ReqGetAccountEvents.ts
173
172
  models/ReqGetAccountInactiveOrders.ts
174
173
  models/ReqGetAccountLimits.ts
175
174
  models/ReqGetAccountMetadata.ts
package/apis/EventApi.ts CHANGED
@@ -31,14 +31,6 @@ import {
31
31
  ResultCodeToJSON,
32
32
  } from '../models/index';
33
33
 
34
- export interface AccountEventsRequest {
35
- account_index: number;
36
- authorization?: string;
37
- auth?: string;
38
- cursor?: number;
39
- limit?: number;
40
- }
41
-
42
34
  export interface EventCreateRequest {
43
35
  account_index: number;
44
36
  title: string;
@@ -76,7 +68,8 @@ export interface EventUpdateRequest {
76
68
  }
77
69
 
78
70
  export interface EventsRequest {
79
- event_id?: number;
71
+ event_ids?: string;
72
+ market_ids?: string;
80
73
  creator_account_index?: number;
81
74
  cursor?: number;
82
75
  active?: boolean;
@@ -94,61 +87,6 @@ export interface EventsRequest {
94
87
  */
95
88
  export class EventApi extends runtime.BaseAPI {
96
89
 
97
- /**
98
- * Get registered events present in an authenticated account\'s retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database.
99
- * accountEvents
100
- */
101
- async accountEventsRaw(requestParameters: AccountEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetEvents>> {
102
- if (requestParameters['account_index'] == null) {
103
- throw new runtime.RequiredError(
104
- 'account_index',
105
- 'Required parameter "account_index" was null or undefined when calling accountEvents().'
106
- );
107
- }
108
-
109
- const queryParameters: any = {};
110
-
111
- if (requestParameters['authorization'] != null) {
112
- queryParameters['authorization'] = requestParameters['authorization'];
113
- }
114
-
115
- if (requestParameters['auth'] != null) {
116
- queryParameters['auth'] = requestParameters['auth'];
117
- }
118
-
119
- if (requestParameters['account_index'] != null) {
120
- queryParameters['account_index'] = requestParameters['account_index'];
121
- }
122
-
123
- if (requestParameters['cursor'] != null) {
124
- queryParameters['cursor'] = requestParameters['cursor'];
125
- }
126
-
127
- if (requestParameters['limit'] != null) {
128
- queryParameters['limit'] = requestParameters['limit'];
129
- }
130
-
131
- const headerParameters: runtime.HTTPHeaders = {};
132
-
133
- const response = await this.request({
134
- path: `/api/v1/accountEvents`,
135
- method: 'GET',
136
- headers: headerParameters,
137
- query: queryParameters,
138
- }, initOverrides);
139
-
140
- return new runtime.JSONApiResponse(response, (jsonValue) => RespGetEventsFromJSON(jsonValue));
141
- }
142
-
143
- /**
144
- * Get registered events present in an authenticated account\'s retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database.
145
- * accountEvents
146
- */
147
- async accountEvents(requestParameters: AccountEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetEvents> {
148
- const response = await this.accountEventsRaw(requestParameters, initOverrides);
149
- return await response.value();
150
- }
151
-
152
90
  /**
153
91
  * Create a binary options event
154
92
  * event_create
@@ -443,14 +381,18 @@ export class EventApi extends runtime.BaseAPI {
443
381
  }
444
382
 
445
383
  /**
446
- * Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
384
+ * Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
447
385
  * events
448
386
  */
449
387
  async eventsRaw(requestParameters: EventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetEvents>> {
450
388
  const queryParameters: any = {};
451
389
 
452
- if (requestParameters['event_id'] != null) {
453
- queryParameters['event_id'] = requestParameters['event_id'];
390
+ if (requestParameters['event_ids'] != null) {
391
+ queryParameters['event_ids'] = requestParameters['event_ids'];
392
+ }
393
+
394
+ if (requestParameters['market_ids'] != null) {
395
+ queryParameters['market_ids'] = requestParameters['market_ids'];
454
396
  }
455
397
 
456
398
  if (requestParameters['creator_account_index'] != null) {
@@ -506,7 +448,7 @@ export class EventApi extends runtime.BaseAPI {
506
448
  }
507
449
 
508
450
  /**
509
- * Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
451
+ * Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events.
510
452
  * events
511
453
  */
512
454
  async events(requestParameters: EventsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetEvents> {
package/apis/OrderApi.ts CHANGED
@@ -1031,7 +1031,8 @@ export type ExportTradeTypeEnum = typeof ExportTradeTypeEnum[keyof typeof Export
1031
1031
  export const AccountActiveOrdersMarketTypeEnum = {
1032
1032
  All: 'all',
1033
1033
  Spot: 'spot',
1034
- Perp: 'perp'
1034
+ Perp: 'perp',
1035
+ Bo: 'bo'
1035
1036
  } as const;
1036
1037
  export type AccountActiveOrdersMarketTypeEnum = typeof AccountActiveOrdersMarketTypeEnum[keyof typeof AccountActiveOrdersMarketTypeEnum];
1037
1038
  /**
@@ -1040,7 +1041,8 @@ export type AccountActiveOrdersMarketTypeEnum = typeof AccountActiveOrdersMarket
1040
1041
  export const AccountInactiveOrdersMarketTypeEnum = {
1041
1042
  All: 'all',
1042
1043
  Spot: 'spot',
1043
- Perp: 'perp'
1044
+ Perp: 'perp',
1045
+ Bo: 'bo'
1044
1046
  } as const;
1045
1047
  export type AccountInactiveOrdersMarketTypeEnum = typeof AccountInactiveOrdersMarketTypeEnum[keyof typeof AccountInactiveOrdersMarketTypeEnum];
1046
1048
  /**
@@ -1113,8 +1115,7 @@ export type MarketMetricsKindEnum = typeof MarketMetricsKindEnum[keyof typeof Ma
1113
1115
  export const OrderBookDetailsFilterEnum = {
1114
1116
  All: 'all',
1115
1117
  Spot: 'spot',
1116
- Perp: 'perp',
1117
- BinaryOptions: 'binary_options'
1118
+ Perp: 'perp'
1118
1119
  } as const;
1119
1120
  export type OrderBookDetailsFilterEnum = typeof OrderBookDetailsFilterEnum[keyof typeof OrderBookDetailsFilterEnum];
1120
1121
  /**
@@ -1123,8 +1124,7 @@ export type OrderBookDetailsFilterEnum = typeof OrderBookDetailsFilterEnum[keyof
1123
1124
  export const OrderBooksFilterEnum = {
1124
1125
  All: 'all',
1125
1126
  Spot: 'spot',
1126
- Perp: 'perp',
1127
- BinaryOptions: 'binary_options'
1127
+ Perp: 'perp'
1128
1128
  } as const;
1129
1129
  export type OrderBooksFilterEnum = typeof OrderBooksFilterEnum[keyof typeof OrderBooksFilterEnum];
1130
1130
  /**
@@ -1142,7 +1142,8 @@ export type TradesSortByEnum = typeof TradesSortByEnum[keyof typeof TradesSortBy
1142
1142
  export const TradesMarketTypeEnum = {
1143
1143
  All: 'all',
1144
1144
  Spot: 'spot',
1145
- Perp: 'perp'
1145
+ Perp: 'perp',
1146
+ Bo: 'bo'
1146
1147
  } as const;
1147
1148
  export type TradesMarketTypeEnum = typeof TradesMarketTypeEnum[keyof typeof TradesMarketTypeEnum];
1148
1149
  /**
@@ -187,7 +187,7 @@ export interface EventOrderBookEntry {
187
187
  * @type {number}
188
188
  * @memberof EventOrderBookEntry
189
189
  */
190
- settlement_type: number;
190
+ settlement_type: EventOrderBookEntrySettlementTypeEnum;
191
191
  /**
192
192
  *
193
193
  * @type {number}
@@ -206,6 +206,18 @@ export interface EventOrderBookEntry {
206
206
  * @memberof EventOrderBookEntry
207
207
  */
208
208
  is_frozen: boolean;
209
+ /**
210
+ *
211
+ * @type {number}
212
+ * @memberof EventOrderBookEntry
213
+ */
214
+ size_decimals: number;
215
+ /**
216
+ *
217
+ * @type {number}
218
+ * @memberof EventOrderBookEntry
219
+ */
220
+ price_decimals: number;
209
221
  /**
210
222
  *
211
223
  * @type {BinaryOptionMarketStats}
@@ -244,6 +256,15 @@ export const EventOrderBookEntryOutcomeEnum = {
244
256
  } as const;
245
257
  export type EventOrderBookEntryOutcomeEnum = typeof EventOrderBookEntryOutcomeEnum[keyof typeof EventOrderBookEntryOutcomeEnum];
246
258
 
259
+ /**
260
+ * @export
261
+ */
262
+ export const EventOrderBookEntrySettlementTypeEnum = {
263
+ Discrete: 0,
264
+ Continuous: 1
265
+ } as const;
266
+ export type EventOrderBookEntrySettlementTypeEnum = typeof EventOrderBookEntrySettlementTypeEnum[keyof typeof EventOrderBookEntrySettlementTypeEnum];
267
+
247
268
 
248
269
  /**
249
270
  * Check if a given object implements the EventOrderBookEntry interface.
@@ -279,6 +300,8 @@ export function instanceOfEventOrderBookEntry(value: object): value is EventOrde
279
300
  if (!('settlement_price' in value) || value['settlement_price'] === undefined) return false;
280
301
  if (!('default_price' in value) || value['default_price'] === undefined) return false;
281
302
  if (!('is_frozen' in value) || value['is_frozen'] === undefined) return false;
303
+ if (!('size_decimals' in value) || value['size_decimals'] === undefined) return false;
304
+ if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
282
305
  if (!('stats' in value) || value['stats'] === undefined) return false;
283
306
  return true;
284
307
  }
@@ -323,6 +346,8 @@ export function EventOrderBookEntryFromJSONTyped(json: any, ignoreDiscriminator:
323
346
  'settlement_price': json['settlement_price'],
324
347
  'default_price': json['default_price'],
325
348
  'is_frozen': json['is_frozen'],
349
+ 'size_decimals': json['size_decimals'],
350
+ 'price_decimals': json['price_decimals'],
326
351
  'stats': BinaryOptionMarketStatsFromJSON(json['stats']),
327
352
  };
328
353
  }
@@ -363,6 +388,8 @@ export function EventOrderBookEntryToJSON(value?: EventOrderBookEntry | null): a
363
388
  'settlement_price': value['settlement_price'],
364
389
  'default_price': value['default_price'],
365
390
  'is_frozen': value['is_frozen'],
391
+ 'size_decimals': value['size_decimals'],
392
+ 'price_decimals': value['price_decimals'],
366
393
  'stats': BinaryOptionMarketStatsToJSON(value['stats']),
367
394
  };
368
395
  }
@@ -36,7 +36,7 @@ export interface MarketConfig {
36
36
  * @type {number}
37
37
  * @memberof MarketConfig
38
38
  */
39
- liquidation_mode: number;
39
+ liquidation_mode: MarketConfigLiquidationModeEnum;
40
40
  /**
41
41
  *
42
42
  * @type {boolean}
@@ -79,6 +79,15 @@ export const MarketConfigMarketMarginModeEnum = {
79
79
  } as const;
80
80
  export type MarketConfigMarketMarginModeEnum = typeof MarketConfigMarketMarginModeEnum[keyof typeof MarketConfigMarketMarginModeEnum];
81
81
 
82
+ /**
83
+ * @export
84
+ */
85
+ export const MarketConfigLiquidationModeEnum = {
86
+ All: 0,
87
+ DisableInsuranceFund: 1
88
+ } as const;
89
+ export type MarketConfigLiquidationModeEnum = typeof MarketConfigLiquidationModeEnum[keyof typeof MarketConfigLiquidationModeEnum];
90
+
82
91
 
83
92
  /**
84
93
  * Check if a given object implements the MarketConfig interface.
@@ -49,6 +49,12 @@ export interface NotificationPreferences {
49
49
  * @memberof NotificationPreferences
50
50
  */
51
51
  order_filled_enabled: boolean;
52
+ /**
53
+ *
54
+ * @type {boolean}
55
+ * @memberof NotificationPreferences
56
+ */
57
+ cashflow_enabled: boolean;
52
58
  }
53
59
 
54
60
  /**
@@ -60,6 +66,7 @@ export function instanceOfNotificationPreferences(value: object): value is Notif
60
66
  if (!('private_announcements_enabled' in value) || value['private_announcements_enabled'] === undefined) return false;
61
67
  if (!('price_alerts_enabled' in value) || value['price_alerts_enabled'] === undefined) return false;
62
68
  if (!('order_filled_enabled' in value) || value['order_filled_enabled'] === undefined) return false;
69
+ if (!('cashflow_enabled' in value) || value['cashflow_enabled'] === undefined) return false;
63
70
  return true;
64
71
  }
65
72
 
@@ -78,6 +85,7 @@ export function NotificationPreferencesFromJSONTyped(json: any, ignoreDiscrimina
78
85
  'private_announcements_enabled': json['private_announcements_enabled'],
79
86
  'price_alerts_enabled': json['price_alerts_enabled'],
80
87
  'order_filled_enabled': json['order_filled_enabled'],
88
+ 'cashflow_enabled': json['cashflow_enabled'],
81
89
  };
82
90
  }
83
91
 
@@ -92,6 +100,7 @@ export function NotificationPreferencesToJSON(value?: NotificationPreferences |
92
100
  'private_announcements_enabled': value['private_announcements_enabled'],
93
101
  'price_alerts_enabled': value['price_alerts_enabled'],
94
102
  'order_filled_enabled': value['order_filled_enabled'],
103
+ 'cashflow_enabled': value['cashflow_enabled'],
95
104
  };
96
105
  }
97
106
 
@@ -180,7 +180,7 @@ export interface OrderBook {
180
180
  * @type {number}
181
181
  * @memberof OrderBook
182
182
  */
183
- settlement_type: number;
183
+ settlement_type: OrderBookSettlementTypeEnum;
184
184
  /**
185
185
  *
186
186
  * @type {number}
@@ -231,6 +231,15 @@ export const OrderBookOutcomeEnum = {
231
231
  } as const;
232
232
  export type OrderBookOutcomeEnum = typeof OrderBookOutcomeEnum[keyof typeof OrderBookOutcomeEnum];
233
233
 
234
+ /**
235
+ * @export
236
+ */
237
+ export const OrderBookSettlementTypeEnum = {
238
+ Discrete: 0,
239
+ Continuous: 1
240
+ } as const;
241
+ export type OrderBookSettlementTypeEnum = typeof OrderBookSettlementTypeEnum[keyof typeof OrderBookSettlementTypeEnum];
242
+
234
243
 
235
244
  /**
236
245
  * Check if a given object implements the OrderBook interface.
@@ -187,7 +187,7 @@ export interface PerpsOrderBookDetail {
187
187
  * @type {number}
188
188
  * @memberof PerpsOrderBookDetail
189
189
  */
190
- settlement_type: number;
190
+ settlement_type: PerpsOrderBookDetailSettlementTypeEnum;
191
191
  /**
192
192
  *
193
193
  * @type {number}
@@ -382,6 +382,15 @@ export const PerpsOrderBookDetailOutcomeEnum = {
382
382
  } as const;
383
383
  export type PerpsOrderBookDetailOutcomeEnum = typeof PerpsOrderBookDetailOutcomeEnum[keyof typeof PerpsOrderBookDetailOutcomeEnum];
384
384
 
385
+ /**
386
+ * @export
387
+ */
388
+ export const PerpsOrderBookDetailSettlementTypeEnum = {
389
+ Discrete: 0,
390
+ Continuous: 1
391
+ } as const;
392
+ export type PerpsOrderBookDetailSettlementTypeEnum = typeof PerpsOrderBookDetailSettlementTypeEnum[keyof typeof PerpsOrderBookDetailSettlementTypeEnum];
393
+
385
394
 
386
395
  /**
387
396
  * Check if a given object implements the PerpsOrderBookDetail interface.
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface PnLV2Entry
20
20
  */
21
21
  export interface PnLV2Entry {
22
+ /**
23
+ * quote volume in USDC for this bucket; summary.volume is the sum
24
+ * @type {number}
25
+ * @memberof PnLV2Entry
26
+ */
27
+ volume: number;
22
28
  /**
23
29
  *
24
30
  * @type {number}
@@ -133,6 +139,7 @@ export interface PnLV2Entry {
133
139
  * Check if a given object implements the PnLV2Entry interface.
134
140
  */
135
141
  export function instanceOfPnLV2Entry(value: object): value is PnLV2Entry {
142
+ if (!('volume' in value) || value['volume'] === undefined) return false;
136
143
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
137
144
  if (!('interval_start_timestamp' in value) || value['interval_start_timestamp'] === undefined) return false;
138
145
  if (!('is_final' in value) || value['is_final'] === undefined) return false;
@@ -164,6 +171,7 @@ export function PnLV2EntryFromJSONTyped(json: any, ignoreDiscriminator: boolean)
164
171
  }
165
172
  return {
166
173
 
174
+ 'volume': json['volume'],
167
175
  'timestamp': json['timestamp'],
168
176
  'interval_start_timestamp': json['interval_start_timestamp'],
169
177
  'is_final': json['is_final'],
@@ -191,6 +199,7 @@ export function PnLV2EntryToJSON(value?: PnLV2Entry | null): any {
191
199
  }
192
200
  return {
193
201
 
202
+ 'volume': value['volume'],
194
203
  'timestamp': value['timestamp'],
195
204
  'interval_start_timestamp': value['interval_start_timestamp'],
196
205
  'is_final': value['is_final'],
@@ -52,7 +52,8 @@ export interface ReqGetAccountActiveOrders {
52
52
  export const ReqGetAccountActiveOrdersMarketTypeEnum = {
53
53
  All: 'all',
54
54
  Spot: 'spot',
55
- Perp: 'perp'
55
+ Perp: 'perp',
56
+ Bo: 'bo'
56
57
  } as const;
57
58
  export type ReqGetAccountActiveOrdersMarketTypeEnum = typeof ReqGetAccountActiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountActiveOrdersMarketTypeEnum];
58
59
 
@@ -76,7 +76,8 @@ export interface ReqGetAccountInactiveOrders {
76
76
  export const ReqGetAccountInactiveOrdersMarketTypeEnum = {
77
77
  All: 'all',
78
78
  Spot: 'spot',
79
- Perp: 'perp'
79
+ Perp: 'perp',
80
+ Bo: 'bo'
80
81
  } as const;
81
82
  export type ReqGetAccountInactiveOrdersMarketTypeEnum = typeof ReqGetAccountInactiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountInactiveOrdersMarketTypeEnum];
82
83
 
@@ -20,11 +20,17 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetEvents {
22
22
  /**
23
- *
24
- * @type {number}
23
+ * comma-separated positive IDs, max 50
24
+ * @type {string}
25
+ * @memberof ReqGetEvents
26
+ */
27
+ event_ids?: string;
28
+ /**
29
+ * comma-separated positive IDs, max 50
30
+ * @type {string}
25
31
  * @memberof ReqGetEvents
26
32
  */
27
- event_id?: number;
33
+ market_ids?: string;
28
34
  /**
29
35
  *
30
36
  * @type {number}
@@ -133,7 +139,8 @@ export function ReqGetEventsFromJSONTyped(json: any, ignoreDiscriminator: boolea
133
139
  }
134
140
  return {
135
141
 
136
- 'event_id': json['event_id'] == null ? undefined : json['event_id'],
142
+ 'event_ids': json['event_ids'] == null ? undefined : json['event_ids'],
143
+ 'market_ids': json['market_ids'] == null ? undefined : json['market_ids'],
137
144
  'creator_account_index': json['creator_account_index'] == null ? undefined : json['creator_account_index'],
138
145
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
139
146
  'active': json['active'] == null ? undefined : json['active'],
@@ -153,7 +160,8 @@ export function ReqGetEventsToJSON(value?: ReqGetEvents | null): any {
153
160
  }
154
161
  return {
155
162
 
156
- 'event_id': value['event_id'],
163
+ 'event_ids': value['event_ids'],
164
+ 'market_ids': value['market_ids'],
157
165
  'creator_account_index': value['creator_account_index'],
158
166
  'cursor': value['cursor'],
159
167
  'active': value['active'],
@@ -40,8 +40,7 @@ export interface ReqGetOrderBookDetails {
40
40
  export const ReqGetOrderBookDetailsFilterEnum = {
41
41
  All: 'all',
42
42
  Spot: 'spot',
43
- Perp: 'perp',
44
- BinaryOptions: 'binary_options'
43
+ Perp: 'perp'
45
44
  } as const;
46
45
  export type ReqGetOrderBookDetailsFilterEnum = typeof ReqGetOrderBookDetailsFilterEnum[keyof typeof ReqGetOrderBookDetailsFilterEnum];
47
46
 
@@ -40,8 +40,7 @@ export interface ReqGetOrderBooks {
40
40
  export const ReqGetOrderBooksFilterEnum = {
41
41
  All: 'all',
42
42
  Spot: 'spot',
43
- Perp: 'perp',
44
- BinaryOptions: 'binary_options'
43
+ Perp: 'perp'
45
44
  } as const;
46
45
  export type ReqGetOrderBooksFilterEnum = typeof ReqGetOrderBooksFilterEnum[keyof typeof ReqGetOrderBooksFilterEnum];
47
46
 
@@ -130,7 +130,8 @@ export interface ReqGetTrades {
130
130
  export const ReqGetTradesMarketTypeEnum = {
131
131
  All: 'all',
132
132
  Spot: 'spot',
133
- Perp: 'perp'
133
+ Perp: 'perp',
134
+ Bo: 'bo'
134
135
  } as const;
135
136
  export type ReqGetTradesMarketTypeEnum = typeof ReqGetTradesMarketTypeEnum[keyof typeof ReqGetTradesMarketTypeEnum];
136
137
 
@@ -180,7 +180,7 @@ export interface SpotOrderBookDetail {
180
180
  * @type {number}
181
181
  * @memberof SpotOrderBookDetail
182
182
  */
183
- settlement_type: number;
183
+ settlement_type: SpotOrderBookDetailSettlementTypeEnum;
184
184
  /**
185
185
  *
186
186
  * @type {number}
@@ -291,6 +291,15 @@ export const SpotOrderBookDetailOutcomeEnum = {
291
291
  } as const;
292
292
  export type SpotOrderBookDetailOutcomeEnum = typeof SpotOrderBookDetailOutcomeEnum[keyof typeof SpotOrderBookDetailOutcomeEnum];
293
293
 
294
+ /**
295
+ * @export
296
+ */
297
+ export const SpotOrderBookDetailSettlementTypeEnum = {
298
+ Discrete: 0,
299
+ Continuous: 1
300
+ } as const;
301
+ export type SpotOrderBookDetailSettlementTypeEnum = typeof SpotOrderBookDetailSettlementTypeEnum[keyof typeof SpotOrderBookDetailSettlementTypeEnum];
302
+
294
303
 
295
304
  /**
296
305
  * Check if a given object implements the SpotOrderBookDetail interface.
package/models/index.ts CHANGED
@@ -143,7 +143,6 @@ export * from './ReqGetAccount';
143
143
  export * from './ReqGetAccountActiveOrders';
144
144
  export * from './ReqGetAccountApiKeys';
145
145
  export * from './ReqGetAccountByL1Address';
146
- export * from './ReqGetAccountEvents';
147
146
  export * from './ReqGetAccountInactiveOrders';
148
147
  export * from './ReqGetAccountLimits';
149
148
  export * from './ReqGetAccountMetadata';
package/openapi.json CHANGED
@@ -154,7 +154,8 @@
154
154
  "enum": [
155
155
  "all",
156
156
  "spot",
157
- "perp"
157
+ "perp",
158
+ "bo"
158
159
  ],
159
160
  "default": "all"
160
161
  }
@@ -168,77 +169,6 @@
168
169
  "description": "Get account active orders. `auth` can be generated using the SDK."
169
170
  }
170
171
  },
171
- "/api/v1/accountEvents": {
172
- "get": {
173
- "summary": "accountEvents",
174
- "operationId": "accountEvents",
175
- "responses": {
176
- "200": {
177
- "description": "A successful response.",
178
- "schema": {
179
- "$ref": "#/definitions/RespGetEvents"
180
- }
181
- },
182
- "400": {
183
- "description": "Bad request",
184
- "schema": {
185
- "$ref": "#/definitions/ResultCode"
186
- }
187
- }
188
- },
189
- "parameters": [
190
- {
191
- "name": "authorization",
192
- "description": " make required after integ is done",
193
- "in": "query",
194
- "required": false,
195
- "type": "string"
196
- },
197
- {
198
- "name": "auth",
199
- "description": " made optional to support header auth clients",
200
- "in": "query",
201
- "required": false,
202
- "type": "string"
203
- },
204
- {
205
- "name": "account_index",
206
- "in": "query",
207
- "required": true,
208
- "type": "integer",
209
- "format": "int64",
210
- "minimum": 0,
211
- "maximum": 281474976710654
212
- },
213
- {
214
- "name": "cursor",
215
- "in": "query",
216
- "required": false,
217
- "type": "integer",
218
- "format": "int64",
219
- "minimum": 1,
220
- "maximum": 9223372036854776000
221
- },
222
- {
223
- "name": "limit",
224
- "in": "query",
225
- "required": false,
226
- "type": "integer",
227
- "format": "int64",
228
- "default": "100",
229
- "minimum": 1,
230
- "maximum": 100
231
- }
232
- ],
233
- "tags": [
234
- "event"
235
- ],
236
- "consumes": [
237
- "multipart/form-data"
238
- ],
239
- "description": "Get registered events present in an authenticated account's retained trade history. Events disappear once all of their account trades are pruned. Ordered by descending event id; cursor is exclusive. Returns the same event details and registered outcomes as /api/v1/events. next_cursor is 0 when no more events remain. Participation is indexed asynchronously; orders with no fills are excluded. Missing cached event metadata is loaded from the database."
240
- }
241
- },
242
172
  "/api/v1/accountInactiveOrders": {
243
173
  "get": {
244
174
  "summary": "accountInactiveOrders",
@@ -295,7 +225,8 @@
295
225
  "enum": [
296
226
  "all",
297
227
  "spot",
298
- "perp"
228
+ "perp",
229
+ "bo"
299
230
  ],
300
231
  "default": "all"
301
232
  },
@@ -1841,11 +1772,18 @@
1841
1772
  },
1842
1773
  "parameters": [
1843
1774
  {
1844
- "name": "event_id",
1775
+ "name": "event_ids",
1776
+ "description": " comma-separated positive IDs, max 50",
1845
1777
  "in": "query",
1846
1778
  "required": false,
1847
- "type": "integer",
1848
- "format": "int64"
1779
+ "type": "string"
1780
+ },
1781
+ {
1782
+ "name": "market_ids",
1783
+ "description": " comma-separated positive IDs, max 50",
1784
+ "in": "query",
1785
+ "required": false,
1786
+ "type": "string"
1849
1787
  },
1850
1788
  {
1851
1789
  "name": "creator_account_index",
@@ -1940,7 +1878,7 @@
1940
1878
  "consumes": [
1941
1879
  "multipart/form-data"
1942
1880
  ],
1943
- "description": "Get events and registered order books, including scheduled events with no books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events."
1881
+ "description": "Get events and registered order books, including scheduled events with no books. event_ids and market_ids accept up to 50 comma-separated positive IDs, are mutually exclusive, and use the same filters, sorting and pagination. market_ids returns each related event once with all its order books. Defaults to descending id. Occurrence sorting uses (occurrence_start_at, event_id); cursor identifies an existing event and excludes it in the requested direction. tag filters across creators; creator_account_index is an optional additional filter. active=true requires a tradeable outcome; active=false includes scheduled and closed events."
1944
1882
  }
1945
1883
  },
1946
1884
  "/api/v1/exchangeMetrics": {
@@ -4427,8 +4365,7 @@
4427
4365
  "enum": [
4428
4366
  "all",
4429
4367
  "spot",
4430
- "perp",
4431
- "binary_options"
4368
+ "perp"
4432
4369
  ],
4433
4370
  "default": "all"
4434
4371
  }
@@ -4522,8 +4459,7 @@
4522
4459
  "enum": [
4523
4460
  "all",
4524
4461
  "spot",
4525
- "perp",
4526
- "binary_options"
4462
+ "perp"
4527
4463
  ],
4528
4464
  "default": "all"
4529
4465
  }
@@ -6416,7 +6352,8 @@
6416
6352
  "enum": [
6417
6353
  "all",
6418
6354
  "spot",
6419
- "perp"
6355
+ "perp",
6356
+ "bo"
6420
6357
  ],
6421
6358
  "default": "all"
6422
6359
  },
@@ -10016,8 +9953,15 @@
10016
9953
  },
10017
9954
  "settlement_type": {
10018
9955
  "type": "integer",
10019
- "format": "uint8",
10020
- "example": "0"
9956
+ "format": "int32",
9957
+ "enum": [
9958
+ 0,
9959
+ 1
9960
+ ],
9961
+ "x-enum-varnames": [
9962
+ "Discrete",
9963
+ "Continuous"
9964
+ ]
10021
9965
  },
10022
9966
  "settlement_price": {
10023
9967
  "type": "integer",
@@ -10034,6 +9978,16 @@
10034
9978
  "format": "boolean",
10035
9979
  "example": "false"
10036
9980
  },
9981
+ "size_decimals": {
9982
+ "type": "integer",
9983
+ "format": "uint8",
9984
+ "example": "4"
9985
+ },
9986
+ "price_decimals": {
9987
+ "type": "integer",
9988
+ "format": "uint8",
9989
+ "example": "4"
9990
+ },
10037
9991
  "stats": {
10038
9992
  "$ref": "#/definitions/BinaryOptionMarketStats"
10039
9993
  }
@@ -10070,6 +10024,8 @@
10070
10024
  "settlement_price",
10071
10025
  "default_price",
10072
10026
  "is_frozen",
10027
+ "size_decimals",
10028
+ "price_decimals",
10073
10029
  "stats"
10074
10030
  ]
10075
10031
  },
@@ -11495,7 +11451,15 @@
11495
11451
  },
11496
11452
  "liquidation_mode": {
11497
11453
  "type": "integer",
11498
- "format": "int32"
11454
+ "format": "int32",
11455
+ "enum": [
11456
+ 0,
11457
+ 1
11458
+ ],
11459
+ "x-enum-varnames": [
11460
+ "All",
11461
+ "DisableInsuranceFund"
11462
+ ]
11499
11463
  },
11500
11464
  "force_reduce_only": {
11501
11465
  "type": "boolean",
@@ -11676,6 +11640,10 @@
11676
11640
  "order_filled_enabled": {
11677
11641
  "type": "boolean",
11678
11642
  "format": "boolean"
11643
+ },
11644
+ "cashflow_enabled": {
11645
+ "type": "boolean",
11646
+ "format": "boolean"
11679
11647
  }
11680
11648
  },
11681
11649
  "title": "NotificationPreferences",
@@ -11684,7 +11652,8 @@
11684
11652
  "global_announcements_enabled",
11685
11653
  "private_announcements_enabled",
11686
11654
  "price_alerts_enabled",
11687
- "order_filled_enabled"
11655
+ "order_filled_enabled",
11656
+ "cashflow_enabled"
11688
11657
  ]
11689
11658
  },
11690
11659
  "Order": {
@@ -12099,8 +12068,15 @@
12099
12068
  },
12100
12069
  "settlement_type": {
12101
12070
  "type": "integer",
12102
- "format": "uint8",
12103
- "example": "0"
12071
+ "format": "int32",
12072
+ "enum": [
12073
+ 0,
12074
+ 1
12075
+ ],
12076
+ "x-enum-varnames": [
12077
+ "Discrete",
12078
+ "Continuous"
12079
+ ]
12104
12080
  },
12105
12081
  "settlement_price": {
12106
12082
  "type": "integer",
@@ -12773,8 +12749,15 @@
12773
12749
  },
12774
12750
  "settlement_type": {
12775
12751
  "type": "integer",
12776
- "format": "uint8",
12777
- "example": "0"
12752
+ "format": "int32",
12753
+ "enum": [
12754
+ 0,
12755
+ 1
12756
+ ],
12757
+ "x-enum-varnames": [
12758
+ "Discrete",
12759
+ "Continuous"
12760
+ ]
12778
12761
  },
12779
12762
  "settlement_price": {
12780
12763
  "type": "integer",
@@ -13071,6 +13054,11 @@
13071
13054
  "PnLV2Entry": {
13072
13055
  "type": "object",
13073
13056
  "properties": {
13057
+ "volume": {
13058
+ "type": "number",
13059
+ "format": "double",
13060
+ "description": " quote volume in USDC for this bucket; summary.volume is the sum"
13061
+ },
13074
13062
  "timestamp": {
13075
13063
  "type": "integer",
13076
13064
  "format": "int64"
@@ -13146,6 +13134,7 @@
13146
13134
  },
13147
13135
  "title": "PnLV2Entry",
13148
13136
  "required": [
13137
+ "volume",
13149
13138
  "timestamp",
13150
13139
  "interval_start_timestamp",
13151
13140
  "is_final",
@@ -14673,7 +14662,8 @@
14673
14662
  "enum": [
14674
14663
  "all",
14675
14664
  "spot",
14676
- "perp"
14665
+ "perp",
14666
+ "bo"
14677
14667
  ],
14678
14668
  "default": "all"
14679
14669
  }
@@ -14716,37 +14706,6 @@
14716
14706
  "l1_address"
14717
14707
  ]
14718
14708
  },
14719
- "ReqGetAccountEvents": {
14720
- "type": "object",
14721
- "properties": {
14722
- "auth": {
14723
- "type": "string",
14724
- "description": " made optional to support header auth clients"
14725
- },
14726
- "account_index": {
14727
- "type": "integer",
14728
- "format": "int64",
14729
- "maximum": 281474976710654
14730
- },
14731
- "cursor": {
14732
- "type": "integer",
14733
- "format": "int64",
14734
- "maximum": 9223372036854776000,
14735
- "minimum": 1
14736
- },
14737
- "limit": {
14738
- "type": "integer",
14739
- "format": "int64",
14740
- "default": "100",
14741
- "maximum": 100,
14742
- "minimum": 1
14743
- }
14744
- },
14745
- "title": "ReqGetAccountEvents",
14746
- "required": [
14747
- "account_index"
14748
- ]
14749
- },
14750
14709
  "ReqGetAccountInactiveOrders": {
14751
14710
  "type": "object",
14752
14711
  "properties": {
@@ -14768,7 +14727,8 @@
14768
14727
  "enum": [
14769
14728
  "all",
14770
14729
  "spot",
14771
- "perp"
14730
+ "perp",
14731
+ "bo"
14772
14732
  ],
14773
14733
  "default": "all"
14774
14734
  },
@@ -15245,9 +15205,13 @@
15245
15205
  "ReqGetEvents": {
15246
15206
  "type": "object",
15247
15207
  "properties": {
15248
- "event_id": {
15249
- "type": "integer",
15250
- "format": "int64"
15208
+ "event_ids": {
15209
+ "type": "string",
15210
+ "description": " comma-separated positive IDs, max 50"
15211
+ },
15212
+ "market_ids": {
15213
+ "type": "string",
15214
+ "description": " comma-separated positive IDs, max 50"
15251
15215
  },
15252
15216
  "creator_account_index": {
15253
15217
  "type": "integer",
@@ -15810,8 +15774,7 @@
15810
15774
  "enum": [
15811
15775
  "all",
15812
15776
  "spot",
15813
- "perp",
15814
- "binary_options"
15777
+ "perp"
15815
15778
  ],
15816
15779
  "default": "all"
15817
15780
  }
@@ -15851,8 +15814,7 @@
15851
15814
  "enum": [
15852
15815
  "all",
15853
15816
  "spot",
15854
- "perp",
15855
- "binary_options"
15817
+ "perp"
15856
15818
  ],
15857
15819
  "default": "all"
15858
15820
  }
@@ -16262,7 +16224,8 @@
16262
16224
  "enum": [
16263
16225
  "all",
16264
16226
  "spot",
16265
- "perp"
16227
+ "perp",
16228
+ "bo"
16266
16229
  ],
16267
16230
  "default": "all"
16268
16231
  },
@@ -19303,8 +19266,15 @@
19303
19266
  },
19304
19267
  "settlement_type": {
19305
19268
  "type": "integer",
19306
- "format": "uint8",
19307
- "example": "0"
19269
+ "format": "int32",
19270
+ "enum": [
19271
+ 0,
19272
+ 1
19273
+ ],
19274
+ "x-enum-varnames": [
19275
+ "Discrete",
19276
+ "Continuous"
19277
+ ]
19308
19278
  },
19309
19279
  "settlement_price": {
19310
19280
  "type": "integer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.310",
3
+ "version": "1.0.312",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {