zklighter-perps 1.0.130 → 1.0.131

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.
@@ -125,7 +125,6 @@ models/RespGetFastBridgeInfo.ts
125
125
  models/RespGetFastwithdrawalInfo.ts
126
126
  models/ResultCode.ts
127
127
  models/RiskInfo.ts
128
- models/RiskParameters.ts
129
128
  models/SimpleOrder.ts
130
129
  models/Status.ts
131
130
  models/SubAccounts.ts
package/models/Account.ts CHANGED
@@ -61,12 +61,6 @@ export interface Account {
61
61
  * @memberof Account
62
62
  */
63
63
  total_order_count: number;
64
- /**
65
- *
66
- * @type {number}
67
- * @memberof Account
68
- */
69
- total_isolated_order_count: number;
70
64
  /**
71
65
  *
72
66
  * @type {number}
@@ -97,7 +91,6 @@ export function instanceOfAccount(value: object): value is Account {
97
91
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
98
92
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
99
93
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
100
- if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
101
94
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
102
95
  if (!('status' in value) || value['status'] === undefined) return false;
103
96
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -121,7 +114,6 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
121
114
  'l1_address': json['l1_address'],
122
115
  'cancel_all_time': json['cancel_all_time'],
123
116
  'total_order_count': json['total_order_count'],
124
- 'total_isolated_order_count': json['total_isolated_order_count'],
125
117
  'pending_order_count': json['pending_order_count'],
126
118
  'status': json['status'],
127
119
  'collateral': json['collateral'],
@@ -141,7 +133,6 @@ export function AccountToJSON(value?: Account | null): any {
141
133
  'l1_address': value['l1_address'],
142
134
  'cancel_all_time': value['cancel_all_time'],
143
135
  'total_order_count': value['total_order_count'],
144
- 'total_isolated_order_count': value['total_isolated_order_count'],
145
136
  'pending_order_count': value['pending_order_count'],
146
137
  'status': value['status'],
147
138
  'collateral': value['collateral'],
@@ -97,18 +97,6 @@ export interface AccountPosition {
97
97
  * @memberof AccountPosition
98
98
  */
99
99
  total_funding_paid_out?: string;
100
- /**
101
- *
102
- * @type {number}
103
- * @memberof AccountPosition
104
- */
105
- margin_mode: number;
106
- /**
107
- *
108
- * @type {string}
109
- * @memberof AccountPosition
110
- */
111
- allocated_margin: string;
112
100
  }
113
101
 
114
102
  /**
@@ -127,8 +115,6 @@ export function instanceOfAccountPosition(value: object): value is AccountPositi
127
115
  if (!('position_value' in value) || value['position_value'] === undefined) return false;
128
116
  if (!('unrealized_pnl' in value) || value['unrealized_pnl'] === undefined) return false;
129
117
  if (!('realized_pnl' in value) || value['realized_pnl'] === undefined) return false;
130
- if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
131
- if (!('allocated_margin' in value) || value['allocated_margin'] === undefined) return false;
132
118
  return true;
133
119
  }
134
120
 
@@ -155,8 +141,6 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
155
141
  'unrealized_pnl': json['unrealized_pnl'],
156
142
  'realized_pnl': json['realized_pnl'],
157
143
  'total_funding_paid_out': json['total_funding_paid_out'] == null ? undefined : json['total_funding_paid_out'],
158
- 'margin_mode': json['margin_mode'],
159
- 'allocated_margin': json['allocated_margin'],
160
144
  };
161
145
  }
162
146
 
@@ -179,8 +163,6 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
179
163
  'unrealized_pnl': value['unrealized_pnl'],
180
164
  'realized_pnl': value['realized_pnl'],
181
165
  'total_funding_paid_out': value['total_funding_paid_out'],
182
- 'margin_mode': value['margin_mode'],
183
- 'allocated_margin': value['allocated_margin'],
184
166
  };
185
167
  }
186
168
 
@@ -80,12 +80,6 @@ export interface DetailedAccount {
80
80
  * @memberof DetailedAccount
81
81
  */
82
82
  total_order_count: number;
83
- /**
84
- *
85
- * @type {number}
86
- * @memberof DetailedAccount
87
- */
88
- total_isolated_order_count: number;
89
83
  /**
90
84
  *
91
85
  * @type {number}
@@ -170,7 +164,6 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
170
164
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
171
165
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
172
166
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
173
- if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
174
167
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
175
168
  if (!('status' in value) || value['status'] === undefined) return false;
176
169
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -203,7 +196,6 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
203
196
  'l1_address': json['l1_address'],
204
197
  'cancel_all_time': json['cancel_all_time'],
205
198
  'total_order_count': json['total_order_count'],
206
- 'total_isolated_order_count': json['total_isolated_order_count'],
207
199
  'pending_order_count': json['pending_order_count'],
208
200
  'status': json['status'],
209
201
  'collateral': json['collateral'],
@@ -232,7 +224,6 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
232
224
  'l1_address': value['l1_address'],
233
225
  'cancel_all_time': value['cancel_all_time'],
234
226
  'total_order_count': value['total_order_count'],
235
- 'total_isolated_order_count': value['total_isolated_order_count'],
236
227
  'pending_order_count': value['pending_order_count'],
237
228
  'status': value['status'],
238
229
  'collateral': value['collateral'],
@@ -30,13 +30,19 @@ export interface PnLEntry {
30
30
  * @type {number}
31
31
  * @memberof PnLEntry
32
32
  */
33
- value: number;
33
+ trade_pnl: number;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof PnLEntry
38
38
  */
39
- trade_pnl: number;
39
+ inflow: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof PnLEntry
44
+ */
45
+ outflow: number;
40
46
  /**
41
47
  *
42
48
  * @type {number}
@@ -48,13 +54,13 @@ export interface PnLEntry {
48
54
  * @type {number}
49
55
  * @memberof PnLEntry
50
56
  */
51
- inflow: number;
57
+ pool_inflow: number;
52
58
  /**
53
59
  *
54
60
  * @type {number}
55
61
  * @memberof PnLEntry
56
62
  */
57
- outflow: number;
63
+ pool_outflow: number;
58
64
  }
59
65
 
60
66
  /**
@@ -62,11 +68,12 @@ export interface PnLEntry {
62
68
  */
63
69
  export function instanceOfPnLEntry(value: object): value is PnLEntry {
64
70
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
65
- if (!('value' in value) || value['value'] === undefined) return false;
66
71
  if (!('trade_pnl' in value) || value['trade_pnl'] === undefined) return false;
67
- if (!('pool_pnl' in value) || value['pool_pnl'] === undefined) return false;
68
72
  if (!('inflow' in value) || value['inflow'] === undefined) return false;
69
73
  if (!('outflow' in value) || value['outflow'] === undefined) return false;
74
+ if (!('pool_pnl' in value) || value['pool_pnl'] === undefined) return false;
75
+ if (!('pool_inflow' in value) || value['pool_inflow'] === undefined) return false;
76
+ if (!('pool_outflow' in value) || value['pool_outflow'] === undefined) return false;
70
77
  return true;
71
78
  }
72
79
 
@@ -81,11 +88,12 @@ export function PnLEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
81
88
  return {
82
89
 
83
90
  'timestamp': json['timestamp'],
84
- 'value': json['value'],
85
91
  'trade_pnl': json['trade_pnl'],
86
- 'pool_pnl': json['pool_pnl'],
87
92
  'inflow': json['inflow'],
88
93
  'outflow': json['outflow'],
94
+ 'pool_pnl': json['pool_pnl'],
95
+ 'pool_inflow': json['pool_inflow'],
96
+ 'pool_outflow': json['pool_outflow'],
89
97
  };
90
98
  }
91
99
 
@@ -96,11 +104,12 @@ export function PnLEntryToJSON(value?: PnLEntry | null): any {
96
104
  return {
97
105
 
98
106
  'timestamp': value['timestamp'],
99
- 'value': value['value'],
100
107
  'trade_pnl': value['trade_pnl'],
101
- 'pool_pnl': value['pool_pnl'],
102
108
  'inflow': value['inflow'],
103
109
  'outflow': value['outflow'],
110
+ 'pool_pnl': value['pool_pnl'],
111
+ 'pool_inflow': value['pool_inflow'],
112
+ 'pool_outflow': value['pool_outflow'],
104
113
  };
105
114
  }
106
115
 
@@ -74,12 +74,6 @@ export interface PublicPool {
74
74
  * @memberof PublicPool
75
75
  */
76
76
  total_order_count: number;
77
- /**
78
- *
79
- * @type {number}
80
- * @memberof PublicPool
81
- */
82
- total_isolated_order_count: number;
83
77
  /**
84
78
  *
85
79
  * @type {number}
@@ -158,7 +152,6 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
158
152
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
159
153
  if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
160
154
  if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
161
- if (!('total_isolated_order_count' in value) || value['total_isolated_order_count'] === undefined) return false;
162
155
  if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
163
156
  if (!('status' in value) || value['status'] === undefined) return false;
164
157
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
@@ -189,7 +182,6 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
189
182
  'l1_address': json['l1_address'],
190
183
  'cancel_all_time': json['cancel_all_time'],
191
184
  'total_order_count': json['total_order_count'],
192
- 'total_isolated_order_count': json['total_isolated_order_count'],
193
185
  'pending_order_count': json['pending_order_count'],
194
186
  'status': json['status'],
195
187
  'collateral': json['collateral'],
@@ -217,7 +209,6 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
217
209
  'l1_address': value['l1_address'],
218
210
  'cancel_all_time': value['cancel_all_time'],
219
211
  'total_order_count': value['total_order_count'],
220
- 'total_isolated_order_count': value['total_isolated_order_count'],
221
212
  'pending_order_count': value['pending_order_count'],
222
213
  'status': value['status'],
223
214
  'collateral': value['collateral'],
@@ -13,13 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { RiskParameters } from './RiskParameters';
17
- import {
18
- RiskParametersFromJSON,
19
- RiskParametersFromJSONTyped,
20
- RiskParametersToJSON,
21
- } from './RiskParameters';
22
-
23
16
  /**
24
17
  *
25
18
  * @export
@@ -28,24 +21,45 @@ import {
28
21
  export interface RiskInfo {
29
22
  /**
30
23
  *
31
- * @type {RiskParameters}
24
+ * @type {string}
25
+ * @memberof RiskInfo
26
+ */
27
+ collateral: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RiskInfo
32
+ */
33
+ total_account_value: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof RiskInfo
38
+ */
39
+ initial_margin_req: string;
40
+ /**
41
+ *
42
+ * @type {string}
32
43
  * @memberof RiskInfo
33
44
  */
34
- cross_risk_parameters: RiskParameters;
45
+ maintenance_margin_req: string;
35
46
  /**
36
47
  *
37
- * @type {Array<RiskParameters>}
48
+ * @type {string}
38
49
  * @memberof RiskInfo
39
50
  */
40
- isolated_risk_parameters: Array<RiskParameters>;
51
+ close_out_margin_req: string;
41
52
  }
42
53
 
43
54
  /**
44
55
  * Check if a given object implements the RiskInfo interface.
45
56
  */
46
57
  export function instanceOfRiskInfo(value: object): value is RiskInfo {
47
- if (!('cross_risk_parameters' in value) || value['cross_risk_parameters'] === undefined) return false;
48
- if (!('isolated_risk_parameters' in value) || value['isolated_risk_parameters'] === undefined) return false;
58
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
59
+ if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
60
+ if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
61
+ if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
62
+ if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
49
63
  return true;
50
64
  }
51
65
 
@@ -59,8 +73,11 @@ export function RiskInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
59
73
  }
60
74
  return {
61
75
 
62
- 'cross_risk_parameters': RiskParametersFromJSON(json['cross_risk_parameters']),
63
- 'isolated_risk_parameters': ((json['isolated_risk_parameters'] as Array<any>).map(RiskParametersFromJSON)),
76
+ 'collateral': json['collateral'],
77
+ 'total_account_value': json['total_account_value'],
78
+ 'initial_margin_req': json['initial_margin_req'],
79
+ 'maintenance_margin_req': json['maintenance_margin_req'],
80
+ 'close_out_margin_req': json['close_out_margin_req'],
64
81
  };
65
82
  }
66
83
 
@@ -70,8 +87,11 @@ export function RiskInfoToJSON(value?: RiskInfo | null): any {
70
87
  }
71
88
  return {
72
89
 
73
- 'cross_risk_parameters': RiskParametersToJSON(value['cross_risk_parameters']),
74
- 'isolated_risk_parameters': ((value['isolated_risk_parameters'] as Array<any>).map(RiskParametersToJSON)),
90
+ 'collateral': value['collateral'],
91
+ 'total_account_value': value['total_account_value'],
92
+ 'initial_margin_req': value['initial_margin_req'],
93
+ 'maintenance_margin_req': value['maintenance_margin_req'],
94
+ 'close_out_margin_req': value['close_out_margin_req'],
75
95
  };
76
96
  }
77
97
 
package/models/index.ts CHANGED
@@ -113,7 +113,6 @@ export * from './RespGetFastBridgeInfo';
113
113
  export * from './RespGetFastwithdrawalInfo';
114
114
  export * from './ResultCode';
115
115
  export * from './RiskInfo';
116
- export * from './RiskParameters';
117
116
  export * from './SimpleOrder';
118
117
  export * from './Status';
119
118
  export * from './SubAccounts';
package/openapi.json CHANGED
@@ -2830,11 +2830,6 @@
2830
2830
  "format": "int64",
2831
2831
  "example": "100"
2832
2832
  },
2833
- "total_isolated_order_count": {
2834
- "type": "integer",
2835
- "format": "int64",
2836
- "example": "100"
2837
- },
2838
2833
  "pending_order_count": {
2839
2834
  "type": "integer",
2840
2835
  "format": "int64",
@@ -2858,7 +2853,6 @@
2858
2853
  "l1_address",
2859
2854
  "cancel_all_time",
2860
2855
  "total_order_count",
2861
- "total_isolated_order_count",
2862
2856
  "pending_order_count",
2863
2857
  "status",
2864
2858
  "collateral"
@@ -3141,15 +3135,6 @@
3141
3135
  "total_funding_paid_out": {
3142
3136
  "type": "string",
3143
3137
  "example": "34.2"
3144
- },
3145
- "margin_mode": {
3146
- "type": "integer",
3147
- "format": "int32",
3148
- "example": "1"
3149
- },
3150
- "allocated_margin": {
3151
- "type": "string",
3152
- "example": "46342"
3153
3138
  }
3154
3139
  },
3155
3140
  "title": "AccountPosition",
@@ -3165,9 +3150,7 @@
3165
3150
  "avg_entry_price",
3166
3151
  "position_value",
3167
3152
  "unrealized_pnl",
3168
- "realized_pnl",
3169
- "margin_mode",
3170
- "allocated_margin"
3153
+ "realized_pnl"
3171
3154
  ]
3172
3155
  },
3173
3156
  "AccountStats": {
@@ -3838,11 +3821,6 @@
3838
3821
  "format": "int64",
3839
3822
  "example": "100"
3840
3823
  },
3841
- "total_isolated_order_count": {
3842
- "type": "integer",
3843
- "format": "int64",
3844
- "example": "100"
3845
- },
3846
3824
  "pending_order_count": {
3847
3825
  "type": "integer",
3848
3826
  "format": "int64",
@@ -3904,7 +3882,6 @@
3904
3882
  "l1_address",
3905
3883
  "cancel_all_time",
3906
3884
  "total_order_count",
3907
- "total_isolated_order_count",
3908
3885
  "pending_order_count",
3909
3886
  "status",
3910
3887
  "collateral",
@@ -5380,12 +5357,17 @@
5380
5357
  "format": "int64",
5381
5358
  "example": "1640995200"
5382
5359
  },
