zklighter-perps 1.0.256 → 1.0.258

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.
@@ -216,6 +216,7 @@ models/SpotMarketStats.ts
216
216
  models/SpotOrderBookDetail.ts
217
217
  models/Status.ts
218
218
  models/Strategy.ts
219
+ models/SubAccountMetadata.ts
219
220
  models/SubAccounts.ts
220
221
  models/SystemConfig.ts
221
222
  models/Ticker.ts
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { SubAccountMetadata } from './SubAccountMetadata';
17
+ import {
18
+ SubAccountMetadataFromJSON,
19
+ SubAccountMetadataFromJSONTyped,
20
+ SubAccountMetadataToJSON,
21
+ } from './SubAccountMetadata';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -67,6 +74,12 @@ export interface AccountMetadata {
67
74
  * @memberof AccountMetadata
68
75
  */
69
76
  created_at: number;
77
+ /**
78
+ *
79
+ * @type {SubAccountMetadata}
80
+ * @memberof AccountMetadata
81
+ */
82
+ metadata: SubAccountMetadata;
70
83
  }
71
84
 
72
85
  /**
@@ -81,6 +94,7 @@ export function instanceOfAccountMetadata(value: object): value is AccountMetada
81
94
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
82
95
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
83
96
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
97
+ if (!('metadata' in value) || value['metadata'] === undefined) return false;
84
98
  return true;
85
99
  }
86
100
 
@@ -102,6 +116,7 @@ export function AccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boo
102
116
  'can_rfq': json['can_rfq'],
103
117
  'can_rfq_market_ids': json['can_rfq_market_ids'],
104
118
  'created_at': json['created_at'],
119
+ 'metadata': SubAccountMetadataFromJSON(json['metadata']),
105
120
  };
106
121
  }
107
122
 
@@ -119,6 +134,7 @@ export function AccountMetadataToJSON(value?: AccountMetadata | null): any {
119
134
  'can_rfq': value['can_rfq'],
120
135
  'can_rfq_market_ids': value['can_rfq_market_ids'],
121
136
  'created_at': value['created_at'],
137
+ 'metadata': SubAccountMetadataToJSON(value['metadata']),
122
138
  };
123
139
  }
124
140
 
@@ -49,6 +49,12 @@ import {
49
49
  PublicPoolShareFromJSONTyped,
50
50
  PublicPoolShareToJSON,
51
51
  } from './PublicPoolShare';
52
+ import type { SubAccountMetadata } from './SubAccountMetadata';
53
+ import {
54
+ SubAccountMetadataFromJSON,
55
+ SubAccountMetadataFromJSONTyped,
56
+ SubAccountMetadataToJSON,
57
+ } from './SubAccountMetadata';
52
58
 
53
59
  /**
54
60
  *
@@ -188,6 +194,12 @@ export interface DetailedAccount {
188
194
  * @memberof DetailedAccount
189
195
  */
190
196
  created_at: number;
197
+ /**
198
+ *
199
+ * @type {SubAccountMetadata}
200
+ * @memberof DetailedAccount
201
+ */
202
+ metadata: SubAccountMetadata;
191
203
  /**
192
204
  *
193
205
  * @type {Array<AccountPosition>}
@@ -274,6 +286,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
274
286
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
275
287
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
276
288
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
289
+ if (!('metadata' in value) || value['metadata'] === undefined) return false;
277
290
  if (!('positions' in value) || value['positions'] === undefined) return false;
278
291
  if (!('assets' in value) || value['assets'] === undefined) return false;
279
292
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
@@ -317,6 +330,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
317
330
  'can_rfq': json['can_rfq'],
318
331
  'can_rfq_market_ids': json['can_rfq_market_ids'],
319
332
  'created_at': json['created_at'],
333
+ 'metadata': SubAccountMetadataFromJSON(json['metadata']),
320
334
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
321
335
  'assets': ((json['assets'] as Array<any>).map(AccountAssetFromJSON)),
322
336
  'total_asset_value': json['total_asset_value'],
@@ -358,6 +372,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
358
372
  'can_rfq': value['can_rfq'],
359
373
  'can_rfq_market_ids': value['can_rfq_market_ids'],
360
374
  'created_at': value['created_at'],
375
+ 'metadata': SubAccountMetadataToJSON(value['metadata']),
361
376
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
362
377
  'assets': ((value['assets'] as Array<any>).map(AccountAssetToJSON)),
363
378
  'total_asset_value': value['total_asset_value'],
@@ -37,6 +37,12 @@ export interface RFQMetadata {
37
37
  * @memberof RFQMetadata
38
38
  */
39
39
  requested_slippage: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RFQMetadata
44
+ */
45
+ mark_price: string;
40
46
  /**
41
47
  *
42
48
  * @type {string}
@@ -52,6 +58,7 @@ export function instanceOfRFQMetadata(value: object): value is RFQMetadata {
52
58
  if (!('requested_est_price' in value) || value['requested_est_price'] === undefined) return false;
53
59
  if (!('requested_max_slippage' in value) || value['requested_max_slippage'] === undefined) return false;
54
60
  if (!('requested_slippage' in value) || value['requested_slippage'] === undefined) return false;
61
+ if (!('mark_price' in value) || value['mark_price'] === undefined) return false;
55
62
  if (!('worst_price' in value) || value['worst_price'] === undefined) return false;
56
63
  return true;
57
64
  }
@@ -69,6 +76,7 @@ export function RFQMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean
69
76
  'requested_est_price': json['requested_est_price'],
70
77
  'requested_max_slippage': json['requested_max_slippage'],
71
78
  'requested_slippage': json['requested_slippage'],
79
+ 'mark_price': json['mark_price'],
72
80
  'worst_price': json['worst_price'],
73
81
  };
74
82
  }
@@ -82,6 +90,7 @@ export function RFQMetadataToJSON(value?: RFQMetadata | null): any {
82
90
  'requested_est_price': value['requested_est_price'],
83
91
  'requested_max_slippage': value['requested_max_slippage'],
84
92
  'requested_slippage': value['requested_slippage'],
93
+ 'mark_price': value['mark_price'],
85
94
  'worst_price': value['worst_price'],
86
95
  };
87
96
  }
@@ -0,0 +1,61 @@
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 SubAccountMetadata
20
+ */
21
+ export interface SubAccountMetadata {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SubAccountMetadata
26
+ */
27
+ color: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the SubAccountMetadata interface.
32
+ */
33
+ export function instanceOfSubAccountMetadata(value: object): value is SubAccountMetadata {
34
+ if (!('color' in value) || value['color'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function SubAccountMetadataFromJSON(json: any): SubAccountMetadata {
39
+ return SubAccountMetadataFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function SubAccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubAccountMetadata {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'color': json['color'],
49
+ };
50
+ }
51
+
52
+ export function SubAccountMetadataToJSON(value?: SubAccountMetadata | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'color': value['color'],
59
+ };
60
+ }
61
+
package/models/index.ts CHANGED
@@ -200,6 +200,7 @@ export * from './SpotMarketStats';
200
200
  export * from './SpotOrderBookDetail';
201
201
  export * from './Status';
202
202
  export * from './Strategy';
203
+ export * from './SubAccountMetadata';
203
204
  export * from './SubAccounts';
204
205
  export * from './SystemConfig';
205
206
  export * from './Ticker';
package/openapi.json CHANGED
@@ -5208,6 +5208,9 @@
5208
5208
  "created_at": {
5209
5209
  "type": "integer",
5210
5210
  "format": "int64"
5211
+ },
5212
+ "metadata": {
5213
+ "$ref": "#/definitions/SubAccountMetadata"
5211
5214
  }
5212
5215
  },
5213
5216
  "title": "AccountMetadata",
@@ -5219,7 +5222,8 @@
5219
5222
  "referral_points_percentage",
5220
5223
  "can_rfq",
5221
5224
  "can_rfq_market_ids",
5222
- "created_at"
5225
+ "created_at",
5226
+ "metadata"
5223
5227
  ]
5224
5228
  },
5225
5229
  "AccountMetadatas": {
@@ -6677,6 +6681,9 @@
6677
6681
  "type": "integer",
6678
6682
  "format": "int64"
6679
6683
  },
6684
+ "metadata": {
6685
+ "$ref": "#/definitions/SubAccountMetadata"
6686
+ },
6680
6687
  "positions": {
6681
6688
  "type": "array",
6682
6689
  "items": {
@@ -6749,6 +6756,7 @@
6749
6756
  "can_rfq",
6750
6757
  "can_rfq_market_ids",
6751
6758
  "created_at",
6759
+ "metadata",
6752
6760
  "positions",
6753
6761
  "assets",
6754
6762
  "total_asset_value",
@@ -9600,6 +9608,9 @@
9600
9608
  "requested_slippage": {
9601
9609
  "type": "string"
9602
9610
  },
9611
+ "mark_price": {
9612
+ "type": "string"
9613
+ },
9603
9614
  "worst_price": {
9604
9615
  "type": "string"
9605
9616
  }
@@ -9609,6 +9620,7 @@
9609
9620
  "requested_est_price",
9610
9621
  "requested_max_slippage",
9611
9622
  "requested_slippage",
9623
+ "mark_price",
9612
9624
  "worst_price"
9613
9625
  ]
9614
9626
  },
@@ -13327,6 +13339,18 @@
13327
13339
  "collateral"
13328
13340
  ]
13329
13341
  },
13342
+ "SubAccountMetadata": {
13343
+ "type": "object",
13344
+ "properties": {
13345
+ "color": {
13346
+ "type": "string"
13347
+ }
13348
+ },
13349
+ "title": "SubAccountMetadata",
13350
+ "required": [
13351
+ "color"
13352
+ ]
13353
+ },
13330
13354
  "SubAccounts": {
13331
13355
  "type": "object",
13332
13356
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.256",
3
+ "version": "1.0.258",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {