zklighter-perps 1.0.152 → 1.0.153

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.
@@ -135,6 +135,7 @@ models/RespWithdrawalDelay.ts
135
135
  models/ResultCode.ts
136
136
  models/RiskInfo.ts
137
137
  models/RiskParameters.ts
138
+ models/SharePrice.ts
138
139
  models/SimpleOrder.ts
139
140
  models/Status.ts
140
141
  models/SubAccounts.ts
@@ -19,6 +19,12 @@ import {
19
19
  DailyReturnFromJSONTyped,
20
20
  DailyReturnToJSON,
21
21
  } from './DailyReturn';
22
+ import type { SharePrice } from './SharePrice';
23
+ import {
24
+ SharePriceFromJSON,
25
+ SharePriceFromJSONTyped,
26
+ SharePriceToJSON,
27
+ } from './SharePrice';
22
28
 
23
29
  /**
24
30
  *
@@ -61,31 +67,19 @@ export interface PublicPoolInfo {
61
67
  * @type {number}
62
68
  * @memberof PublicPoolInfo
63
69
  */
64
- share_price_1d: number;
65
- /**
66
- *
67
- * @type {number}
68
- * @memberof PublicPoolInfo
69
- */
70
- share_price_7d: number;
71
- /**
72
- *
73
- * @type {number}
74
- * @memberof PublicPoolInfo
75
- */
76
- share_price_30d: number;
70
+ annual_percentage_yield: number;
77
71
  /**
78
72
  *
79
- * @type {number}
73
+ * @type {Array<DailyReturn>}
80
74
  * @memberof PublicPoolInfo
81
75
  */
82
- annual_percentage_yield: number;
76
+ daily_returns: Array<DailyReturn>;
83
77
  /**
84
78
  *
85
- * @type {Array<DailyReturn>}
79
+ * @type {Array<SharePrice>}
86
80
  * @memberof PublicPoolInfo
87
81
  */
88
- daily_returns: Array<DailyReturn>;
82
+ share_prices: Array<SharePrice>;
89
83
  }
90
84
 
91
85
  /**
@@ -97,11 +91,9 @@ export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo
97
91
  if (!('min_operator_share_rate' in value) || value['min_operator_share_rate'] === undefined) return false;
98
92
  if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
99
93
  if (!('operator_shares' in value) || value['operator_shares'] === undefined) return false;
100
- if (!('share_price_1d' in value) || value['share_price_1d'] === undefined) return false;
101
- if (!('share_price_7d' in value) || value['share_price_7d'] === undefined) return false;
102
- if (!('share_price_30d' in value) || value['share_price_30d'] === undefined) return false;
103
94
  if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
104
95
  if (!('daily_returns' in value) || value['daily_returns'] === undefined) return false;
96
+ if (!('share_prices' in value) || value['share_prices'] === undefined) return false;
105
97
  return true;
106
98
  }
107
99
 
@@ -120,11 +112,9 @@ export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: bool
120
112
  'min_operator_share_rate': json['min_operator_share_rate'],
121
113
  'total_shares': json['total_shares'],
122
114
  'operator_shares': json['operator_shares'],
123
- 'share_price_1d': json['share_price_1d'],
124
- 'share_price_7d': json['share_price_7d'],
125
- 'share_price_30d': json['share_price_30d'],
126
115
  'annual_percentage_yield': json['annual_percentage_yield'],
127
116
  'daily_returns': ((json['daily_returns'] as Array<any>).map(DailyReturnFromJSON)),
117
+ 'share_prices': ((json['share_prices'] as Array<any>).map(SharePriceFromJSON)),
128
118
  };
129
119
  }
130
120
 
@@ -139,11 +129,9 @@ export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
139
129
  'min_operator_share_rate': value['min_operator_share_rate'],
140
130
  'total_shares': value['total_shares'],
141
131
  'operator_shares': value['operator_shares'],
142
- 'share_price_1d': value['share_price_1d'],
143
- 'share_price_7d': value['share_price_7d'],
144
- 'share_price_30d': value['share_price_30d'],
145
132
  'annual_percentage_yield': value['annual_percentage_yield'],
146
133
  'daily_returns': ((value['daily_returns'] as Array<any>).map(DailyReturnToJSON)),
134
+ 'share_prices': ((value['share_prices'] as Array<any>).map(SharePriceToJSON)),
147
135
  };
148
136
  }
149
137
 
@@ -0,0 +1,70 @@
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 SharePrice
20
+ */
21
+ export interface SharePrice {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof SharePrice
26
+ */
27
+ timestamp: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof SharePrice
32
+ */
33
+ share_price: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the SharePrice interface.
38
+ */
39
+ export function instanceOfSharePrice(value: object): value is SharePrice {
40
+ if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
41
+ if (!('share_price' in value) || value['share_price'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function SharePriceFromJSON(json: any): SharePrice {
46
+ return SharePriceFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function SharePriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SharePrice {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'timestamp': json['timestamp'],
56
+ 'share_price': json['share_price'],
57
+ };
58
+ }
59
+
60
+ export function SharePriceToJSON(value?: SharePrice | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'timestamp': value['timestamp'],
67
+ 'share_price': value['share_price'],
68
+ };
69
+ }
70
+
package/models/index.ts CHANGED
@@ -123,6 +123,7 @@ export * from './RespWithdrawalDelay';
123
123
  export * from './ResultCode';
124
124
  export * from './RiskInfo';
125
125
  export * from './RiskParameters';
126
+ export * from './SharePrice';
126
127
  export * from './SimpleOrder';
127
128
  export * from './Status';
128
129
  export * from './SubAccounts';
package/openapi.json CHANGED
@@ -5986,21 +5986,6 @@
5986
5986
  "format": "int64",
5987
5987
  "example": "20000"
5988
5988
  },
5989
- "share_price_1d": {
5990
- "type": "number",
5991
- "format": "double",
5992
- "example": "0.0001"
5993
- },
5994
- "share_price_7d": {
5995
- "type": "number",
5996
- "format": "double",
5997
- "example": "0.0001"
5998
- },
5999
- "share_price_30d": {
6000
- "type": "number",
6001
- "format": "double",
6002
- "example": "0.0001"
6003
- },
6004
5989
  "annual_percentage_yield": {
6005
5990
  "type": "number",
6006
5991
  "format": "double",
@@ -6011,6 +5996,12 @@
6011
5996
  "items": {
6012
5997
  "$ref": "#/definitions/DailyReturn"
6013
5998
  }
5999
+ },
6000
+ "share_prices": {
6001
+ "type": "array",
6002
+ "items": {
6003
+ "$ref": "#/definitions/SharePrice"
6004
+ }
6014
6005
  }
6015
6006
  },
6016
6007
  "title": "PublicPoolInfo",
@@ -6020,11 +6011,9 @@
6020
6011
  "min_operator_share_rate",
6021
6012
  "total_shares",
6022
6013
  "operator_shares",
6023
- "share_price_1d",
6024
- "share_price_7d",
6025
- "share_price_30d",
6026
6014
  "annual_percentage_yield",
6027
- "daily_returns"
6015
+ "daily_returns",
6016
+ "share_prices"
6028
6017
  ]
6029
6018
  },
6030
6019
  "PublicPoolShare": {
@@ -7643,6 +7632,26 @@
7643
7632
  "close_out_margin_req"
7644
7633
  ]
7645
7634
  },
7635
+ "SharePrice": {
7636
+ "type": "object",
7637
+ "properties": {
7638
+ "timestamp": {
7639
+ "type": "integer",
7640
+ "format": "int64",
7641
+ "example": "1640995200"
7642
+ },
7643
+ "share_price": {
7644
+ "type": "number",
7645
+ "format": "double",
7646
+ "example": "0.0001"
7647
+ }
7648
+ },
7649
+ "title": "SharePrice",
7650
+ "required": [
7651
+ "timestamp",
7652
+ "share_price"
7653
+ ]
7654
+ },
7646
7655
  "SimpleOrder": {
7647
7656
  "type": "object",
7648
7657
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.152",
3
+ "version": "1.0.153",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {