zklighter-perps 1.0.240 → 1.0.242

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.
@@ -37,7 +37,6 @@ models/ApiToken.ts
37
37
  models/ApprovedIntegrator.ts
38
38
  models/Asset.ts
39
39
  models/AssetDetails.ts
40
- models/AssetStats.ts
41
40
  models/Auth.ts
42
41
  models/Block.ts
43
42
  models/Blocks.ts
package/apis/OrderApi.ts CHANGED
@@ -144,6 +144,8 @@ export interface TradesRequest {
144
144
  role?: TradesRoleEnum;
145
145
  type?: TradesTypeEnum;
146
146
  aggregate?: boolean;
147
+ skip_ask_order_id?: string;
148
+ skip_bid_order_id?: string;
147
149
  }
148
150
 
149
151
  /**
@@ -819,6 +821,14 @@ export class OrderApi extends runtime.BaseAPI {
819
821
  queryParameters['aggregate'] = requestParameters['aggregate'];
820
822
  }
821
823
 
824
+ if (requestParameters['skip_ask_order_id'] != null) {
825
+ queryParameters['skip_ask_order_id'] = requestParameters['skip_ask_order_id'];
826
+ }
827
+
828
+ if (requestParameters['skip_bid_order_id'] != null) {
829
+ queryParameters['skip_bid_order_id'] = requestParameters['skip_bid_order_id'];
830
+ }
831
+
822
832
  const headerParameters: runtime.HTTPHeaders = {};
823
833
 
824
834
  const response = await this.request({
@@ -43,31 +43,8 @@ export interface AccountAsset {
43
43
  * @memberof AccountAsset
44
44
  */
45
45
  locked_balance: string;
46
- /**
47
- *
48
- * @type {string}
49
- * @memberof AccountAsset
50
- */
51
- margin_mode: AccountAssetMarginModeEnum;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof AccountAsset
56
- */
57
- margin_balance: string;
58
46
  }
59
47
 
60
-
61
- /**
62
- * @export
63
- */
64
- export const AccountAssetMarginModeEnum = {
65
- Enabled: 'enabled',
66
- Disabled: 'disabled'
67
- } as const;
68
- export type AccountAssetMarginModeEnum = typeof AccountAssetMarginModeEnum[keyof typeof AccountAssetMarginModeEnum];
69
-
70
-
71
48
  /**
72
49
  * Check if a given object implements the AccountAsset interface.
73
50
  */
@@ -76,8 +53,6 @@ export function instanceOfAccountAsset(value: object): value is AccountAsset {
76
53
  if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
77
54
  if (!('balance' in value) || value['balance'] === undefined) return false;
78
55
  if (!('locked_balance' in value) || value['locked_balance'] === undefined) return false;
79
- if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
80
- if (!('margin_balance' in value) || value['margin_balance'] === undefined) return false;
81
56
  return true;
82
57
  }
83
58
 
@@ -95,8 +70,6 @@ export function AccountAssetFromJSONTyped(json: any, ignoreDiscriminator: boolea
95
70
  'asset_id': json['asset_id'],
96
71
  'balance': json['balance'],
97
72
  'locked_balance': json['locked_balance'],
98
- 'margin_mode': json['margin_mode'],
99
- 'margin_balance': json['margin_balance'],
100
73
  };
101
74
  }
102
75
 
@@ -110,8 +83,6 @@ export function AccountAssetToJSON(value?: AccountAsset | null): any {
110
83
  'asset_id': value['asset_id'],
111
84
  'balance': value['balance'],
112
85
  'locked_balance': value['locked_balance'],
113
- 'margin_mode': value['margin_mode'],
114
- 'margin_balance': value['margin_balance'],
115
86
  };
116
87
  }
117
88
 
package/models/Asset.ts CHANGED
@@ -67,54 +67,12 @@ export interface Asset {
67
67
  * @memberof Asset
68
68
  */
69
69
  index_price: string;
70
- /**
71
- *
72
- * @type {number}
73
- * @memberof Asset
74
- */
75
- price_decimals: number;
76
70
  /**
77
71
  *
78
72
  * @type {string}
79
73
  * @memberof Asset
80
74
  */
81
75
  l1_address: string;
82
- /**
83
- *
84
- * @type {string}
85
- * @memberof Asset
86
- */
87
- loan_to_value: string;
88
- /**
89
- *
90
- * @type {string}
91
- * @memberof Asset
92
- */
93
- liquidation_threshold: string;
94
- /**
95
- *
96
- * @type {string}
97
- * @memberof Asset
98
- */
99
- liquidation_fee: string;
100
- /**
101
- *
102
- * @type {string}
103
- * @memberof Asset
104
- */
105
- global_supply_cap: string;
106
- /**
107
- *
108
- * @type {string}
109
- * @memberof Asset
110
- */
111
- user_supply_cap: string;
112
- /**
113
- *
114
- * @type {string}
115
- * @memberof Asset
116
- */
117
- total_supplied: string;
118
76
  }
119
77
 
120
78
 
@@ -140,14 +98,7 @@ export function instanceOfAsset(value: object): value is Asset {
140
98
  if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false;
141
99
  if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
142
100
  if (!('index_price' in value) || value['index_price'] === undefined) return false;
143
- if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
144
101
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
145
- if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
146
- if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
147
- if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
148
- if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
149
- if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
150
- if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
151
102
  return true;
152
103
  }
153
104
 
@@ -169,14 +120,7 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
169
120
  'min_withdrawal_amount': json['min_withdrawal_amount'],
170
121
  'margin_mode': json['margin_mode'],
171
122
  'index_price': json['index_price'],
172
- 'price_decimals': json['price_decimals'],
173
123
  'l1_address': json['l1_address'],
174
- 'loan_to_value': json['loan_to_value'],
175
- 'liquidation_threshold': json['liquidation_threshold'],
176
- 'liquidation_fee': json['liquidation_fee'],
177
- 'global_supply_cap': json['global_supply_cap'],
178
- 'user_supply_cap': json['user_supply_cap'],
179
- 'total_supplied': json['total_supplied'],
180
124
  };
181
125
  }
182
126
 
@@ -194,14 +138,7 @@ export function AssetToJSON(value?: Asset | null): any {
194
138
  'min_withdrawal_amount': value['min_withdrawal_amount'],
195
139
  'margin_mode': value['margin_mode'],
196
140
  'index_price': value['index_price'],
197
- 'price_decimals': value['price_decimals'],
198
141
  'l1_address': value['l1_address'],
199
- 'loan_to_value': value['loan_to_value'],
200
- 'liquidation_threshold': value['liquidation_threshold'],
201
- 'liquidation_fee': value['liquidation_fee'],
202
- 'global_supply_cap': value['global_supply_cap'],
203
- 'user_supply_cap': value['user_supply_cap'],
204
- 'total_supplied': value['total_supplied'],
205
142
  };
206
143
  }
207
144
 
@@ -31,6 +31,12 @@ export interface AssetStats {
31
31
  * @memberof AssetStats
32
32
  */
33
33
  index_price: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AssetStats
38
+ */
39
+ total_supplied: string;
34
40
  }
35
41
 
36
42
  /**
@@ -39,6 +45,7 @@ export interface AssetStats {
39
45
  export function instanceOfAssetStats(value: object): value is AssetStats {
40
46
  if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
41
47
  if (!('index_price' in value) || value['index_price'] === undefined) return false;
48
+ if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
42
49
  return true;
43
50
  }
44
51
 
@@ -54,6 +61,7 @@ export function AssetStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean)
54
61
 
55
62
  'asset_id': json['asset_id'],
56
63
  'index_price': json['index_price'],
64
+ 'total_supplied': json['total_supplied'],
57
65
  };
58
66
  }
59
67
 
@@ -65,6 +73,7 @@ export function AssetStatsToJSON(value?: AssetStats | null): any {
65
73
 
66
74
  'asset_id': value['asset_id'],
67
75
  'index_price': value['index_price'],
76
+ 'total_supplied': value['total_supplied'],
68
77
  };
69
78
  }
70
79
 
@@ -103,6 +103,18 @@ export interface ReqGetTrades {
103
103
  * @memberof ReqGetTrades
104
104
  */
105
105
  aggregate?: boolean;
106
+ /**
107
+ *
108
+ * @type {string}
109
+ * @memberof ReqGetTrades
110
+ */
111
+ skip_ask_order_id?: string;
112
+ /**
113
+ *
114
+ * @type {string}
115
+ * @memberof ReqGetTrades
116
+ */
117
+ skip_bid_order_id?: string;
106
118
  }
107
119
 
108
120
 
@@ -190,6 +202,8 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
190
202
  'type': json['type'] == null ? undefined : json['type'],
191
203
  'limit': json['limit'],
192
204
  'aggregate': json['aggregate'] == null ? undefined : json['aggregate'],
205
+ 'skip_ask_order_id': json['skip_ask_order_id'] == null ? undefined : json['skip_ask_order_id'],
206
+ 'skip_bid_order_id': json['skip_bid_order_id'] == null ? undefined : json['skip_bid_order_id'],
193
207
  };
194
208
  }
195
209
 
@@ -213,6 +227,8 @@ export function ReqGetTradesToJSON(value?: ReqGetTrades | null): any {
213
227
  'type': value['type'],
214
228
  'limit': value['limit'],
215
229
  'aggregate': value['aggregate'],
230
+ 'skip_ask_order_id': value['skip_ask_order_id'],
231
+ 'skip_bid_order_id': value['skip_bid_order_id'],
216
232
  };
217
233
  }
218
234
 
package/models/index.ts CHANGED
@@ -21,7 +21,6 @@ export * from './ApiToken';
21
21
  export * from './ApprovedIntegrator';
22
22
  export * from './Asset';
23
23
  export * from './AssetDetails';
24
- export * from './AssetStats';
25
24
  export * from './Auth';
26
25
  export * from './Block';
27
26
  export * from './Blocks';
package/openapi.json CHANGED
@@ -689,7 +689,8 @@
689
689
  "in": "query",
690
690
  "required": false,
691
691
  "type": "integer",
692
- "format": "int16"
692
+ "format": "int16",
693
+ "default": "0"
693
694
  }
694
695
  ],
695
696
  "tags": [
@@ -4299,6 +4300,18 @@
4299
4300
  "type": "boolean",
4300
4301
  "format": "boolean",
4301
4302
  "default": "false"
4303
+ },
4304
+ {
4305
+ "name": "skip_ask_order_id",
4306
+ "in": "query",
4307
+ "required": false,
4308
+ "type": "string"
4309
+ },
4310
+ {
4311
+ "name": "skip_bid_order_id",
4312
+ "in": "query",
4313
+ "required": false,
4314
+ "type": "string"
4302
4315
  }
4303
4316
  ],
4304
4317
  "tags": [
@@ -4811,18 +4824,6 @@
4811
4824
  "locked_balance": {
4812
4825
  "type": "string",
4813
4826
  "example": "1000"
4814
- },
4815
- "margin_mode": {
4816
- "type": "string",
4817
- "example": "enabled",
4818
- "enum": [
4819
- "enabled",
4820
- "disabled"
4821
- ]
4822
- },
4823
- "margin_balance": {
4824
- "type": "string",
4825
- "example": "1000"
4826
4827
  }
4827
4828
  },
4828
4829
  "title": "AccountAsset",
@@ -4830,9 +4831,7 @@
4830
4831
  "symbol",
4831
4832
  "asset_id",
4832
4833
  "balance",
4833
- "locked_balance",
4834
- "margin_mode",
4835
- "margin_balance"
4834
+ "locked_balance"
4836
4835
  ]
4837
4836
  },
4838
4837
  "AccountLimits": {
@@ -5584,38 +5583,9 @@
5584
5583
  "type": "string",
5585
5584
  "example": "3024.66"
5586
5585
  },
5587
- "price_decimals": {
5588
- "type": "integer",
5589
- "format": "uint8",
5590
- "example": "4"
5591
- },
5592
5586
  "l1_address": {
5593
5587
  "type": "string",
5594
5588
  "example": "0x0000000000000000000000000000000000000000"
5595
- },
5596
- "loan_to_value": {
5597
- "type": "string",
5598
- "example": "0.5"
5599
- },
5600
- "liquidation_threshold": {
5601
- "type": "string",
5602
- "example": "0.8"
5603
- },
5604
- "liquidation_fee": {
5605
- "type": "string",
5606
- "example": "0.01"
5607
- },
5608
- "global_supply_cap": {
5609
- "type": "string",
5610
- "example": "1000000"
5611
- },
5612
- "user_supply_cap": {
5613
- "type": "string",
5614
- "example": "1000"
5615
- },
5616
- "total_supplied": {
5617
- "type": "string",
5618
- "example": "100"
5619
5589
  }
5620
5590
  },
5621
5591
  "title": "Asset",
@@ -5628,14 +5598,7 @@
5628
5598
  "min_withdrawal_amount",
5629
5599
  "margin_mode",
5630
5600
  "index_price",
5631
- "price_decimals",
5632
- "l1_address",
5633
- "loan_to_value",
5634
- "liquidation_threshold",
5635
- "liquidation_fee",
5636
- "global_supply_cap",
5637
- "user_supply_cap",
5638
- "total_supplied"
5601
+ "l1_address"
5639
5602
  ]
5640
5603
  },
5641
5604
  "AssetDetails": {
@@ -5662,25 +5625,6 @@
5662
5625
  "asset_details"
5663
5626
  ]
5664
5627
  },
5665
- "AssetStats": {
5666
- "type": "object",
5667
- "properties": {
5668
- "asset_id": {
5669
- "type": "integer",
5670
- "format": "int16",
5671
- "example": "1"
5672
- },
5673
- "index_price": {
5674
- "type": "string",
5675
- "example": "3024.66"
5676
- }
5677
- },
5678
- "title": "AssetStats",
5679
- "required": [
5680
- "asset_id",
5681
- "index_price"
5682
- ]
5683
- },
5684
5628
  "Auth": {
5685
5629
  "type": "object",
5686
5630
  "properties": {
@@ -10057,7 +10001,8 @@
10057
10001
  "properties": {
10058
10002
  "asset_id": {
10059
10003
  "type": "integer",
10060
- "format": "int16"
10004
+ "format": "int16",
10005
+ "default": "0"
10061
10006
  }
10062
10007
  },
10063
10008
  "title": "ReqGetAssetDetails"
@@ -10993,6 +10938,12 @@
10993
10938
  "type": "boolean",
10994
10939
  "format": "boolean",
10995
10940
  "default": "false"
10941
+ },
10942
+ "skip_ask_order_id": {
10943
+ "type": "string"
10944
+ },
10945
+ "skip_bid_order_id": {
10946
+ "type": "string"
10996
10947
  }
10997
10948
  },
10998
10949
  "title": "ReqGetTrades",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.240",
3
+ "version": "1.0.242",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {