zklighter-perps 1.0.59 → 1.0.61
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 +2 -0
- package/apis/AccountApi.ts +46 -0
- package/models/FeeBucket.ts +79 -0
- package/models/LeaderboardEntry.ts +9 -0
- package/models/ReqGetFeeBucket.ts +61 -0
- package/models/index.ts +2 -0
- package/openapi.json +78 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -29,6 +29,7 @@ models/DetailedAccounts.ts
|
|
|
29
29
|
models/DetailedCandlestick.ts
|
|
30
30
|
models/EnrichedTx.ts
|
|
31
31
|
models/ExchangeStats.ts
|
|
32
|
+
models/FeeBucket.ts
|
|
32
33
|
models/Funding.ts
|
|
33
34
|
models/Fundings.ts
|
|
34
35
|
models/L1ProviderInfo.ts
|
|
@@ -69,6 +70,7 @@ models/ReqGetBlock.ts
|
|
|
69
70
|
models/ReqGetBlockTxs.ts
|
|
70
71
|
models/ReqGetByAccount.ts
|
|
71
72
|
models/ReqGetCandlesticks.ts
|
|
73
|
+
models/ReqGetFeeBucket.ts
|
|
72
74
|
models/ReqGetFundings.ts
|
|
73
75
|
models/ReqGetL1Tx.ts
|
|
74
76
|
models/ReqGetLeaderboard.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
AccountPnL,
|
|
20
20
|
Accounts,
|
|
21
21
|
DetailedAccounts,
|
|
22
|
+
FeeBucket,
|
|
22
23
|
Leaderboard,
|
|
23
24
|
PublicPools,
|
|
24
25
|
ResultCode,
|
|
@@ -33,6 +34,8 @@ import {
|
|
|
33
34
|
AccountsToJSON,
|
|
34
35
|
DetailedAccountsFromJSON,
|
|
35
36
|
DetailedAccountsToJSON,
|
|
37
|
+
FeeBucketFromJSON,
|
|
38
|
+
FeeBucketToJSON,
|
|
36
39
|
LeaderboardFromJSON,
|
|
37
40
|
LeaderboardToJSON,
|
|
38
41
|
PublicPoolsFromJSON,
|
|
@@ -67,6 +70,10 @@ export interface FaucetRequest {
|
|
|
67
70
|
l1_address: string;
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
export interface FeeBucketRequest {
|
|
74
|
+
account_index: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
export interface LeaderboardRequest {
|
|
71
78
|
type: LeaderboardTypeEnum;
|
|
72
79
|
l1_address?: string;
|
|
@@ -317,6 +324,45 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
317
324
|
return await response.value();
|
|
318
325
|
}
|
|
319
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Get account fee bucket
|
|
329
|
+
* feeBucket
|
|
330
|
+
*/
|
|
331
|
+
async feeBucketRaw(requestParameters: FeeBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FeeBucket>> {
|
|
332
|
+
if (requestParameters['account_index'] == null) {
|
|
333
|
+
throw new runtime.RequiredError(
|
|
334
|
+
'account_index',
|
|
335
|
+
'Required parameter "account_index" was null or undefined when calling feeBucket().'
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const queryParameters: any = {};
|
|
340
|
+
|
|
341
|
+
if (requestParameters['account_index'] != null) {
|
|
342
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
346
|
+
|
|
347
|
+
const response = await this.request({
|
|
348
|
+
path: `/api/v1/feeBucket`,
|
|
349
|
+
method: 'GET',
|
|
350
|
+
headers: headerParameters,
|
|
351
|
+
query: queryParameters,
|
|
352
|
+
}, initOverrides);
|
|
353
|
+
|
|
354
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FeeBucketFromJSON(jsonValue));
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Get account fee bucket
|
|
359
|
+
* feeBucket
|
|
360
|
+
*/
|
|
361
|
+
async feeBucket(requestParameters: FeeBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FeeBucket> {
|
|
362
|
+
const response = await this.feeBucketRaw(requestParameters, initOverrides);
|
|
363
|
+
return await response.value();
|
|
364
|
+
}
|
|
365
|
+
|
|
320
366
|
/**
|
|
321
367
|
* Get points leaderboard
|
|
322
368
|
* leaderboard
|
|
@@ -0,0 +1,79 @@
|
|
|
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 FeeBucket
|
|
20
|
+
*/
|
|
21
|
+
export interface FeeBucket {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof FeeBucket
|
|
26
|
+
*/
|
|
27
|
+
vip_tier: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof FeeBucket
|
|
32
|
+
*/
|
|
33
|
+
taker_fee: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof FeeBucket
|
|
38
|
+
*/
|
|
39
|
+
maker_fee: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the FeeBucket interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfFeeBucket(value: object): value is FeeBucket {
|
|
46
|
+
if (!('vip_tier' in value) || value['vip_tier'] === undefined) return false;
|
|
47
|
+
if (!('taker_fee' in value) || value['taker_fee'] === undefined) return false;
|
|
48
|
+
if (!('maker_fee' in value) || value['maker_fee'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function FeeBucketFromJSON(json: any): FeeBucket {
|
|
53
|
+
return FeeBucketFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function FeeBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeeBucket {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'vip_tier': json['vip_tier'],
|
|
63
|
+
'taker_fee': json['taker_fee'],
|
|
64
|
+
'maker_fee': json['maker_fee'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function FeeBucketToJSON(value?: FeeBucket | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'vip_tier': value['vip_tier'],
|
|
75
|
+
'taker_fee': value['taker_fee'],
|
|
76
|
+
'maker_fee': value['maker_fee'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -37,6 +37,12 @@ export interface LeaderboardEntry {
|
|
|
37
37
|
* @memberof LeaderboardEntry
|
|
38
38
|
*/
|
|
39
39
|
entry: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof LeaderboardEntry
|
|
44
|
+
*/
|
|
45
|
+
entryId: number;
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
/**
|
|
@@ -46,6 +52,7 @@ export function instanceOfLeaderboardEntry(value: object): value is LeaderboardE
|
|
|
46
52
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
47
53
|
if (!('points' in value) || value['points'] === undefined) return false;
|
|
48
54
|
if (!('entry' in value) || value['entry'] === undefined) return false;
|
|
55
|
+
if (!('entryId' in value) || value['entryId'] === undefined) return false;
|
|
49
56
|
return true;
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -62,6 +69,7 @@ export function LeaderboardEntryFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
62
69
|
'l1_address': json['l1_address'],
|
|
63
70
|
'points': json['points'],
|
|
64
71
|
'entry': json['entry'],
|
|
72
|
+
'entryId': json['entryId'],
|
|
65
73
|
};
|
|
66
74
|
}
|
|
67
75
|
|
|
@@ -74,6 +82,7 @@ export function LeaderboardEntryToJSON(value?: LeaderboardEntry | null): any {
|
|
|
74
82
|
'l1_address': value['l1_address'],
|
|
75
83
|
'points': value['points'],
|
|
76
84
|
'entry': value['entry'],
|
|
85
|
+
'entryId': value['entryId'],
|
|
77
86
|
};
|
|
78
87
|
}
|
|
79
88
|
|
|
@@ -0,0 +1,61 @@
|
|
|
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 ReqGetFeeBucket
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetFeeBucket {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ReqGetFeeBucket
|
|
26
|
+
*/
|
|
27
|
+
account_index: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ReqGetFeeBucket interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfReqGetFeeBucket(value: object): value is ReqGetFeeBucket {
|
|
34
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ReqGetFeeBucketFromJSON(json: any): ReqGetFeeBucket {
|
|
39
|
+
return ReqGetFeeBucketFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ReqGetFeeBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetFeeBucket {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'account_index': json['account_index'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ReqGetFeeBucketToJSON(value?: ReqGetFeeBucket | null): any {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
|
|
58
|
+
'account_index': value['account_index'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
package/models/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './DetailedAccounts';
|
|
|
21
21
|
export * from './DetailedCandlestick';
|
|
22
22
|
export * from './EnrichedTx';
|
|
23
23
|
export * from './ExchangeStats';
|
|
24
|
+
export * from './FeeBucket';
|
|
24
25
|
export * from './Funding';
|
|
25
26
|
export * from './Fundings';
|
|
26
27
|
export * from './L1ProviderInfo';
|
|
@@ -61,6 +62,7 @@ export * from './ReqGetBlock';
|
|
|
61
62
|
export * from './ReqGetBlockTxs';
|
|
62
63
|
export * from './ReqGetByAccount';
|
|
63
64
|
export * from './ReqGetCandlesticks';
|
|
65
|
+
export * from './ReqGetFeeBucket';
|
|
64
66
|
export * from './ReqGetFundings';
|
|
65
67
|
export * from './ReqGetL1Tx';
|
|
66
68
|
export * from './ReqGetLeaderboard';
|
package/openapi.json
CHANGED
|
@@ -808,6 +808,42 @@
|
|
|
808
808
|
"description": "Request funds from faucet"
|
|
809
809
|
}
|
|
810
810
|
},
|
|
811
|
+
"/api/v1/feeBucket": {
|
|
812
|
+
"get": {
|
|
813
|
+
"summary": "feeBucket",
|
|
814
|
+
"operationId": "feeBucket",
|
|
815
|
+
"responses": {
|
|
816
|
+
"200": {
|
|
817
|
+
"description": "A successful response.",
|
|
818
|
+
"schema": {
|
|
819
|
+
"$ref": "#/definitions/FeeBucket"
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
"400": {
|
|
823
|
+
"description": "Bad request",
|
|
824
|
+
"schema": {
|
|
825
|
+
"$ref": "#/definitions/ResultCode"
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"parameters": [
|
|
830
|
+
{
|
|
831
|
+
"name": "account_index",
|
|
832
|
+
"in": "query",
|
|
833
|
+
"required": true,
|
|
834
|
+
"type": "integer",
|
|
835
|
+
"format": "int64"
|
|
836
|
+
}
|
|
837
|
+
],
|
|
838
|
+
"tags": [
|
|
839
|
+
"account"
|
|
840
|
+
],
|
|
841
|
+
"consumes": [
|
|
842
|
+
"multipart/form-data"
|
|
843
|
+
],
|
|
844
|
+
"description": "Get account fee bucket"
|
|
845
|
+
}
|
|
846
|
+
},
|
|
811
847
|
"/api/v1/fundings": {
|
|
812
848
|
"get": {
|
|
813
849
|
"summary": "fundings",
|
|
@@ -2610,6 +2646,29 @@
|
|
|
2610
2646
|
"daily_trades_count"
|
|
2611
2647
|
]
|
|
2612
2648
|
},
|
|
2649
|
+
"FeeBucket": {
|
|
2650
|
+
"type": "object",
|
|
2651
|
+
"properties": {
|
|
2652
|
+
"vip_tier": {
|
|
2653
|
+
"type": "integer",
|
|
2654
|
+
"format": "uint8"
|
|
2655
|
+
},
|
|
2656
|
+
"taker_fee": {
|
|
2657
|
+
"type": "integer",
|
|
2658
|
+
"format": "int32"
|
|
2659
|
+
},
|
|
2660
|
+
"maker_fee": {
|
|
2661
|
+
"type": "integer",
|
|
2662
|
+
"format": "int32"
|
|
2663
|
+
}
|
|
2664
|
+
},
|
|
2665
|
+
"title": "FeeBucket",
|
|
2666
|
+
"required": [
|
|
2667
|
+
"vip_tier",
|
|
2668
|
+
"taker_fee",
|
|
2669
|
+
"maker_fee"
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2613
2672
|
"Funding": {
|
|
2614
2673
|
"type": "object",
|
|
2615
2674
|
"properties": {
|
|
@@ -2831,13 +2890,18 @@
|
|
|
2831
2890
|
"entry": {
|
|
2832
2891
|
"type": "integer",
|
|
2833
2892
|
"format": "int32"
|
|
2893
|
+
},
|
|
2894
|
+
"entryId": {
|
|
2895
|
+
"type": "integer",
|
|
2896
|
+
"format": "int32"
|
|
2834
2897
|
}
|
|
2835
2898
|
},
|
|
2836
2899
|
"title": "LeaderboardEntry",
|
|
2837
2900
|
"required": [
|
|
2838
2901
|
"l1_address",
|
|
2839
2902
|
"points",
|
|
2840
|
-
"entry"
|
|
2903
|
+
"entry",
|
|
2904
|
+
"entryId"
|
|
2841
2905
|
]
|
|
2842
2906
|
},
|
|
2843
2907
|
"Liquidation": {
|
|
@@ -4179,6 +4243,19 @@
|
|
|
4179
4243
|
"type": "object",
|
|
4180
4244
|
"title": "ReqGetExchangeStats"
|
|
4181
4245
|
},
|
|
4246
|
+
"ReqGetFeeBucket": {
|
|
4247
|
+
"type": "object",
|
|
4248
|
+
"properties": {
|
|
4249
|
+
"account_index": {
|
|
4250
|
+
"type": "integer",
|
|
4251
|
+
"format": "int64"
|
|
4252
|
+
}
|
|
4253
|
+
},
|
|
4254
|
+
"title": "ReqGetFeeBucket",
|
|
4255
|
+
"required": [
|
|
4256
|
+
"account_index"
|
|
4257
|
+
]
|
|
4258
|
+
},
|
|
4182
4259
|
"ReqGetFundings": {
|
|
4183
4260
|
"type": "object",
|
|
4184
4261
|
"properties": {
|