zklighter-perps 1.0.209 → 1.0.210

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.
@@ -176,6 +176,7 @@ models/RiskParameters.ts
176
176
  models/SharePrice.ts
177
177
  models/SimpleOrder.ts
178
178
  models/SlippageResult.ts
179
+ models/SpotAvgEntryPrice.ts
179
180
  models/SpotMarketStats.ts
180
181
  models/SpotOrderBookDetail.ts
181
182
  models/Status.ts
@@ -0,0 +1,88 @@
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 SpotAvgEntryPrice
20
+ */
21
+ export interface SpotAvgEntryPrice {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof SpotAvgEntryPrice
26
+ */
27
+ asset_id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof SpotAvgEntryPrice
32
+ */
33
+ avg_entry_price: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SpotAvgEntryPrice
38
+ */
39
+ asset_size: string;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof SpotAvgEntryPrice
44
+ */
45
+ last_trade_id: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the SpotAvgEntryPrice interface.
50
+ */
51
+ export function instanceOfSpotAvgEntryPrice(value: object): value is SpotAvgEntryPrice {
52
+ if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
53
+ if (!('avg_entry_price' in value) || value['avg_entry_price'] === undefined) return false;
54
+ if (!('asset_size' in value) || value['asset_size'] === undefined) return false;
55
+ if (!('last_trade_id' in value) || value['last_trade_id'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function SpotAvgEntryPriceFromJSON(json: any): SpotAvgEntryPrice {
60
+ return SpotAvgEntryPriceFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function SpotAvgEntryPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpotAvgEntryPrice {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'asset_id': json['asset_id'],
70
+ 'avg_entry_price': json['avg_entry_price'],
71
+ 'asset_size': json['asset_size'],
72
+ 'last_trade_id': json['last_trade_id'],
73
+ };
74
+ }
75
+
76
+ export function SpotAvgEntryPriceToJSON(value?: SpotAvgEntryPrice | null): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+
82
+ 'asset_id': value['asset_id'],
83
+ 'avg_entry_price': value['avg_entry_price'],
84
+ 'asset_size': value['asset_size'],
85
+ 'last_trade_id': value['last_trade_id'],
86
+ };
87
+ }
88
+
package/models/Trade.ts CHANGED
@@ -181,6 +181,18 @@ export interface Trade {
181
181
  * @memberof Trade
182
182
  */
183
183
  transaction_time: number;
184
+ /**
185
+ *
186
+ * @type {string}
187
+ * @memberof Trade
188
+ */
189
+ ask_account_pnl: string;
190
+ /**
191
+ *
192
+ * @type {string}
193
+ * @memberof Trade
194
+ */
195
+ bid_account_pnl: string;
184
196
  }
185
197
 
186
198
 
@@ -225,6 +237,8 @@ export function instanceOfTrade(value: object): value is Trade {
225
237
  if (!('maker_initial_margin_fraction_before' in value) || value['maker_initial_margin_fraction_before'] === undefined) return false;
226
238
  if (!('maker_position_sign_changed' in value) || value['maker_position_sign_changed'] === undefined) return false;
227
239
  if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false;
240
+ if (!('ask_account_pnl' in value) || value['ask_account_pnl'] === undefined) return false;
241
+ if (!('bid_account_pnl' in value) || value['bid_account_pnl'] === undefined) return false;
228
242
  return true;
229
243
  }
230
244
 
@@ -265,6 +279,8 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
265
279
  'maker_initial_margin_fraction_before': json['maker_initial_margin_fraction_before'],
266
280
  'maker_position_sign_changed': json['maker_position_sign_changed'],
267
281
  'transaction_time': json['transaction_time'],
282
+ 'ask_account_pnl': json['ask_account_pnl'],
283
+ 'bid_account_pnl': json['bid_account_pnl'],
268
284
  };
269
285
  }
270
286
 
@@ -301,6 +317,8 @@ export function TradeToJSON(value?: Trade | null): any {
301
317
  'maker_initial_margin_fraction_before': value['maker_initial_margin_fraction_before'],
302
318
  'maker_position_sign_changed': value['maker_position_sign_changed'],
303
319
  'transaction_time': value['transaction_time'],
320
+ 'ask_account_pnl': value['ask_account_pnl'],
321
+ 'bid_account_pnl': value['bid_account_pnl'],
304
322
  };
305
323
  }
306
324
 
package/models/index.ts CHANGED
@@ -162,6 +162,7 @@ export * from './RiskParameters';
162
162
  export * from './SharePrice';
163
163
  export * from './SimpleOrder';
164
164
  export * from './SlippageResult';
165
+ export * from './SpotAvgEntryPrice';
165
166
  export * from './SpotMarketStats';
166
167
  export * from './SpotOrderBookDetail';
167
168
  export * from './Status';
package/openapi.json CHANGED
@@ -10304,6 +10304,32 @@
10304
10304
  "data_count"
10305
10305
  ]
10306
10306
  },
10307
+ "SpotAvgEntryPrice": {
10308
+ "type": "object",
10309
+ "properties": {
10310
+ "asset_id": {
10311
+ "type": "integer",
10312
+ "format": "int16"
10313
+ },
10314
+ "avg_entry_price": {
10315
+ "type": "string"
10316
+ },
10317
+ "asset_size": {
10318
+ "type": "string"
10319
+ },
10320
+ "last_trade_id": {
10321
+ "type": "integer",
10322
+ "format": "int64"
10323
+ }
10324
+ },
10325
+ "title": "SpotAvgEntryPrice",
10326
+ "required": [
10327
+ "asset_id",
10328
+ "avg_entry_price",
10329
+ "asset_size",
10330
+ "last_trade_id"
10331
+ ]
10332
+ },
10307
10333
  "SpotMarketStats": {
10308
10334
  "type": "object",
10309
10335
  "properties": {
@@ -10799,6 +10825,14 @@
10799
10825
  "type": "integer",
10800
10826
  "format": "int64",
10801
10827
  "example": "1257894000000000"
10828
+ },
10829
+ "ask_account_pnl": {
10830
+ "type": "string",
10831
+ "example": "1967"
10832
+ },
10833
+ "bid_account_pnl": {
10834
+ "type": "string",
10835
+ "example": "1967"
10802
10836
  }
10803
10837
  },
10804
10838
  "title": "Trade",
@@ -10827,7 +10861,9 @@
10827
10861
  "maker_entry_quote_before",
10828
10862
  "maker_initial_margin_fraction_before",
10829
10863
  "maker_position_sign_changed",
10830
- "transaction_time"
10864
+ "transaction_time",
10865
+ "ask_account_pnl",
10866
+ "bid_account_pnl"
10831
10867
  ]
10832
10868
  },
10833
10869
  "Trades": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.209",
3
+ "version": "1.0.210",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {