zklighter-perps 1.0.122 → 1.0.124
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 +10 -0
- package/models/LiqTrade.ts +4 -4
- package/models/LiquidationInfo.ts +13 -19
- package/models/ReqGetLeaderboard.ts +8 -0
- package/openapi.json +30 -8
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -101,7 +101,9 @@ export interface L1MetadataRequest {
|
|
|
101
101
|
|
|
102
102
|
export interface LeaderboardRequest {
|
|
103
103
|
type: LeaderboardTypeEnum;
|
|
104
|
+
authorization?: string;
|
|
104
105
|
l1_address?: string;
|
|
106
|
+
auth?: string;
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
export interface LiquidationsRequest {
|
|
@@ -533,8 +535,16 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
533
535
|
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
534
536
|
}
|
|
535
537
|
|
|
538
|
+
if (requestParameters['auth'] != null) {
|
|
539
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
540
|
+
}
|
|
541
|
+
|
|
536
542
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
537
543
|
|
|
544
|
+
if (requestParameters['authorization'] != null) {
|
|
545
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
546
|
+
}
|
|
547
|
+
|
|
538
548
|
const response = await this.request({
|
|
539
549
|
path: `/api/v1/leaderboard`,
|
|
540
550
|
method: 'GET',
|
package/models/LiqTrade.ts
CHANGED
|
@@ -33,16 +33,16 @@ export interface LiqTrade {
|
|
|
33
33
|
size: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
|
-
* @type {
|
|
36
|
+
* @type {string}
|
|
37
37
|
* @memberof LiqTrade
|
|
38
38
|
*/
|
|
39
|
-
taker_fee:
|
|
39
|
+
taker_fee: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
|
-
* @type {
|
|
42
|
+
* @type {string}
|
|
43
43
|
* @memberof LiqTrade
|
|
44
44
|
*/
|
|
45
|
-
maker_fee:
|
|
45
|
+
maker_fee: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -13,18 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { AccountPosition } from './AccountPosition';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
22
|
-
import type { Mapuint8uint32 } from './Mapuint8uint32';
|
|
23
|
-
import {
|
|
24
|
-
Mapuint8uint32FromJSON,
|
|
25
|
-
Mapuint8uint32FromJSONTyped,
|
|
26
|
-
Mapuint8uint32ToJSON,
|
|
27
|
-
} from './Mapuint8uint32';
|
|
18
|
+
AccountPositionFromJSON,
|
|
19
|
+
AccountPositionFromJSONTyped,
|
|
20
|
+
AccountPositionToJSON,
|
|
21
|
+
} from './AccountPosition';
|
|
28
22
|
import type { RiskInfo } from './RiskInfo';
|
|
29
23
|
import {
|
|
30
24
|
RiskInfoFromJSON,
|
|
@@ -40,10 +34,10 @@ import {
|
|
|
40
34
|
export interface LiquidationInfo {
|
|
41
35
|
/**
|
|
42
36
|
*
|
|
43
|
-
* @type {
|
|
37
|
+
* @type {Array<AccountPosition>}
|
|
44
38
|
* @memberof LiquidationInfo
|
|
45
39
|
*/
|
|
46
|
-
positions:
|
|
40
|
+
positions: Array<AccountPosition>;
|
|
47
41
|
/**
|
|
48
42
|
*
|
|
49
43
|
* @type {RiskInfo}
|
|
@@ -58,10 +52,10 @@ export interface LiquidationInfo {
|
|
|
58
52
|
risk_info_after: RiskInfo;
|
|
59
53
|
/**
|
|
60
54
|
*
|
|
61
|
-
* @type {
|
|
55
|
+
* @type {{ [key: string]: number; }}
|
|
62
56
|
* @memberof LiquidationInfo
|
|
63
57
|
*/
|
|
64
|
-
mark_prices:
|
|
58
|
+
mark_prices: { [key: string]: number; };
|
|
65
59
|
}
|
|
66
60
|
|
|
67
61
|
/**
|
|
@@ -85,10 +79,10 @@ export function LiquidationInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
85
79
|
}
|
|
86
80
|
return {
|
|
87
81
|
|
|
88
|
-
'positions':
|
|
82
|
+
'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
89
83
|
'risk_info_before': RiskInfoFromJSON(json['risk_info_before']),
|
|
90
84
|
'risk_info_after': RiskInfoFromJSON(json['risk_info_after']),
|
|
91
|
-
'mark_prices':
|
|
85
|
+
'mark_prices': json['mark_prices'],
|
|
92
86
|
};
|
|
93
87
|
}
|
|
94
88
|
|
|
@@ -98,10 +92,10 @@ export function LiquidationInfoToJSON(value?: LiquidationInfo | null): any {
|
|
|
98
92
|
}
|
|
99
93
|
return {
|
|
100
94
|
|
|
101
|
-
'positions':
|
|
95
|
+
'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
102
96
|
'risk_info_before': RiskInfoToJSON(value['risk_info_before']),
|
|
103
97
|
'risk_info_after': RiskInfoToJSON(value['risk_info_after']),
|
|
104
|
-
'mark_prices':
|
|
98
|
+
'mark_prices': value['mark_prices'],
|
|
105
99
|
};
|
|
106
100
|
}
|
|
107
101
|
|
|
@@ -31,6 +31,12 @@ export interface ReqGetLeaderboard {
|
|
|
31
31
|
* @memberof ReqGetLeaderboard
|
|
32
32
|
*/
|
|
33
33
|
l1_address?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ReqGetLeaderboard
|
|
38
|
+
*/
|
|
39
|
+
auth?: string;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
|
|
@@ -64,6 +70,7 @@ export function ReqGetLeaderboardFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
64
70
|
|
|
65
71
|
'type': json['type'],
|
|
66
72
|
'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
73
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
67
74
|
};
|
|
68
75
|
}
|
|
69
76
|
|
|
@@ -75,6 +82,7 @@ export function ReqGetLeaderboardToJSON(value?: ReqGetLeaderboard | null): any {
|
|
|
75
82
|
|
|
76
83
|
'type': value['type'],
|
|
77
84
|
'l1_address': value['l1_address'],
|
|
85
|
+
'auth': value['auth'],
|
|
78
86
|
};
|
|
79
87
|
}
|
|
80
88
|
|
package/openapi.json
CHANGED
|
@@ -1419,6 +1419,12 @@
|
|
|
1419
1419
|
}
|
|
1420
1420
|
},
|
|
1421
1421
|
"parameters": [
|
|
1422
|
+
{
|
|
1423
|
+
"name": "authorization",
|
|
1424
|
+
"in": "header",
|
|
1425
|
+
"required": false,
|
|
1426
|
+
"type": "string"
|
|
1427
|
+
},
|
|
1422
1428
|
{
|
|
1423
1429
|
"name": "type",
|
|
1424
1430
|
"in": "query",
|
|
@@ -1434,6 +1440,12 @@
|
|
|
1434
1440
|
"in": "query",
|
|
1435
1441
|
"required": false,
|
|
1436
1442
|
"type": "string"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "auth",
|
|
1446
|
+
"in": "query",
|
|
1447
|
+
"required": false,
|
|
1448
|
+
"type": "string"
|
|
1437
1449
|
}
|
|
1438
1450
|
],
|
|
1439
1451
|
"tags": [
|
|
@@ -1490,7 +1502,8 @@
|
|
|
1490
1502
|
"in": "query",
|
|
1491
1503
|
"required": false,
|
|
1492
1504
|
"type": "integer",
|
|
1493
|
-
"format": "uint8"
|
|
1505
|
+
"format": "uint8",
|
|
1506
|
+
"default": "255"
|
|
1494
1507
|
},
|
|
1495
1508
|
{
|
|
1496
1509
|
"name": "cursor",
|
|
@@ -4369,12 +4382,10 @@
|
|
|
4369
4382
|
"type": "string"
|
|
4370
4383
|
},
|
|
4371
4384
|
"taker_fee": {
|
|
4372
|
-
"type": "
|
|
4373
|
-
"format": "int32"
|
|
4385
|
+
"type": "string"
|
|
4374
4386
|
},
|
|
4375
4387
|
"maker_fee": {
|
|
4376
|
-
"type": "
|
|
4377
|
-
"format": "int32"
|
|
4388
|
+
"type": "string"
|
|
4378
4389
|
}
|
|
4379
4390
|
},
|
|
4380
4391
|
"title": "LiqTrade",
|
|
@@ -4428,7 +4439,10 @@
|
|
|
4428
4439
|
"type": "object",
|
|
4429
4440
|
"properties": {
|
|
4430
4441
|
"positions": {
|
|
4431
|
-
"
|
|
4442
|
+
"type": "array",
|
|
4443
|
+
"items": {
|
|
4444
|
+
"$ref": "#/definitions/AccountPosition"
|
|
4445
|
+
}
|
|
4432
4446
|
},
|
|
4433
4447
|
"risk_info_before": {
|
|
4434
4448
|
"$ref": "#/definitions/RiskInfo"
|
|
@@ -4437,7 +4451,11 @@
|
|
|
4437
4451
|
"$ref": "#/definitions/RiskInfo"
|
|
4438
4452
|
},
|
|
4439
4453
|
"mark_prices": {
|
|
4440
|
-
"
|
|
4454
|
+
"type": "object",
|
|
4455
|
+
"additionalProperties": {
|
|
4456
|
+
"type": "number",
|
|
4457
|
+
"format": "double"
|
|
4458
|
+
}
|
|
4441
4459
|
}
|
|
4442
4460
|
},
|
|
4443
4461
|
"title": "LiquidationInfo",
|
|
@@ -6343,6 +6361,9 @@
|
|
|
6343
6361
|
},
|
|
6344
6362
|
"l1_address": {
|
|
6345
6363
|
"type": "string"
|
|
6364
|
+
},
|
|
6365
|
+
"auth": {
|
|
6366
|
+
"type": "string"
|
|
6346
6367
|
}
|
|
6347
6368
|
},
|
|
6348
6369
|
"title": "ReqGetLeaderboard",
|
|
@@ -6363,7 +6384,8 @@
|
|
|
6363
6384
|
},
|
|
6364
6385
|
"market_id": {
|
|
6365
6386
|
"type": "integer",
|
|
6366
|
-
"format": "uint8"
|
|
6387
|
+
"format": "uint8",
|
|
6388
|
+
"default": "255"
|
|
6367
6389
|
},
|
|
6368
6390
|
"cursor": {
|
|
6369
6391
|
"type": "string"
|