zklighter-perps 1.0.345 → 1.0.347

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.
@@ -43,6 +43,8 @@ models/AccountPnLV2.ts
43
43
  models/AccountPosition.ts
44
44
  models/AccountStats.ts
45
45
  models/AccountTradeStats.ts
46
+ models/AggregatedTrade.ts
47
+ models/AggregatedTrades.ts
46
48
  models/AirdropAllocationItem.ts
47
49
  models/AirdropAllocations.ts
48
50
  models/Alert.ts
@@ -198,6 +200,7 @@ models/ReqGetAccountOrders.ts
198
200
  models/ReqGetAccountPnL.ts
199
201
  models/ReqGetAccountPnLV2.ts
200
202
  models/ReqGetAccountTxs.ts
203
+ models/ReqGetAggregatedTrades.ts
201
204
  models/ReqGetAirdropAllocations.ts
202
205
  models/ReqGetApiTokens.ts
203
206
  models/ReqGetAssetDetails.ts
@@ -389,7 +389,7 @@ export interface TokensRevokeRequest {
389
389
  export class AccountApi extends runtime.BaseAPI {
390
390
 
391
391
  /**
392
- * Get account by account\'s index. <br>More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position.
392
+ * Get account by account\'s index. <br>More details about account index: [Account Index](https://docs.lighter.xyz/developers/getting-started/core-concepts#account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position.
393
393
  * account
394
394
  */
395
395
  async accountRaw(requestParameters: AccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DetailedAccounts>> {
@@ -438,7 +438,7 @@ export class AccountApi extends runtime.BaseAPI {
438
438
  }
439
439
 
440
440
  /**
441
- * Get account by account\'s index. <br>More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position.
441
+ * Get account by account\'s index. <br>More details about account index: [Account Index](https://docs.lighter.xyz/developers/getting-started/core-concepts#account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position.
442
442
  * account
443
443
  */
444
444
  async account(requestParameters: AccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DetailedAccounts> {
package/apis/OrderApi.ts CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AggregatedTrades,
18
19
  AssetDetails,
19
20
  ExchangeStats,
20
21
  ExportData,
@@ -30,6 +31,8 @@ import type {
30
31
  Trades,
31
32
  } from '../models/index';
32
33
  import {
34
+ AggregatedTradesFromJSON,
35
+ AggregatedTradesToJSON,
33
36
  AssetDetailsFromJSON,
34
37
  AssetDetailsToJSON,
35
38
  ExchangeStatsFromJSON,
@@ -99,6 +102,18 @@ export interface AccountOrdersRequest {
99
102
  account_index?: number;
100
103
  }
101
104
 
105
+ export interface AggregatedTradesRequest {
106
+ account_index: number;
107
+ market_id?: number;
108
+ market_type?: Array<AggregatedTradesMarketTypeEnum>;
109
+ order_index_str?: string;
110
+ cursor?: string;
111
+ ask_filter?: number;
112
+ role?: AggregatedTradesRoleEnum;
113
+ type?: AggregatedTradesTypeEnum;
114
+ limit?: number;
115
+ }
116
+
102
117
  export interface AssetDetailsRequest {
103
118
  asset_id?: number;
104
119
  }
@@ -434,6 +449,77 @@ export class OrderApi extends runtime.BaseAPI {
434
449
  return await response.value();
435
450
  }
436
451
 
452
+ /**
453
+ * get trade aggregations
454
+ * aggregatedTrades
455
+ */
456
+ async aggregatedTradesRaw(requestParameters: AggregatedTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AggregatedTrades>> {
457
+ if (requestParameters['account_index'] == null) {
458
+ throw new runtime.RequiredError(
459
+ 'account_index',
460
+ 'Required parameter "account_index" was null or undefined when calling aggregatedTrades().'
461
+ );
462
+ }
463
+
464
+ const queryParameters: any = {};
465
+
466
+ if (requestParameters['account_index'] != null) {
467
+ queryParameters['account_index'] = requestParameters['account_index'];
468
+ }
469
+
470
+ if (requestParameters['market_id'] != null) {
471
+ queryParameters['market_id'] = requestParameters['market_id'];
472
+ }
473
+
474
+ if (requestParameters['market_type'] != null) {
475
+ queryParameters['market_type'] = requestParameters['market_type']!.join(runtime.COLLECTION_FORMATS["csv"]);
476
+ }
477
+
478
+ if (requestParameters['order_index_str'] != null) {
479
+ queryParameters['order_index_str'] = requestParameters['order_index_str'];
480
+ }
481
+
482
+ if (requestParameters['cursor'] != null) {
483
+ queryParameters['cursor'] = requestParameters['cursor'];
484
+ }
485
+
486
+ if (requestParameters['ask_filter'] != null) {
487
+ queryParameters['ask_filter'] = requestParameters['ask_filter'];
488
+ }
489
+
490
+ if (requestParameters['role'] != null) {
491
+ queryParameters['role'] = requestParameters['role'];
492
+ }
493
+
494
+ if (requestParameters['type'] != null) {
495
+ queryParameters['type'] = requestParameters['type'];
496
+ }
497
+
498
+ if (requestParameters['limit'] != null) {
499
+ queryParameters['limit'] = requestParameters['limit'];
500
+ }
501
+
502
+ const headerParameters: runtime.HTTPHeaders = {};
503
+
504
+ const response = await this.request({
505
+ path: `/api/v1/aggregatedTrades`,
506
+ method: 'GET',
507
+ headers: headerParameters,
508
+ query: queryParameters,
509
+ }, initOverrides);
510
+
511
+ return new runtime.JSONApiResponse(response, (jsonValue) => AggregatedTradesFromJSON(jsonValue));
512
+ }
513
+
514
+ /**
515
+ * get trade aggregations
516
+ * aggregatedTrades
517
+ */
518
+ async aggregatedTrades(requestParameters: AggregatedTradesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AggregatedTrades> {
519
+ const response = await this.aggregatedTradesRaw(requestParameters, initOverrides);
520
+ return await response.value();
521
+ }
522
+
437
523
  /**
438
524
  * Get asset details
439
525
  * assetDetails
@@ -1040,6 +1126,33 @@ export const AccountInactiveOrdersMarketTypeEnum = {
1040
1126
  Bo: 'bo'
1041
1127
  } as const;
1042
1128
  export type AccountInactiveOrdersMarketTypeEnum = typeof AccountInactiveOrdersMarketTypeEnum[keyof typeof AccountInactiveOrdersMarketTypeEnum];
1129
+ /**
1130
+ * @export
1131
+ */
1132
+ export const AggregatedTradesMarketTypeEnum = {
1133
+ Spot: 'spot',
1134
+ Perps: 'perps',
1135
+ Bo: 'bo'
1136
+ } as const;
1137
+ export type AggregatedTradesMarketTypeEnum = typeof AggregatedTradesMarketTypeEnum[keyof typeof AggregatedTradesMarketTypeEnum];
1138
+ /**
1139
+ * @export
1140
+ */
1141
+ export const AggregatedTradesRoleEnum = {
1142
+ Maker: 'maker',
1143
+ Taker: 'taker'
1144
+ } as const;
1145
+ export type AggregatedTradesRoleEnum = typeof AggregatedTradesRoleEnum[keyof typeof AggregatedTradesRoleEnum];
1146
+ /**
1147
+ * @export
1148
+ */
1149
+ export const AggregatedTradesTypeEnum = {
1150
+ Trade: 'trade',
1151
+ Liquidation: 'liquidation',
1152
+ Deleverage: 'deleverage',
1153
+ MarketSettlement: 'market_settlement'
1154
+ } as const;
1155
+ export type AggregatedTradesTypeEnum = typeof AggregatedTradesTypeEnum[keyof typeof AggregatedTradesTypeEnum];
1043
1156
  /**
1044
1157
  * @export
1045
1158
  */
@@ -374,7 +374,7 @@ export class TransactionApi extends runtime.BaseAPI {
374
374
  }
375
375
 
376
376
  /**
377
- * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
377
+ * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)
378
378
  * sendTx
379
379
  */
380
380
  async sendTxRaw(requestParameters: SendTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSendTx>> {
@@ -434,7 +434,7 @@ export class TransactionApi extends runtime.BaseAPI {
434
434
  }
435
435
 
436
436
  /**
437
- * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
437
+ * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)
438
438
  * sendTx
439
439
  */
440
440
  async sendTx(requestParameters: SendTxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSendTx> {
@@ -443,7 +443,7 @@ export class TransactionApi extends runtime.BaseAPI {
443
443
  }
444
444
 
445
445
  /**
446
- * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
446
+ * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)
447
447
  * sendTxBatch
448
448
  */
449
449
  async sendTxBatchRaw(requestParameters: SendTxBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSendTxBatch>> {
@@ -499,7 +499,7 @@ export class TransactionApi extends runtime.BaseAPI {
499
499
  }
500
500
 
501
501
  /**
502
- * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
502
+ * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)
503
503
  * sendTxBatch
504
504
  */
505
505
  async sendTxBatch(requestParameters: SendTxBatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSendTxBatch> {
@@ -0,0 +1,354 @@
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 AggregatedTrade
20
+ */
21
+ export interface AggregatedTrade {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof AggregatedTrade
26
+ */
27
+ account_index: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AggregatedTrade
32
+ */
33
+ order_id: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AggregatedTrade
38
+ */
39
+ grouping_id: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AggregatedTrade
44
+ */
45
+ master_twap_id: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof AggregatedTrade
50
+ */
51
+ market_id: number;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AggregatedTrade
56
+ */
57
+ market_symbol: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AggregatedTrade
62
+ */
63
+ market_kind: AggregatedTradeMarketKindEnum;
64
+ /**
65
+ *
66
+ * @type {boolean}
67
+ * @memberof AggregatedTrade
68
+ */
69
+ is_ask: boolean;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof AggregatedTrade
74
+ */
75
+ type: AggregatedTradeTypeEnum;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof AggregatedTrade
80
+ */
81
+ role: AggregatedTradeRoleEnum;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof AggregatedTrade
86
+ */
87
+ first_trade_id: string;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof AggregatedTrade
92
+ */
93
+ last_trade_id: string;
94
+ /**
95
+ *
96
+ * @type {number}
97
+ * @memberof AggregatedTrade
98
+ */
99
+ first_timestamp: number;
100
+ /**
101
+ *
102
+ * @type {number}
103
+ * @memberof AggregatedTrade
104
+ */
105
+ last_timestamp: number;
106
+ /**
107
+ *
108
+ * @type {number}
109
+ * @memberof AggregatedTrade
110
+ */
111
+ first_block_height: number;
112
+ /**
113
+ *
114
+ * @type {number}
115
+ * @memberof AggregatedTrade
116
+ */
117
+ last_block_height: number;
118
+ /**
119
+ *
120
+ * @type {number}
121
+ * @memberof AggregatedTrade
122
+ */
123
+ fill_count: number;
124
+ /**
125
+ *
126
+ * @type {string}
127
+ * @memberof AggregatedTrade
128
+ */
129
+ size: string;
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof AggregatedTrade
134
+ */
135
+ usd_amount: string;
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof AggregatedTrade
140
+ */
141
+ pnl: string;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof AggregatedTrade
146
+ */
147
+ average_price: string;
148
+ /**
149
+ *
150
+ * @type {string}
151
+ * @memberof AggregatedTrade
152
+ */
153
+ fee: string;
154
+ /**
155
+ *
156
+ * @type {string}
157
+ * @memberof AggregatedTrade
158
+ */
159
+ integrator_fee: string;
160
+ /**
161
+ *
162
+ * @type {number}
163
+ * @memberof AggregatedTrade
164
+ */
165
+ fee_asset_id: number;
166
+ /**
167
+ *
168
+ * @type {string}
169
+ * @memberof AggregatedTrade
170
+ */
171
+ position_size_before: string;
172
+ /**
173
+ *
174
+ * @type {string}
175
+ * @memberof AggregatedTrade
176
+ */
177
+ entry_quote_before: string;
178
+ /**
179
+ *
180
+ * @type {boolean}
181
+ * @memberof AggregatedTrade
182
+ */
183
+ position_sign_changed: boolean;
184
+ /**
185
+ *
186
+ * @type {number}
187
+ * @memberof AggregatedTrade
188
+ */
189
+ initial_margin_fraction_before: number;
190
+ /**
191
+ *
192
+ * @type {number}
193
+ * @memberof AggregatedTrade
194
+ */
195
+ allocated_margin_usdc_before: number;
196
+ /**
197
+ *
198
+ * @type {number}
199
+ * @memberof AggregatedTrade
200
+ */
201
+ allocated_margin_usdc_after: number;
202
+ }
203
+
204
+
205
+ /**
206
+ * @export
207
+ */
208
+ export const AggregatedTradeMarketKindEnum = {
209
+ Spot: 'spot',
210
+ Bo: 'bo',
211
+ Perps: 'perps'
212
+ } as const;
213
+ export type AggregatedTradeMarketKindEnum = typeof AggregatedTradeMarketKindEnum[keyof typeof AggregatedTradeMarketKindEnum];
214
+
215
+ /**
216
+ * @export
217
+ */
218
+ export const AggregatedTradeTypeEnum = {
219
+ Trade: 'trade',
220
+ Liquidation: 'liquidation',
221
+ Deleverage: 'deleverage',
222
+ MarketSettlement: 'market-settlement'
223
+ } as const;
224
+ export type AggregatedTradeTypeEnum = typeof AggregatedTradeTypeEnum[keyof typeof AggregatedTradeTypeEnum];
225
+
226
+ /**
227
+ * @export
228
+ */
229
+ export const AggregatedTradeRoleEnum = {
230
+ Maker: 'maker',
231
+ Taker: 'taker'
232
+ } as const;
233
+ export type AggregatedTradeRoleEnum = typeof AggregatedTradeRoleEnum[keyof typeof AggregatedTradeRoleEnum];
234
+
235
+
236
+ /**
237
+ * Check if a given object implements the AggregatedTrade interface.
238
+ */
239
+ export function instanceOfAggregatedTrade(value: object): value is AggregatedTrade {
240
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
241
+ if (!('order_id' in value) || value['order_id'] === undefined) return false;
242
+ if (!('grouping_id' in value) || value['grouping_id'] === undefined) return false;
243
+ if (!('master_twap_id' in value) || value['master_twap_id'] === undefined) return false;
244
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
245
+ if (!('market_symbol' in value) || value['market_symbol'] === undefined) return false;
246
+ if (!('market_kind' in value) || value['market_kind'] === undefined) return false;
247
+ if (!('is_ask' in value) || value['is_ask'] === undefined) return false;
248
+ if (!('type' in value) || value['type'] === undefined) return false;
249
+ if (!('role' in value) || value['role'] === undefined) return false;
250
+ if (!('first_trade_id' in value) || value['first_trade_id'] === undefined) return false;
251
+ if (!('last_trade_id' in value) || value['last_trade_id'] === undefined) return false;
252
+ if (!('first_timestamp' in value) || value['first_timestamp'] === undefined) return false;
253
+ if (!('last_timestamp' in value) || value['last_timestamp'] === undefined) return false;
254
+ if (!('first_block_height' in value) || value['first_block_height'] === undefined) return false;
255
+ if (!('last_block_height' in value) || value['last_block_height'] === undefined) return false;
256
+ if (!('fill_count' in value) || value['fill_count'] === undefined) return false;
257
+ if (!('size' in value) || value['size'] === undefined) return false;
258
+ if (!('usd_amount' in value) || value['usd_amount'] === undefined) return false;
259
+ if (!('pnl' in value) || value['pnl'] === undefined) return false;
260
+ if (!('average_price' in value) || value['average_price'] === undefined) return false;
261
+ if (!('fee' in value) || value['fee'] === undefined) return false;
262
+ if (!('integrator_fee' in value) || value['integrator_fee'] === undefined) return false;
263
+ if (!('fee_asset_id' in value) || value['fee_asset_id'] === undefined) return false;
264
+ if (!('position_size_before' in value) || value['position_size_before'] === undefined) return false;
265
+ if (!('entry_quote_before' in value) || value['entry_quote_before'] === undefined) return false;
266
+ if (!('position_sign_changed' in value) || value['position_sign_changed'] === undefined) return false;
267
+ if (!('initial_margin_fraction_before' in value) || value['initial_margin_fraction_before'] === undefined) return false;
268
+ if (!('allocated_margin_usdc_before' in value) || value['allocated_margin_usdc_before'] === undefined) return false;
269
+ if (!('allocated_margin_usdc_after' in value) || value['allocated_margin_usdc_after'] === undefined) return false;
270
+ return true;
271
+ }
272
+
273
+ export function AggregatedTradeFromJSON(json: any): AggregatedTrade {
274
+ return AggregatedTradeFromJSONTyped(json, false);
275
+ }
276
+
277
+ export function AggregatedTradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AggregatedTrade {
278
+ if (json == null) {
279
+ return json;
280
+ }
281
+ return {
282
+
283
+ 'account_index': json['account_index'],
284
+ 'order_id': json['order_id'],
285
+ 'grouping_id': json['grouping_id'],
286
+ 'master_twap_id': json['master_twap_id'],
287
+ 'market_id': json['market_id'],
288
+ 'market_symbol': json['market_symbol'],
289
+ 'market_kind': json['market_kind'],
290
+ 'is_ask': json['is_ask'],
291
+ 'type': json['type'],
292
+ 'role': json['role'],
293
+ 'first_trade_id': json['first_trade_id'],
294
+ 'last_trade_id': json['last_trade_id'],
295
+ 'first_timestamp': json['first_timestamp'],
296
+ 'last_timestamp': json['last_timestamp'],
297
+ 'first_block_height': json['first_block_height'],
298
+ 'last_block_height': json['last_block_height'],
299
+ 'fill_count': json['fill_count'],
300
+ 'size': json['size'],
301
+ 'usd_amount': json['usd_amount'],
302
+ 'pnl': json['pnl'],
303
+ 'average_price': json['average_price'],
304
+ 'fee': json['fee'],
305
+ 'integrator_fee': json['integrator_fee'],
306
+ 'fee_asset_id': json['fee_asset_id'],
307
+ 'position_size_before': json['position_size_before'],
308
+ 'entry_quote_before': json['entry_quote_before'],
309
+ 'position_sign_changed': json['position_sign_changed'],
310
+ 'initial_margin_fraction_before': json['initial_margin_fraction_before'],
311
+ 'allocated_margin_usdc_before': json['allocated_margin_usdc_before'],
312
+ 'allocated_margin_usdc_after': json['allocated_margin_usdc_after'],
313
+ };
314
+ }
315
+
316
+ export function AggregatedTradeToJSON(value?: AggregatedTrade | null): any {
317
+ if (value == null) {
318
+ return value;
319
+ }
320
+ return {
321
+
322
+ 'account_index': value['account_index'],
323
+ 'order_id': value['order_id'],
324
+ 'grouping_id': value['grouping_id'],
325
+ 'master_twap_id': value['master_twap_id'],
326
+ 'market_id': value['market_id'],
327
+ 'market_symbol': value['market_symbol'],
328
+ 'market_kind': value['market_kind'],
329
+ 'is_ask': value['is_ask'],
330
+ 'type': value['type'],
331
+ 'role': value['role'],
332
+ 'first_trade_id': value['first_trade_id'],
333
+ 'last_trade_id': value['last_trade_id'],
334
+ 'first_timestamp': value['first_timestamp'],
335
+ 'last_timestamp': value['last_timestamp'],
336
+ 'first_block_height': value['first_block_height'],
337
+ 'last_block_height': value['last_block_height'],
338
+ 'fill_count': value['fill_count'],
339
+ 'size': value['size'],
340
+ 'usd_amount': value['usd_amount'],
341
+ 'pnl': value['pnl'],
342
+ 'average_price': value['average_price'],
343
+ 'fee': value['fee'],
344
+ 'integrator_fee': value['integrator_fee'],
345
+ 'fee_asset_id': value['fee_asset_id'],
346
+ 'position_size_before': value['position_size_before'],
347
+ 'entry_quote_before': value['entry_quote_before'],
348
+ 'position_sign_changed': value['position_sign_changed'],
349
+ 'initial_margin_fraction_before': value['initial_margin_fraction_before'],
350
+ 'allocated_margin_usdc_before': value['allocated_margin_usdc_before'],
351
+ 'allocated_margin_usdc_after': value['allocated_margin_usdc_after'],
352
+ };
353
+ }
354
+
@@ -0,0 +1,93 @@
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
+ import type { AggregatedTrade } from './AggregatedTrade';
17
+ import {
18
+ AggregatedTradeFromJSON,
19
+ AggregatedTradeFromJSONTyped,
20
+ AggregatedTradeToJSON,
21
+ } from './AggregatedTrade';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface AggregatedTrades
27
+ */
28
+ export interface AggregatedTrades {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof AggregatedTrades
33
+ */
34
+ code: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof AggregatedTrades
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof AggregatedTrades
45
+ */
46
+ next_cursor?: string;
47
+ /**
48
+ *
49
+ * @type {Array<AggregatedTrade>}
50
+ * @memberof AggregatedTrades
51
+ */
52
+ trades: Array<AggregatedTrade>;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the AggregatedTrades interface.
57
+ */
58
+ export function instanceOfAggregatedTrades(value: object): value is AggregatedTrades {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
60
+ if (!('trades' in value) || value['trades'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function AggregatedTradesFromJSON(json: any): AggregatedTrades {
65
+ return AggregatedTradesFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function AggregatedTradesFromJSONTyped(json: any, ignoreDiscriminator: boolean): AggregatedTrades {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'code': json['code'],
75
+ 'message': json['message'] == null ? undefined : json['message'],
76
+ 'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
77
+ 'trades': ((json['trades'] as Array<any>).map(AggregatedTradeFromJSON)),
78
+ };
79
+ }
80
+
81
+ export function AggregatedTradesToJSON(value?: AggregatedTrades | null): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+ return {
86
+
87
+ 'code': value['code'],
88
+ 'message': value['message'],
89
+ 'next_cursor': value['next_cursor'],
90
+ 'trades': ((value['trades'] as Array<any>).map(AggregatedTradeToJSON)),
91
+ };
92
+ }
93
+
@@ -0,0 +1,157 @@
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 ReqGetAggregatedTrades
20
+ */
21
+ export interface ReqGetAggregatedTrades {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetAggregatedTrades
26
+ */
27
+ account_index: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetAggregatedTrades
32
+ */
33
+ market_id?: number;
34
+ /**
35
+ *
36
+ * @type {Array<string>}
37
+ * @memberof ReqGetAggregatedTrades
38
+ */
39
+ market_type?: Array<ReqGetAggregatedTradesMarketTypeEnum>;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ReqGetAggregatedTrades
44
+ */
45
+ order_index_str?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof ReqGetAggregatedTrades
50
+ */
51
+ cursor?: string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof ReqGetAggregatedTrades
56
+ */
57
+ ask_filter?: number;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof ReqGetAggregatedTrades
62
+ */
63
+ role?: ReqGetAggregatedTradesRoleEnum;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof ReqGetAggregatedTrades
68
+ */
69
+ type?: ReqGetAggregatedTradesTypeEnum;
70
+ /**
71
+ *
72
+ * @type {number}
73
+ * @memberof ReqGetAggregatedTrades
74
+ */
75
+ limit?: number;
76
+ }
77
+
78
+
79
+ /**
80
+ * @export
81
+ */
82
+ export const ReqGetAggregatedTradesMarketTypeEnum = {
83
+ Spot: 'spot',
84
+ Perps: 'perps',
85
+ Bo: 'bo'
86
+ } as const;
87
+ export type ReqGetAggregatedTradesMarketTypeEnum = typeof ReqGetAggregatedTradesMarketTypeEnum[keyof typeof ReqGetAggregatedTradesMarketTypeEnum];
88
+
89
+ /**
90
+ * @export
91
+ */
92
+ export const ReqGetAggregatedTradesRoleEnum = {
93
+ Maker: 'maker',
94
+ Taker: 'taker'
95
+ } as const;
96
+ export type ReqGetAggregatedTradesRoleEnum = typeof ReqGetAggregatedTradesRoleEnum[keyof typeof ReqGetAggregatedTradesRoleEnum];
97
+
98
+ /**
99
+ * @export
100
+ */
101
+ export const ReqGetAggregatedTradesTypeEnum = {
102
+ Trade: 'trade',
103
+ Liquidation: 'liquidation',
104
+ Deleverage: 'deleverage',
105
+ MarketSettlement: 'market_settlement'
106
+ } as const;
107
+ export type ReqGetAggregatedTradesTypeEnum = typeof ReqGetAggregatedTradesTypeEnum[keyof typeof ReqGetAggregatedTradesTypeEnum];
108
+
109
+
110
+ /**
111
+ * Check if a given object implements the ReqGetAggregatedTrades interface.
112
+ */
113
+ export function instanceOfReqGetAggregatedTrades(value: object): value is ReqGetAggregatedTrades {
114
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
115
+ return true;
116
+ }
117
+
118
+ export function ReqGetAggregatedTradesFromJSON(json: any): ReqGetAggregatedTrades {
119
+ return ReqGetAggregatedTradesFromJSONTyped(json, false);
120
+ }
121
+
122
+ export function ReqGetAggregatedTradesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAggregatedTrades {
123
+ if (json == null) {
124
+ return json;
125
+ }
126
+ return {
127
+
128
+ 'account_index': json['account_index'],
129
+ 'market_id': json['market_id'] == null ? undefined : json['market_id'],
130
+ 'market_type': json['market_type'] == null ? undefined : json['market_type'],
131
+ 'order_index_str': json['order_index_str'] == null ? undefined : json['order_index_str'],
132
+ 'cursor': json['cursor'] == null ? undefined : json['cursor'],
133
+ 'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
134
+ 'role': json['role'] == null ? undefined : json['role'],
135
+ 'type': json['type'] == null ? undefined : json['type'],
136
+ 'limit': json['limit'] == null ? undefined : json['limit'],
137
+ };
138
+ }
139
+
140
+ export function ReqGetAggregatedTradesToJSON(value?: ReqGetAggregatedTrades | null): any {
141
+ if (value == null) {
142
+ return value;
143
+ }
144
+ return {
145
+
146
+ 'account_index': value['account_index'],
147
+ 'market_id': value['market_id'],
148
+ 'market_type': value['market_type'],
149
+ 'order_index_str': value['order_index_str'],
150
+ 'cursor': value['cursor'],
151
+ 'ask_filter': value['ask_filter'],
152
+ 'role': value['role'],
153
+ 'type': value['type'],
154
+ 'limit': value['limit'],
155
+ };
156
+ }
157
+
package/models/index.ts CHANGED
@@ -14,6 +14,8 @@ export * from './AccountPnLV2';
14
14
  export * from './AccountPosition';
15
15
  export * from './AccountStats';
16
16
  export * from './AccountTradeStats';
17
+ export * from './AggregatedTrade';
18
+ export * from './AggregatedTrades';
17
19
  export * from './AirdropAllocationItem';
18
20
  export * from './AirdropAllocations';
19
21
  export * from './Alert';
@@ -169,6 +171,7 @@ export * from './ReqGetAccountOrders';
169
171
  export * from './ReqGetAccountPnL';
170
172
  export * from './ReqGetAccountPnLV2';
171
173
  export * from './ReqGetAccountTxs';
174
+ export * from './ReqGetAggregatedTrades';
172
175
  export * from './ReqGetAirdropAllocations';
173
176
  export * from './ReqGetApiTokens';
174
177
  export * from './ReqGetAssetDetails';
package/openapi.json CHANGED
@@ -95,7 +95,7 @@
95
95
  "consumes": [
96
96
  "multipart/form-data"
97
97
  ],
98
- "description": "Get account by account's index. <br>More details about account index: [Account Index](https://apidocs.lighter.xyz/docs/account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position."
98
+ "description": "Get account by account's index. <br>More details about account index: [Account Index](https://docs.lighter.xyz/developers/getting-started/core-concepts#account-index)<hr>**Response Description:**<br><br>1) **Status:** 1 is active 0 is inactive.<br>2) **Collateral:** The amount of collateral in the account.<hr>**Position Details Description:**<br>1) **OOC:** Open order count in that market.<br>2) **Sign:** 1 for Long, -1 for Short.<br>3) **Position:** The amount of position in that market.<br>4) **Avg Entry Price:** The average entry price of the position.<br>5) **Position Value:** The value of the position.<br>6) **Unrealized PnL:** The unrealized profit and loss of the position.<br>7) **Realized PnL:** The realized profit and loss of the position."
99
99
  }
100
100
  },
101
101
  "/api/v1/accountActiveOrders": {
@@ -569,6 +569,118 @@
569
569
  "description": "Get accounts by l1_address returns all accounts associated with the given L1 address"
570
570
  }
571
571
  },
572
+ "/api/v1/aggregatedTrades": {
573
+ "get": {
574
+ "summary": "aggregatedTrades",
575
+ "operationId": "aggregatedTrades",
576
+ "responses": {
577
+ "200": {
578
+ "description": "A successful response.",
579
+ "schema": {
580
+ "$ref": "#/definitions/AggregatedTrades"
581
+ }
582
+ },
583
+ "400": {
584
+ "description": "Bad request",
585
+ "schema": {
586
+ "$ref": "#/definitions/ResultCode"
587
+ }
588
+ }
589
+ },
590
+ "parameters": [
591
+ {
592
+ "name": "account_index",
593
+ "in": "query",
594
+ "required": true,
595
+ "type": "integer",
596
+ "format": "int64"
597
+ },
598
+ {
599
+ "name": "market_id",
600
+ "in": "query",
601
+ "required": false,
602
+ "type": "integer",
603
+ "format": "int64",
604
+ "default": "255"
605
+ },
606
+ {
607
+ "name": "market_type",
608
+ "in": "query",
609
+ "required": false,
610
+ "type": "array",
611
+ "items": {
612
+ "type": "string",
613
+ "enum": [
614
+ "spot",
615
+ "perps",
616
+ "bo"
617
+ ]
618
+ }
619
+ },
620
+ {
621
+ "name": "order_index_str",
622
+ "in": "query",
623
+ "required": false,
624
+ "type": "string"
625
+ },
626
+ {
627
+ "name": "cursor",
628
+ "in": "query",
629
+ "required": false,
630
+ "type": "string"
631
+ },
632
+ {
633
+ "name": "ask_filter",
634
+ "in": "query",
635
+ "required": false,
636
+ "type": "integer",
637
+ "format": "int8",
638
+ "default": "-1",
639
+ "minimum": -1,
640
+ "maximum": 1
641
+ },
642
+ {
643
+ "name": "role",
644
+ "in": "query",
645
+ "required": false,
646
+ "type": "string",
647
+ "enum": [
648
+ "maker",
649
+ "taker"
650
+ ]
651
+ },
652
+ {
653
+ "name": "type",
654
+ "in": "query",
655
+ "required": false,
656
+ "type": "string",
657
+ "enum": [
658
+ "trade",
659
+ "liquidation",
660
+ "deleverage",
661
+ "market_settlement"
662
+ ]
663
+ },
664
+ {
665
+ "name": "limit",
666
+ "in": "query",
667
+ "required": false,
668
+ "type": "integer",
669
+ "format": "int64",
670
+ "default": "100",
671
+ "minimum": 1,
672
+ "maximum": 100
673
+ }
674
+ ],
675
+ "tags": [
676
+ "order"
677
+ ],
678
+ "consumes": [
679
+ "multipart/form-data"
680
+ ],
681
+ "description": "get trade aggregations"
682
+ }
683
+ },
572
684
  "/api/v1/airdrop": {
573
685
  "get": {
574
686
  "summary": "airdrop",
@@ -6705,7 +6817,7 @@
6705
6817
  "consumes": [
6706
6818
  "multipart/form-data"
6707
6819
  ],
6708
- "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
6820
+ "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)"
6709
6821
  }
6710
6822
  },
6711
6823
  "/api/v1/sendTxBatch": {
@@ -6742,7 +6854,7 @@
6742
6854
  "consumes": [
6743
6855
  "multipart/form-data"
6744
6856
  ],
6745
- "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
6857
+ "description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://docs.lighter.xyz/developers/integration-guides/signing-transactions)"
6746
6858
  }
6747
6859
  },
6748
6860
  "/api/v1/setAccountMetadata": {
@@ -8999,6 +9111,208 @@
8999
9111
  "total_volume"
9000
9112
  ]
9001
9113
  },
9114
+ "AggregatedTrade": {
9115
+ "type": "object",
9116
+ "properties": {
9117
+ "account_index": {
9118
+ "type": "integer",
9119
+ "format": "int64",
9120
+ "example": "1"
9121
+ },
9122
+ "order_id": {
9123
+ "type": "string",
9124
+ "example": "145"
9125
+ },
9126
+ "grouping_id": {
9127
+ "type": "string"
9128
+ },
9129
+ "master_twap_id": {
9130
+ "type": "string"
9131
+ },
9132
+ "market_id": {
9133
+ "type": "integer",
9134
+ "format": "int64",
9135
+ "example": "1"
9136
+ },
9137
+ "market_symbol": {
9138
+ "type": "string",
9139
+ "example": "ETH"
9140
+ },
9141
+ "market_kind": {
9142
+ "type": "string",
9143
+ "enum": [
9144
+ "spot",
9145
+ "bo",
9146
+ "perps"
9147
+ ]
9148
+ },
9149
+ "is_ask": {
9150
+ "type": "boolean",
9151
+ "format": "boolean",
9152
+ "example": "true"
9153
+ },
9154
+ "type": {
9155
+ "type": "string",
9156
+ "enum": [
9157
+ "trade",
9158
+ "liquidation",
9159
+ "deleverage",
9160
+ "market-settlement"
9161
+ ]
9162
+ },
9163
+ "role": {
9164
+ "type": "string",
9165
+ "enum": [
9166
+ "maker",
9167
+ "taker"
9168
+ ]
9169
+ },
9170
+ "first_trade_id": {
9171
+ "type": "string",
9172
+ "example": "145"
9173
+ },
9174
+ "last_trade_id": {
9175
+ "type": "string",
9176
+ "example": "150"
9177
+ },
9178
+ "first_timestamp": {
9179
+ "type": "integer",
9180
+ "format": "int64",
9181
+ "example": "1640995200000"
9182
+ },
9183
+ "last_timestamp": {
9184
+ "type": "integer",
9185
+ "format": "int64",
9186
+ "example": "1640995201000"
9187
+ },
9188
+ "first_block_height": {
9189
+ "type": "integer",
9190
+ "format": "int64",
9191
+ "example": "45434"
9192
+ },
9193
+ "last_block_height": {
9194
+ "type": "integer",
9195
+ "format": "int64",
9196
+ "example": "45435"
9197
+ },
9198
+ "fill_count": {
9199
+ "type": "integer",
9200
+ "format": "int64",
9201
+ "example": "2"
9202
+ },
9203
+ "size": {
9204
+ "type": "string",
9205
+ "example": "0.1"
9206
+ },
9207
+ "usd_amount": {
9208
+ "type": "string",
9209
+ "example": "302.466"
9210
+ },
9211
+ "pnl": {
9212
+ "type": "string"
9213
+ },
9214
+ "average_price": {
9215
+ "type": "string",
9216
+ "example": "3024.66"
9217
+ },
9218
+ "fee": {
9219
+ "type": "string",
9220
+ "example": "0.001000000000"
9221
+ },
9222
+ "integrator_fee": {
9223
+ "type": "string",
9224
+ "example": "0.000100000000"
9225
+ },
9226
+ "fee_asset_id": {
9227
+ "type": "integer",
9228
+ "format": "int16",
9229
+ "example": "3"
9230
+ },
9231
+ "position_size_before": {
9232
+ "type": "string"
9233
+ },
9234
+ "entry_quote_before": {
9235
+ "type": "string"
9236
+ },
9237
+ "position_sign_changed": {
9238
+ "type": "boolean",
9239
+ "format": "boolean"
9240
+ },
9241
+ "initial_margin_fraction_before": {
9242
+ "type": "integer",
9243
+ "format": "uin16",
9244
+ "example": "500"
9245
+ },
9246
+ "allocated_margin_usdc_before": {
9247
+ "type": "integer",
9248
+ "format": "int64"
9249
+ },
9250
+ "allocated_margin_usdc_after": {
9251
+ "type": "integer",
9252
+ "format": "int64"
9253
+ }
9254
+ },
9255
+ "title": "AggregatedTrade",
9256
+ "required": [
9257
+ "account_index",
9258
+ "order_id",
9259
+ "grouping_id",
9260
+ "master_twap_id",
9261
+ "market_id",
9262
+ "market_symbol",
9263
+ "market_kind",
9264
+ "is_ask",
9265
+ "type",
9266
+ "role",
9267
+ "first_trade_id",
9268
+ "last_trade_id",
9269
+ "first_timestamp",
9270
+ "last_timestamp",
9271
+ "first_block_height",
9272
+ "last_block_height",
9273
+ "fill_count",
9274
+ "size",
9275
+ "usd_amount",
9276
+ "pnl",
9277
+ "average_price",
9278
+ "fee",
9279
+ "integrator_fee",
9280
+ "fee_asset_id",
9281
+ "position_size_before",
9282
+ "entry_quote_before",
9283
+ "position_sign_changed",
9284
+ "initial_margin_fraction_before",
9285
+ "allocated_margin_usdc_before",
9286
+ "allocated_margin_usdc_after"
9287
+ ]
9288
+ },
9289
+ "AggregatedTrades": {
9290
+ "type": "object",
9291
+ "properties": {
9292
+ "code": {
9293
+ "type": "integer",
9294
+ "format": "int32",
9295
+ "example": "200"
9296
+ },
9297
+ "message": {
9298
+ "type": "string"
9299
+ },
9300
+ "next_cursor": {
9301
+ "type": "string"
9302
+ },
9303
+ "trades": {
9304
+ "type": "array",
9305
+ "items": {
9306
+ "$ref": "#/definitions/AggregatedTrade"
9307
+ }
9308
+ }
9309
+ },
9310
+ "title": "AggregatedTrades",
9311
+ "required": [
9312
+ "code",
9313
+ "trades"
9314
+ ]
9315
+ },
9002
9316
  "AirdropAllocationItem": {
9003
9317
  "type": "object",
9004
9318
  "properties": {
@@ -17313,6 +17627,71 @@
17313
17627
  },
17314
17628
  "title": "ReqGetAccountTxs"
17315
17629
  },
17630
+ "ReqGetAggregatedTrades": {
17631
+ "type": "object",
17632
+ "properties": {
17633
+ "account_index": {
17634
+ "type": "integer",
17635
+ "format": "int64"
17636
+ },
17637
+ "market_id": {
17638
+ "type": "integer",
17639
+ "format": "int64",
17640
+ "default": "255"
17641
+ },
17642
+ "market_type": {
17643
+ "type": "array",
17644
+ "items": {
17645
+ "type": "string",
17646
+ "enum": [
17647
+ "spot",
17648
+ "perps",
17649
+ "bo"
17650
+ ]
17651
+ }
17652
+ },
17653
+ "order_index_str": {
17654
+ "type": "string"
17655
+ },
17656
+ "cursor": {
17657
+ "type": "string"
17658
+ },
17659
+ "ask_filter": {
17660
+ "type": "integer",
17661
+ "format": "int8",
17662
+ "default": "-1",
17663
+ "maximum": 1,
17664
+ "minimum": -1
17665
+ },
17666
+ "role": {
17667
+ "type": "string",
17668
+ "enum": [
17669
+ "maker",
17670
+ "taker"
17671
+ ]
17672
+ },
17673
+ "type": {
17674
+ "type": "string",
17675
+ "enum": [
17676
+ "trade",
17677
+ "liquidation",
17678
+ "deleverage",
17679
+ "market_settlement"
17680
+ ]
17681
+ },
17682
+ "limit": {
17683
+ "type": "integer",
17684
+ "format": "int64",
17685
+ "default": "100",
17686
+ "maximum": 100,
17687
+ "minimum": 1
17688
+ }
17689
+ },
17690
+ "title": "ReqGetAggregatedTrades",
17691
+ "required": [
17692
+ "account_index"
17693
+ ]
17694
+ },
17316
17695
  "ReqGetAirdropAllocations": {
17317
17696
  "type": "object",
17318
17697
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.345",
3
+ "version": "1.0.347",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {