zklighter-perps 1.0.42 → 1.0.44
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/.openapi-generator/FILES +1 -0
- package/apis/AccountApi.ts +12 -0
- package/apis/TransactionApi.ts +4 -4
- package/models/PositionFunding.ts +97 -0
- package/models/PublicPools.ts +9 -0
- package/models/ReqGetPublicPools.ts +9 -0
- package/models/index.ts +1 -0
- package/openapi.json +63 -4
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/AccountApi.ts
CHANGED
|
@@ -74,6 +74,7 @@ export interface PnlRequest {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export interface PublicPoolsRequest {
|
|
77
|
+
filter: string;
|
|
77
78
|
index: number;
|
|
78
79
|
limit: number;
|
|
79
80
|
}
|
|
@@ -407,6 +408,13 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
407
408
|
* publicPools
|
|
408
409
|
*/
|
|
409
410
|
async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
|
|
411
|
+
if (requestParameters['filter'] == null) {
|
|
412
|
+
throw new runtime.RequiredError(
|
|
413
|
+
'filter',
|
|
414
|
+
'Required parameter "filter" was null or undefined when calling publicPools().'
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
410
418
|
if (requestParameters['index'] == null) {
|
|
411
419
|
throw new runtime.RequiredError(
|
|
412
420
|
'index',
|
|
@@ -423,6 +431,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
423
431
|
|
|
424
432
|
const queryParameters: any = {};
|
|
425
433
|
|
|
434
|
+
if (requestParameters['filter'] != null) {
|
|
435
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
436
|
+
}
|
|
437
|
+
|
|
426
438
|
if (requestParameters['index'] != null) {
|
|
427
439
|
queryParameters['index'] = requestParameters['index'];
|
|
428
440
|
}
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
export interface AccountPendingTxsRequest {
|
|
41
41
|
by: AccountPendingTxsByEnum;
|
|
42
42
|
value: string;
|
|
43
|
-
types?: number
|
|
43
|
+
types?: Array<number>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface AccountTxsRequest {
|
|
@@ -48,7 +48,7 @@ export interface AccountTxsRequest {
|
|
|
48
48
|
by: AccountTxsByEnum;
|
|
49
49
|
value: string;
|
|
50
50
|
index?: number;
|
|
51
|
-
types?: number
|
|
51
|
+
types?: Array<number>;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface BlockTxsRequest {
|
|
@@ -133,7 +133,7 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
if (requestParameters['types'] != null) {
|
|
136
|
-
queryParameters['types'] = requestParameters['types'];
|
|
136
|
+
queryParameters['types'] = requestParameters['types']!.join(runtime.COLLECTION_FORMATS["csv"]);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -202,7 +202,7 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
if (requestParameters['types'] != null) {
|
|
205
|
-
queryParameters['types'] = requestParameters['types'];
|
|
205
|
+
queryParameters['types'] = requestParameters['types']!.join(runtime.COLLECTION_FORMATS["csv"]);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -0,0 +1,97 @@
|
|
|
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 {number}
|
|
43
|
+
* @memberof PositionFunding
|
|
44
|
+
*/
|
|
45
|
+
change: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PositionFunding
|
|
50
|
+
*/
|
|
51
|
+
rate: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the PositionFunding interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfPositionFunding(value: object): value is PositionFunding {
|
|
58
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
59
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
60
|
+
if (!('funding_id' in value) || value['funding_id'] === undefined) return false;
|
|
61
|
+
if (!('change' in value) || value['change'] === undefined) return false;
|
|
62
|
+
if (!('rate' in value) || value['rate'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PositionFundingFromJSON(json: any): PositionFunding {
|
|
67
|
+
return PositionFundingFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PositionFundingFromJSONTyped(json: any, ignoreDiscriminator: boolean): PositionFunding {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'timestamp': json['timestamp'],
|
|
77
|
+
'market_id': json['market_id'],
|
|
78
|
+
'funding_id': json['funding_id'],
|
|
79
|
+
'change': json['change'],
|
|
80
|
+
'rate': json['rate'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PositionFundingToJSON(value?: PositionFunding | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'timestamp': value['timestamp'],
|
|
91
|
+
'market_id': value['market_id'],
|
|
92
|
+
'funding_id': value['funding_id'],
|
|
93
|
+
'change': value['change'],
|
|
94
|
+
'rate': value['rate'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
package/models/PublicPools.ts
CHANGED
|
@@ -38,6 +38,12 @@ export interface PublicPools {
|
|
|
38
38
|
* @memberof PublicPools
|
|
39
39
|
*/
|
|
40
40
|
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof PublicPools
|
|
45
|
+
*/
|
|
46
|
+
total: number;
|
|
41
47
|
/**
|
|
42
48
|
*
|
|
43
49
|
* @type {Array<PublicPool>}
|
|
@@ -51,6 +57,7 @@ export interface PublicPools {
|
|
|
51
57
|
*/
|
|
52
58
|
export function instanceOfPublicPools(value: object): value is PublicPools {
|
|
53
59
|
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
54
61
|
if (!('public_pools' in value) || value['public_pools'] === undefined) return false;
|
|
55
62
|
return true;
|
|
56
63
|
}
|
|
@@ -67,6 +74,7 @@ export function PublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
67
74
|
|
|
68
75
|
'code': json['code'],
|
|
69
76
|
'message': json['message'] == null ? undefined : json['message'],
|
|
77
|
+
'total': json['total'],
|
|
70
78
|
'public_pools': ((json['public_pools'] as Array<any>).map(PublicPoolFromJSON)),
|
|
71
79
|
};
|
|
72
80
|
}
|
|
@@ -79,6 +87,7 @@ export function PublicPoolsToJSON(value?: PublicPools | null): any {
|
|
|
79
87
|
|
|
80
88
|
'code': value['code'],
|
|
81
89
|
'message': value['message'],
|
|
90
|
+
'total': value['total'],
|
|
82
91
|
'public_pools': ((value['public_pools'] as Array<any>).map(PublicPoolToJSON)),
|
|
83
92
|
};
|
|
84
93
|
}
|
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ReqGetPublicPools
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetPublicPools {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetPublicPools
|
|
26
|
+
*/
|
|
27
|
+
filter: string;
|
|
22
28
|
/**
|
|
23
29
|
*
|
|
24
30
|
* @type {number}
|
|
@@ -37,6 +43,7 @@ export interface ReqGetPublicPools {
|
|
|
37
43
|
* Check if a given object implements the ReqGetPublicPools interface.
|
|
38
44
|
*/
|
|
39
45
|
export function instanceOfReqGetPublicPools(value: object): value is ReqGetPublicPools {
|
|
46
|
+
if (!('filter' in value) || value['filter'] === undefined) return false;
|
|
40
47
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
41
48
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
42
49
|
return true;
|
|
@@ -52,6 +59,7 @@ export function ReqGetPublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
52
59
|
}
|
|
53
60
|
return {
|
|
54
61
|
|
|
62
|
+
'filter': json['filter'],
|
|
55
63
|
'index': json['index'],
|
|
56
64
|
'limit': json['limit'],
|
|
57
65
|
};
|
|
@@ -63,6 +71,7 @@ export function ReqGetPublicPoolsToJSON(value?: ReqGetPublicPools | null): any {
|
|
|
63
71
|
}
|
|
64
72
|
return {
|
|
65
73
|
|
|
74
|
+
'filter': value['filter'],
|
|
66
75
|
'index': value['index'],
|
|
67
76
|
'limit': value['limit'],
|
|
68
77
|
};
|
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
|
@@ -291,8 +291,11 @@
|
|
|
291
291
|
"name": "types",
|
|
292
292
|
"in": "query",
|
|
293
293
|
"required": false,
|
|
294
|
-
"type": "
|
|
295
|
-
"
|
|
294
|
+
"type": "array",
|
|
295
|
+
"items": {
|
|
296
|
+
"type": "integer",
|
|
297
|
+
"format": "uint8"
|
|
298
|
+
}
|
|
296
299
|
}
|
|
297
300
|
],
|
|
298
301
|
"tags": [
|
|
@@ -358,8 +361,11 @@
|
|
|
358
361
|
"name": "types",
|
|
359
362
|
"in": "query",
|
|
360
363
|
"required": false,
|
|
361
|
-
"type": "
|
|
362
|
-
"
|
|
364
|
+
"type": "array",
|
|
365
|
+
"items": {
|
|
366
|
+
"type": "integer",
|
|
367
|
+
"format": "uint8"
|
|
368
|
+
}
|
|
363
369
|
}
|
|
364
370
|
],
|
|
365
371
|
"tags": [
|
|
@@ -1303,6 +1309,12 @@
|
|
|
1303
1309
|
}
|
|
1304
1310
|
},
|
|
1305
1311
|
"parameters": [
|
|
1312
|
+
{
|
|
1313
|
+
"name": "filter",
|
|
1314
|
+
"in": "query",
|
|
1315
|
+
"required": true,
|
|
1316
|
+
"type": "string"
|
|
1317
|
+
},
|
|
1306
1318
|
{
|
|
1307
1319
|
"name": "index",
|
|
1308
1320
|
"in": "query",
|
|
@@ -3498,6 +3510,44 @@
|
|
|
3498
3510
|
"value"
|
|
3499
3511
|
]
|
|
3500
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": "integer",
|
|
3533
|
+
"format": "int64",
|
|
3534
|
+
"example": "1"
|
|
3535
|
+
},
|
|
3536
|
+
"rate": {
|
|
3537
|
+
"type": "integer",
|
|
3538
|
+
"format": "int64",
|
|
3539
|
+
"example": "1"
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
"title": "PositionFunding",
|
|
3543
|
+
"required": [
|
|
3544
|
+
"timestamp",
|
|
3545
|
+
"market_id",
|
|
3546
|
+
"funding_id",
|
|
3547
|
+
"change",
|
|
3548
|
+
"rate"
|
|
3549
|
+
]
|
|
3550
|
+
},
|
|
3501
3551
|
"PriceLevel": {
|
|
3502
3552
|
"type": "object",
|
|
3503
3553
|
"properties": {
|
|
@@ -3657,6 +3707,10 @@
|
|
|
3657
3707
|
"message": {
|
|
3658
3708
|
"type": "string"
|
|
3659
3709
|
},
|
|
3710
|
+
"total": {
|
|
3711
|
+
"type": "integer",
|
|
3712
|
+
"format": "int64"
|
|
3713
|
+
},
|
|
3660
3714
|
"public_pools": {
|
|
3661
3715
|
"type": "array",
|
|
3662
3716
|
"items": {
|
|
@@ -3667,6 +3721,7 @@
|
|
|
3667
3721
|
"title": "PublicPools",
|
|
3668
3722
|
"required": [
|
|
3669
3723
|
"code",
|
|
3724
|
+
"total",
|
|
3670
3725
|
"public_pools"
|
|
3671
3726
|
]
|
|
3672
3727
|
},
|
|
@@ -4169,6 +4224,9 @@
|
|
|
4169
4224
|
"ReqGetPublicPools": {
|
|
4170
4225
|
"type": "object",
|
|
4171
4226
|
"properties": {
|
|
4227
|
+
"filter": {
|
|
4228
|
+
"type": "string"
|
|
4229
|
+
},
|
|
4172
4230
|
"index": {
|
|
4173
4231
|
"type": "integer",
|
|
4174
4232
|
"format": "int64"
|
|
@@ -4182,6 +4240,7 @@
|
|
|
4182
4240
|
},
|
|
4183
4241
|
"title": "ReqGetPublicPools",
|
|
4184
4242
|
"required": [
|
|
4243
|
+
"filter",
|
|
4185
4244
|
"index",
|
|
4186
4245
|
"limit"
|
|
4187
4246
|
]
|