5383
- "value": {
5360
+ "trade_pnl": {
5384
5361
  "type": "number",
5385
5362
  "format": "double",
5386
5363
  "example": "12.0"
5387
5364
  },
5388
- "trade_pnl": {
5365
+ "inflow": {
5366
+ "type": "number",
5367
+ "format": "double",
5368
+ "example": "12.0"
5369
+ },
5370
+ "outflow": {
5389
5371
  "type": "number",
5390
5372
  "format": "double",
5391
5373
  "example": "12.0"
@@ -5395,12 +5377,12 @@
5395
5377
  "format": "double",
5396
5378
  "example": "12.0"
5397
5379
  },
5398
- "inflow": {
5380
+ "pool_inflow": {
5399
5381
  "type": "number",
5400
5382
  "format": "double",
5401
5383
  "example": "12.0"
5402
5384
  },
5403
- "outflow": {
5385
+ "pool_outflow": {
5404
5386
  "type": "number",
5405
5387
  "format": "double",
5406
5388
  "example": "12.0"
@@ -5409,11 +5391,12 @@
5409
5391
  "title": "PnLEntry",
5410
5392
  "required": [
5411
5393
  "timestamp",
5412
- "value",
5413
5394
  "trade_pnl",
5414
- "pool_pnl",
5415
5395
  "inflow",
5416
- "outflow"
5396
+ "outflow",
5397
+ "pool_pnl",
5398
+ "pool_inflow",
5399
+ "pool_outflow"
5417
5400
  ]
5418
5401
  },
5419
5402
  "PositionFunding": {
@@ -5546,11 +5529,6 @@
5546
5529
  "format": "int64",
5547
5530
  "example": "100"
5548
5531
  },
5549
- "total_isolated_order_count": {
5550
- "type": "integer",
5551
- "format": "int64",
5552
- "example": "100"
5553
- },
5554
5532
  "pending_order_count": {
5555
5533
  "type": "integer",
5556
5534
  "format": "int64",
@@ -5603,7 +5581,6 @@
5603
5581
  "l1_address",
5604
5582
  "cancel_all_time",
5605
5583
  "total_order_count",
5606
- "total_isolated_order_count",
5607
5584
  "pending_order_count",
5608
5585
  "status",
5609
5586
  "collateral",
@@ -7084,29 +7061,6 @@
7084
7061
  "RiskInfo": {
7085
7062
  "type": "object",
7086
7063
  "properties": {
7087
- "cross_risk_parameters": {
7088
- "$ref": "#/definitions/RiskParameters"
7089
- },
7090
- "isolated_risk_parameters": {
7091
- "type": "array",
7092
- "items": {
7093
- "$ref": "#/definitions/RiskParameters"
7094
- }
7095
- }
7096
- },
7097
- "title": "RiskInfo",
7098
- "required": [
7099
- "cross_risk_parameters",
7100
- "isolated_risk_parameters"
7101
- ]
7102
- },
7103
- "RiskParameters": {
7104
- "type": "object",
7105
- "properties": {
7106
- "market_id": {
7107
- "type": "integer",
7108
- "format": "uint8"
7109
- },
7110
7064
  "collateral": {
7111
7065
  "type": "string"
7112
7066
  },
@@ -7123,9 +7077,8 @@
7123
7077
  "type": "string"
7124
7078
  }
7125
7079
  },
7126
- "title": "RiskParameters",
7080
+ "title": "RiskInfo",
7127
7081
  "required": [
7128
- "market_id",
7129
7082
  "collateral",
7130
7083
  "total_account_value",
7131
7084
  "initial_margin_req",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.130",
3
+ "version": "1.0.131",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {