zklighter-perps 1.0.104 → 1.0.106
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.
- package/apis/AccountApi.ts +14 -0
- package/models/Order.ts +27 -0
- package/models/ReqGetPositionFunding.ts +20 -0
- package/models/SimpleOrder.ts +9 -0
- package/openapi.json +41 -0
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -104,6 +104,7 @@ export interface PositionFundingRequest {
|
|
|
104
104
|
limit: number;
|
|
105
105
|
market_id?: number;
|
|
106
106
|
cursor?: string;
|
|
107
|
+
side?: PositionFundingSideEnum;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
export interface PublicPoolsRequest {
|
|
@@ -592,6 +593,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
592
593
|
queryParameters['limit'] = requestParameters['limit'];
|
|
593
594
|
}
|
|
594
595
|
|
|
596
|
+
if (requestParameters['side'] != null) {
|
|
597
|
+
queryParameters['side'] = requestParameters['side'];
|
|
598
|
+
}
|
|
599
|
+
|
|
595
600
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
596
601
|
|
|
597
602
|
const response = await this.request({
|
|
@@ -716,6 +721,15 @@ export const PnlResolutionEnum = {
|
|
|
716
721
|
_1d: '1d'
|
|
717
722
|
} as const;
|
|
718
723
|
export type PnlResolutionEnum = typeof PnlResolutionEnum[keyof typeof PnlResolutionEnum];
|
|
724
|
+
/**
|
|
725
|
+
* @export
|
|
726
|
+
*/
|
|
727
|
+
export const PositionFundingSideEnum = {
|
|
728
|
+
Long: 'long',
|
|
729
|
+
Short: 'short',
|
|
730
|
+
All: 'all'
|
|
731
|
+
} as const;
|
|
732
|
+
export type PositionFundingSideEnum = typeof PositionFundingSideEnum[keyof typeof PositionFundingSideEnum];
|
|
719
733
|
/**
|
|
720
734
|
* @export
|
|
721
735
|
*/
|
package/models/Order.ts
CHANGED
|
@@ -31,6 +31,18 @@ export interface Order {
|
|
|
31
31
|
* @memberof Order
|
|
32
32
|
*/
|
|
33
33
|
client_order_index: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof Order
|
|
38
|
+
*/
|
|
39
|
+
order_id: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof Order
|
|
44
|
+
*/
|
|
45
|
+
client_order_id: string;
|
|
34
46
|
/**
|
|
35
47
|
*
|
|
36
48
|
* @type {number}
|
|
@@ -151,6 +163,12 @@ export interface Order {
|
|
|
151
163
|
* @memberof Order
|
|
152
164
|
*/
|
|
153
165
|
parent_order_index: number;
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @type {string}
|
|
169
|
+
* @memberof Order
|
|
170
|
+
*/
|
|
171
|
+
parent_order_id: string;
|
|
154
172
|
/**
|
|
155
173
|
*
|
|
156
174
|
* @type {number}
|
|
@@ -220,6 +238,8 @@ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnu
|
|
|
220
238
|
export function instanceOfOrder(value: object): value is Order {
|
|
221
239
|
if (!('order_index' in value) || value['order_index'] === undefined) return false;
|
|
222
240
|
if (!('client_order_index' in value) || value['client_order_index'] === undefined) return false;
|
|
241
|
+
if (!('order_id' in value) || value['order_id'] === undefined) return false;
|
|
242
|
+
if (!('client_order_id' in value) || value['client_order_id'] === undefined) return false;
|
|
223
243
|
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
224
244
|
if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
|
|
225
245
|
if (!('initial_base_amount' in value) || value['initial_base_amount'] === undefined) return false;
|
|
@@ -240,6 +260,7 @@ export function instanceOfOrder(value: object): value is Order {
|
|
|
240
260
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
241
261
|
if (!('trigger_time' in value) || value['trigger_time'] === undefined) return false;
|
|
242
262
|
if (!('parent_order_index' in value) || value['parent_order_index'] === undefined) return false;
|
|
263
|
+
if (!('parent_order_id' in value) || value['parent_order_id'] === undefined) return false;
|
|
243
264
|
if (!('block_height' in value) || value['block_height'] === undefined) return false;
|
|
244
265
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
245
266
|
return true;
|
|
@@ -257,6 +278,8 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
257
278
|
|
|
258
279
|
'order_index': json['order_index'],
|
|
259
280
|
'client_order_index': json['client_order_index'],
|
|
281
|
+
'order_id': json['order_id'],
|
|
282
|
+
'client_order_id': json['client_order_id'],
|
|
260
283
|
'market_index': json['market_index'],
|
|
261
284
|
'owner_account_index': json['owner_account_index'],
|
|
262
285
|
'initial_base_amount': json['initial_base_amount'],
|
|
@@ -277,6 +300,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
277
300
|
'status': json['status'],
|
|
278
301
|
'trigger_time': json['trigger_time'],
|
|
279
302
|
'parent_order_index': json['parent_order_index'],
|
|
303
|
+
'parent_order_id': json['parent_order_id'],
|
|
280
304
|
'block_height': json['block_height'],
|
|
281
305
|
'timestamp': json['timestamp'],
|
|
282
306
|
};
|
|
@@ -290,6 +314,8 @@ export function OrderToJSON(value?: Order | null): any {
|
|
|
290
314
|
|
|
291
315
|
'order_index': value['order_index'],
|
|
292
316
|
'client_order_index': value['client_order_index'],
|
|
317
|
+
'order_id': value['order_id'],
|
|
318
|
+
'client_order_id': value['client_order_id'],
|
|
293
319
|
'market_index': value['market_index'],
|
|
294
320
|
'owner_account_index': value['owner_account_index'],
|
|
295
321
|
'initial_base_amount': value['initial_base_amount'],
|
|
@@ -310,6 +336,7 @@ export function OrderToJSON(value?: Order | null): any {
|
|
|
310
336
|
'status': value['status'],
|
|
311
337
|
'trigger_time': value['trigger_time'],
|
|
312
338
|
'parent_order_index': value['parent_order_index'],
|
|
339
|
+
'parent_order_id': value['parent_order_id'],
|
|
313
340
|
'block_height': value['block_height'],
|
|
314
341
|
'timestamp': value['timestamp'],
|
|
315
342
|
};
|
|
@@ -43,8 +43,26 @@ export interface ReqGetPositionFunding {
|
|
|
43
43
|
* @memberof ReqGetPositionFunding
|
|
44
44
|
*/
|
|
45
45
|
limit: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ReqGetPositionFunding
|
|
50
|
+
*/
|
|
51
|
+
side?: ReqGetPositionFundingSideEnum;
|
|
46
52
|
}
|
|
47
53
|
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const ReqGetPositionFundingSideEnum = {
|
|
59
|
+
Long: 'long',
|
|
60
|
+
Short: 'short',
|
|
61
|
+
All: 'all'
|
|
62
|
+
} as const;
|
|
63
|
+
export type ReqGetPositionFundingSideEnum = typeof ReqGetPositionFundingSideEnum[keyof typeof ReqGetPositionFundingSideEnum];
|
|
64
|
+
|
|
65
|
+
|
|
48
66
|
/**
|
|
49
67
|
* Check if a given object implements the ReqGetPositionFunding interface.
|
|
50
68
|
*/
|
|
@@ -68,6 +86,7 @@ export function ReqGetPositionFundingFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
68
86
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
69
87
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
70
88
|
'limit': json['limit'],
|
|
89
|
+
'side': json['side'] == null ? undefined : json['side'],
|
|
71
90
|
};
|
|
72
91
|
}
|
|
73
92
|
|
|
@@ -81,6 +100,7 @@ export function ReqGetPositionFundingToJSON(value?: ReqGetPositionFunding | null
|
|
|
81
100
|
'market_id': value['market_id'],
|
|
82
101
|
'cursor': value['cursor'],
|
|
83
102
|
'limit': value['limit'],
|
|
103
|
+
'side': value['side'],
|
|
84
104
|
};
|
|
85
105
|
}
|
|
86
106
|
|
package/models/SimpleOrder.ts
CHANGED
|
@@ -25,6 +25,12 @@ export interface SimpleOrder {
|
|
|
25
25
|
* @memberof SimpleOrder
|
|
26
26
|
*/
|
|
27
27
|
order_index: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SimpleOrder
|
|
32
|
+
*/
|
|
33
|
+
order_id: string;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {number}
|
|
@@ -62,6 +68,7 @@ export interface SimpleOrder {
|
|
|
62
68
|
*/
|
|
63
69
|
export function instanceOfSimpleOrder(value: object): value is SimpleOrder {
|
|
64
70
|
if (!('order_index' in value) || value['order_index'] === undefined) return false;
|
|
71
|
+
if (!('order_id' in value) || value['order_id'] === undefined) return false;
|
|
65
72
|
if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
|
|
66
73
|
if (!('initial_base_amount' in value) || value['initial_base_amount'] === undefined) return false;
|
|
67
74
|
if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
|
|
@@ -81,6 +88,7 @@ export function SimpleOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
81
88
|
return {
|
|
82
89
|
|
|
83
90
|
'order_index': json['order_index'],
|
|
91
|
+
'order_id': json['order_id'],
|
|
84
92
|
'owner_account_index': json['owner_account_index'],
|
|
85
93
|
'initial_base_amount': json['initial_base_amount'],
|
|
86
94
|
'remaining_base_amount': json['remaining_base_amount'],
|
|
@@ -96,6 +104,7 @@ export function SimpleOrderToJSON(value?: SimpleOrder | null): any {
|
|
|
96
104
|
return {
|
|
97
105
|
|
|
98
106
|
'order_index': value['order_index'],
|
|
107
|
+
'order_id': value['order_id'],
|
|
99
108
|
'owner_account_index': value['owner_account_index'],
|
|
100
109
|
'initial_base_amount': value['initial_base_amount'],
|
|
101
110
|
'remaining_base_amount': value['remaining_base_amount'],
|
package/openapi.json
CHANGED
|
@@ -1758,6 +1758,18 @@
|
|
|
1758
1758
|
"format": "int64",
|
|
1759
1759
|
"minimum": 1,
|
|
1760
1760
|
"maximum": 100
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"name": "side",
|
|
1764
|
+
"in": "query",
|
|
1765
|
+
"required": false,
|
|
1766
|
+
"type": "string",
|
|
1767
|
+
"enum": [
|
|
1768
|
+
"long",
|
|
1769
|
+
"short",
|
|
1770
|
+
"all"
|
|
1771
|
+
],
|
|
1772
|
+
"default": "all"
|
|
1761
1773
|
}
|
|
1762
1774
|
],
|
|
1763
1775
|
"tags": [
|
|
@@ -4225,6 +4237,14 @@
|
|
|
4225
4237
|
"format": "int64",
|
|
4226
4238
|
"example": "234"
|
|
4227
4239
|
},
|
|
4240
|
+
"order_id": {
|
|
4241
|
+
"type": "string",
|
|
4242
|
+
"example": "1"
|
|
4243
|
+
},
|
|
4244
|
+
"client_order_id": {
|
|
4245
|
+
"type": "string",
|
|
4246
|
+
"example": "234"
|
|
4247
|
+
},
|
|
4228
4248
|
"market_index": {
|
|
4229
4249
|
"type": "integer",
|
|
4230
4250
|
"format": "uint8",
|
|
@@ -4349,6 +4369,10 @@
|
|
|
4349
4369
|
"format": "int64",
|
|
4350
4370
|
"example": "1"
|
|
4351
4371
|
},
|
|
4372
|
+
"parent_order_id": {
|
|
4373
|
+
"type": "string",
|
|
4374
|
+
"example": "1"
|
|
4375
|
+
},
|
|
4352
4376
|
"block_height": {
|
|
4353
4377
|
"type": "integer",
|
|
4354
4378
|
"format": "int64",
|
|
@@ -4364,6 +4388,8 @@
|
|
|
4364
4388
|
"required": [
|
|
4365
4389
|
"order_index",
|
|
4366
4390
|
"client_order_index",
|
|
4391
|
+
"order_id",
|
|
4392
|
+
"client_order_id",
|
|
4367
4393
|
"market_index",
|
|
4368
4394
|
"owner_account_index",
|
|
4369
4395
|
"initial_base_amount",
|
|
@@ -4384,6 +4410,7 @@
|
|
|
4384
4410
|
"status",
|
|
4385
4411
|
"trigger_time",
|
|
4386
4412
|
"parent_order_index",
|
|
4413
|
+
"parent_order_id",
|
|
4387
4414
|
"block_height",
|
|
4388
4415
|
"timestamp"
|
|
4389
4416
|
]
|
|
@@ -5964,6 +5991,15 @@
|
|
|
5964
5991
|
"format": "int64",
|
|
5965
5992
|
"maximum": 100,
|
|
5966
5993
|
"minimum": 1
|
|
5994
|
+
},
|
|
5995
|
+
"side": {
|
|
5996
|
+
"type": "string",
|
|
5997
|
+
"enum": [
|
|
5998
|
+
"long",
|
|
5999
|
+
"short",
|
|
6000
|
+
"all"
|
|
6001
|
+
],
|
|
6002
|
+
"default": "all"
|
|
5967
6003
|
}
|
|
5968
6004
|
},
|
|
5969
6005
|
"title": "ReqGetPositionFunding",
|
|
@@ -6402,6 +6438,10 @@
|
|
|
6402
6438
|
"format": "int64",
|
|
6403
6439
|
"example": "1"
|
|
6404
6440
|
},
|
|
6441
|
+
"order_id": {
|
|
6442
|
+
"type": "string",
|
|
6443
|
+
"example": "1"
|
|
6444
|
+
},
|
|
6405
6445
|
"owner_account_index": {
|
|
6406
6446
|
"type": "integer",
|
|
6407
6447
|
"format": "int64",
|
|
@@ -6428,6 +6468,7 @@
|
|
|
6428
6468
|
"title": "SimpleOrder",
|
|
6429
6469
|
"required": [
|
|
6430
6470
|
"order_index",
|
|
6471
|
+
"order_id",
|
|
6431
6472
|
"owner_account_index",
|
|
6432
6473
|
"initial_base_amount",
|
|
6433
6474
|
"remaining_base_amount",
|