zklighter-perps 1.0.43 → 1.0.45

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.
@@ -47,6 +47,7 @@ models/OrderBooks.ts
47
47
  models/Orders.ts
48
48
  models/Permission.ts
49
49
  models/PnLEntry.ts
50
+ models/PositionFunding.ts
50
51
  models/PriceLevel.ts
51
52
  models/PublicPool.ts
52
53
  models/PublicPoolInfo.ts
@@ -0,0 +1,115 @@
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 PositionFunding
20
+ */
21
+ export interface PositionFunding {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof PositionFunding
26
+ */
27
+ timestamp: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof PositionFunding
32
+ */
33
+ market_id: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof PositionFunding
38
+ */
39
+ funding_id: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof PositionFunding
44
+ */
45
+ change: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof PositionFunding
50
+ */
51
+ rate: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof PositionFunding
56
+ */
57
+ position_size: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof PositionFunding
62
+ */
63
+ position_side: string;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the PositionFunding interface.
68
+ */
69
+ export function instanceOfPositionFunding(value: object): value is PositionFunding {
70
+ if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
71
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
72
+ if (!('funding_id' in value) || value['funding_id'] === undefined) return false;
73
+ if (!('change' in value) || value['change'] === undefined) return false;
74
+ if (!('rate' in value) || value['rate'] === undefined) return false;
75
+ if (!('position_size' in value) || value['position_size'] === undefined) return false;
76
+ if (!('position_side' in value) || value['position_side'] === undefined) return false;
77
+ return true;
78
+ }
79
+
80
+ export function PositionFundingFromJSON(json: any): PositionFunding {
81
+ return PositionFundingFromJSONTyped(json, false);
82
+ }
83
+
84
+ export function PositionFundingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PositionFunding {
85
+ if (json == null) {
86
+ return json;
87
+ }
88
+ return {
89
+
90
+ 'timestamp': json['timestamp'],
91
+ 'market_id': json['market_id'],
92
+ 'funding_id': json['funding_id'],
93
+ 'change': json['change'],
94
+ 'rate': json['rate'],
95
+ 'position_size': json['position_size'],
96
+ 'position_side': json['position_side'],
97
+ };
98
+ }
99
+
100
+ export function PositionFundingToJSON(value?: PositionFunding | null): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+ return {
105
+
106
+ 'timestamp': value['timestamp'],
107
+ 'market_id': value['market_id'],
108
+ 'funding_id': value['funding_id'],
109
+ 'change': value['change'],
110
+ 'rate': value['rate'],
111
+ 'position_size': value['position_size'],
112
+ 'position_side': value['position_side'],
113
+ };
114
+ }
115
+
@@ -92,6 +92,12 @@ export interface PublicPool {
92
92
  * @memberof PublicPool
93
93
  */
94
94
  description: string;
95
+ /**
96
+ *
97
+ * @type {string}
98
+ * @memberof PublicPool
99
+ */
100
+ total_asset_value: string;
95
101
  /**
96
102
  *
97
103
  * @type {PublicPoolInfo}
@@ -114,6 +120,7 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
114
120
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
115
121
  if (!('name' in value) || value['name'] === undefined) return false;
116
122
  if (!('description' in value) || value['description'] === undefined) return false;
123
+ if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
117
124
  if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
118
125
  return true;
119
126
  }
@@ -139,6 +146,7 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
139
146
  'collateral': json['collateral'],
140
147
  'name': json['name'],
141
148
  'description': json['description'],
149
+ 'total_asset_value': json['total_asset_value'],
142
150
  'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
143
151
  };
144
152
  }
@@ -160,6 +168,7 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
160
168
  'collateral': value['collateral'],
161
169
  'name': value['name'],
162
170
  'description': value['description'],
171
+ 'total_asset_value': value['total_asset_value'],
163
172
  'pool_info': PublicPoolInfoToJSON(value['pool_info']),
164
173
  };
165
174
  }
package/models/index.ts CHANGED
@@ -39,6 +39,7 @@ export * from './OrderBooks';
39
39
  export * from './Orders';
40
40
  export * from './Permission';
41
41
  export * from './PnLEntry';
42
+ export * from './PositionFunding';
42
43
  export * from './PriceLevel';
43
44
  export * from './PublicPool';
44
45
  export * from './PublicPoolInfo';
package/openapi.json CHANGED
@@ -3510,6 +3510,52 @@
3510
3510
  "value"
3511
3511
  ]
3512
3512
  },
3513
+ "PositionFunding": {
3514
+ "type": "object",
3515
+ "properties": {
3516
+ "timestamp": {
3517
+ "type": "integer",
3518
+ "format": "int64",
3519
+ "example": "1640995200"
3520
+ },
3521
+ "market_id": {
3522
+ "type": "integer",
3523
+ "format": "uint8",
3524
+ "example": "1"
3525
+ },
3526
+ "funding_id": {
3527
+ "type": "integer",
3528
+ "format": "int64",
3529
+ "example": "1"
3530
+ },
3531
+ "change": {
3532
+ "type": "string",
3533
+ "example": "1"
3534
+ },
3535
+ "rate": {
3536
+ "type": "string",
3537
+ "example": "1"
3538
+ },
3539
+ "position_size": {
3540
+ "type": "string",
3541
+ "example": "1"
3542
+ },
3543
+ "position_side": {
3544
+ "type": "string",
3545
+ "example": "1"
3546
+ }
3547
+ },
3548
+ "title": "PositionFunding",
3549
+ "required": [
3550
+ "timestamp",
3551
+ "market_id",
3552
+ "funding_id",
3553
+ "change",
3554
+ "rate",
3555
+ "position_size",
3556
+ "position_side"
3557
+ ]
3558
+ },
3513
3559
  "PriceLevel": {
3514
3560
  "type": "object",
3515
3561
  "properties": {
@@ -3578,6 +3624,10 @@
3578
3624
  "description": {
3579
3625
  "type": "string"
3580
3626
  },
3627
+ "total_asset_value": {
3628
+ "type": "string",
3629
+ "example": "19995"
3630
+ },
3581
3631
  "pool_info": {
3582
3632
  "$ref": "#/definitions/PublicPoolInfo"
3583
3633
  }
@@ -3594,6 +3644,7 @@
3594
3644
  "collateral",
3595
3645
  "name",
3596
3646
  "description",
3647
+ "total_asset_value",
3597
3648
  "pool_info"
3598
3649
  ]
3599
3650
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {