zklighter-perps 1.0.253 → 1.0.254
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/InfoApi.ts +46 -0
- package/apis/OrderApi.ts +2 -1
- package/models/ReqGetExchangeMetrics.ts +2 -1
- package/models/ReqGetSyntheticSpotInfo.ts +61 -0
- package/models/RespSyntheticSpotInfo.ts +114 -0
- package/models/index.ts +2 -0
- package/openapi.json +91 -2
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -165,6 +165,7 @@ models/ReqGetRangeWithIndexSortable.ts
|
|
|
165
165
|
models/ReqGetRecentTrades.ts
|
|
166
166
|
models/ReqGetReferralCode.ts
|
|
167
167
|
models/ReqGetReferralPoints.ts
|
|
168
|
+
models/ReqGetSyntheticSpotInfo.ts
|
|
168
169
|
models/ReqGetTrades.ts
|
|
169
170
|
models/ReqGetTransferFeeInfo.ts
|
|
170
171
|
models/ReqGetTransferHistory.ts
|
|
@@ -196,6 +197,7 @@ models/RespRevokeApiToken.ts
|
|
|
196
197
|
models/RespSendTx.ts
|
|
197
198
|
models/RespSendTxBatch.ts
|
|
198
199
|
models/RespSetMakerOnlyApiKeys.ts
|
|
200
|
+
models/RespSyntheticSpotInfo.ts
|
|
199
201
|
models/RespUpdateKickback.ts
|
|
200
202
|
models/RespUpdateRFQ.ts
|
|
201
203
|
models/RespUpdateReferralCode.ts
|
package/apis/InfoApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Layer1BasicInfo,
|
|
19
|
+
RespSyntheticSpotInfo,
|
|
19
20
|
RespWithdrawalDelay,
|
|
20
21
|
ResultCode,
|
|
21
22
|
SystemConfig,
|
|
@@ -24,6 +25,8 @@ import type {
|
|
|
24
25
|
import {
|
|
25
26
|
Layer1BasicInfoFromJSON,
|
|
26
27
|
Layer1BasicInfoToJSON,
|
|
28
|
+
RespSyntheticSpotInfoFromJSON,
|
|
29
|
+
RespSyntheticSpotInfoToJSON,
|
|
27
30
|
RespWithdrawalDelayFromJSON,
|
|
28
31
|
RespWithdrawalDelayToJSON,
|
|
29
32
|
ResultCodeFromJSON,
|
|
@@ -34,6 +37,10 @@ import {
|
|
|
34
37
|
TransferFeeInfoToJSON,
|
|
35
38
|
} from '../models/index';
|
|
36
39
|
|
|
40
|
+
export interface SyntheticSpotInfoRequest {
|
|
41
|
+
symbol: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
export interface TransferFeeInfoRequest {
|
|
38
45
|
account_index: number;
|
|
39
46
|
authorization?: string;
|
|
@@ -74,6 +81,45 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
74
81
|
return await response.value();
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Get synthetic spot info for a symbol
|
|
86
|
+
* syntheticSpotInfo
|
|
87
|
+
*/
|
|
88
|
+
async syntheticSpotInfoRaw(requestParameters: SyntheticSpotInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSyntheticSpotInfo>> {
|
|
89
|
+
if (requestParameters['symbol'] == null) {
|
|
90
|
+
throw new runtime.RequiredError(
|
|
91
|
+
'symbol',
|
|
92
|
+
'Required parameter "symbol" was null or undefined when calling syntheticSpotInfo().'
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const queryParameters: any = {};
|
|
97
|
+
|
|
98
|
+
if (requestParameters['symbol'] != null) {
|
|
99
|
+
queryParameters['symbol'] = requestParameters['symbol'];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
103
|
+
|
|
104
|
+
const response = await this.request({
|
|
105
|
+
path: `/api/v1/syntheticSpotInfo`,
|
|
106
|
+
method: 'GET',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
|
|
111
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespSyntheticSpotInfoFromJSON(jsonValue));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Get synthetic spot info for a symbol
|
|
116
|
+
* syntheticSpotInfo
|
|
117
|
+
*/
|
|
118
|
+
async syntheticSpotInfo(requestParameters: SyntheticSpotInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSyntheticSpotInfo> {
|
|
119
|
+
const response = await this.syntheticSpotInfoRaw(requestParameters, initOverrides);
|
|
120
|
+
return await response.value();
|
|
121
|
+
}
|
|
122
|
+
|
|
77
123
|
/**
|
|
78
124
|
* Get system configuration including pool indexes and lockup/cooldown periods
|
|
79
125
|
* systemConfig
|
package/apis/OrderApi.ts
CHANGED
|
@@ -939,7 +939,8 @@ export const ExchangeMetricsKindEnum = {
|
|
|
939
939
|
AccountCount: 'account_count',
|
|
940
940
|
ActiveAccountCount: 'active_account_count',
|
|
941
941
|
Tps: 'tps',
|
|
942
|
-
Buyback: 'buyback'
|
|
942
|
+
Buyback: 'buyback',
|
|
943
|
+
BuybackUsdc: 'buyback_usdc'
|
|
943
944
|
} as const;
|
|
944
945
|
export type ExchangeMetricsKindEnum = typeof ExchangeMetricsKindEnum[keyof typeof ExchangeMetricsKindEnum];
|
|
945
946
|
/**
|
|
@@ -79,7 +79,8 @@ export const ReqGetExchangeMetricsKindEnum = {
|
|
|
79
79
|
AccountCount: 'account_count',
|
|
80
80
|
ActiveAccountCount: 'active_account_count',
|
|
81
81
|
Tps: 'tps',
|
|
82
|
-
Buyback: 'buyback'
|
|
82
|
+
Buyback: 'buyback',
|
|
83
|
+
BuybackUsdc: 'buyback_usdc'
|
|
83
84
|
} as const;
|
|
84
85
|
export type ReqGetExchangeMetricsKindEnum = typeof ReqGetExchangeMetricsKindEnum[keyof typeof ReqGetExchangeMetricsKindEnum];
|
|
85
86
|
|
|
@@ -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 ReqGetSyntheticSpotInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetSyntheticSpotInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetSyntheticSpotInfo
|
|
26
|
+
*/
|
|
27
|
+
symbol: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ReqGetSyntheticSpotInfo interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfReqGetSyntheticSpotInfo(value: object): value is ReqGetSyntheticSpotInfo {
|
|
34
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ReqGetSyntheticSpotInfoFromJSON(json: any): ReqGetSyntheticSpotInfo {
|
|
39
|
+
return ReqGetSyntheticSpotInfoFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ReqGetSyntheticSpotInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetSyntheticSpotInfo {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'symbol': json['symbol'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ReqGetSyntheticSpotInfoToJSON(value?: ReqGetSyntheticSpotInfo | null): any {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
|
|
58
|
+
'symbol': value['symbol'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
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 RespSyntheticSpotInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface RespSyntheticSpotInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespSyntheticSpotInfo
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RespSyntheticSpotInfo
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof RespSyntheticSpotInfo
|
|
38
|
+
*/
|
|
39
|
+
bps_per_day: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof RespSyntheticSpotInfo
|
|
44
|
+
*/
|
|
45
|
+
expiry_time_ms: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof RespSyntheticSpotInfo
|
|
50
|
+
*/
|
|
51
|
+
spot_close_ms: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof RespSyntheticSpotInfo
|
|
56
|
+
*/
|
|
57
|
+
source: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof RespSyntheticSpotInfo
|
|
62
|
+
*/
|
|
63
|
+
symbol: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the RespSyntheticSpotInfo interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfRespSyntheticSpotInfo(value: object): value is RespSyntheticSpotInfo {
|
|
70
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
71
|
+
if (!('bps_per_day' in value) || value['bps_per_day'] === undefined) return false;
|
|
72
|
+
if (!('expiry_time_ms' in value) || value['expiry_time_ms'] === undefined) return false;
|
|
73
|
+
if (!('spot_close_ms' in value) || value['spot_close_ms'] === undefined) return false;
|
|
74
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
75
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function RespSyntheticSpotInfoFromJSON(json: any): RespSyntheticSpotInfo {
|
|
80
|
+
return RespSyntheticSpotInfoFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function RespSyntheticSpotInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespSyntheticSpotInfo {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'code': json['code'],
|
|
90
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
91
|
+
'bps_per_day': json['bps_per_day'],
|
|
92
|
+
'expiry_time_ms': json['expiry_time_ms'],
|
|
93
|
+
'spot_close_ms': json['spot_close_ms'],
|
|
94
|
+
'source': json['source'],
|
|
95
|
+
'symbol': json['symbol'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function RespSyntheticSpotInfoToJSON(value?: RespSyntheticSpotInfo | null): any {
|
|
100
|
+
if (value == null) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'code': value['code'],
|
|
106
|
+
'message': value['message'],
|
|
107
|
+
'bps_per_day': value['bps_per_day'],
|
|
108
|
+
'expiry_time_ms': value['expiry_time_ms'],
|
|
109
|
+
'spot_close_ms': value['spot_close_ms'],
|
|
110
|
+
'source': value['source'],
|
|
111
|
+
'symbol': value['symbol'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
package/models/index.ts
CHANGED
|
@@ -149,6 +149,7 @@ export * from './ReqGetRangeWithIndexSortable';
|
|
|
149
149
|
export * from './ReqGetRecentTrades';
|
|
150
150
|
export * from './ReqGetReferralCode';
|
|
151
151
|
export * from './ReqGetReferralPoints';
|
|
152
|
+
export * from './ReqGetSyntheticSpotInfo';
|
|
152
153
|
export * from './ReqGetTrades';
|
|
153
154
|
export * from './ReqGetTransferFeeInfo';
|
|
154
155
|
export * from './ReqGetTransferHistory';
|
|
@@ -180,6 +181,7 @@ export * from './RespRevokeApiToken';
|
|
|
180
181
|
export * from './RespSendTx';
|
|
181
182
|
export * from './RespSendTxBatch';
|
|
182
183
|
export * from './RespSetMakerOnlyApiKeys';
|
|
184
|
+
export * from './RespSyntheticSpotInfo';
|
|
183
185
|
export * from './RespUpdateKickback';
|
|
184
186
|
export * from './RespUpdateRFQ';
|
|
185
187
|
export * from './RespUpdateReferralCode';
|
package/openapi.json
CHANGED
|
@@ -1381,7 +1381,8 @@
|
|
|
1381
1381
|
"account_count",
|
|
1382
1382
|
"active_account_count",
|
|
1383
1383
|
"tps",
|
|
1384
|
-
"buyback"
|
|
1384
|
+
"buyback",
|
|
1385
|
+
"buyback_usdc"
|
|
1385
1386
|
]
|
|
1386
1387
|
},
|
|
1387
1388
|
{
|
|
@@ -3986,6 +3987,41 @@
|
|
|
3986
3987
|
"description": "Set maker-only API key indexes"
|
|
3987
3988
|
}
|
|
3988
3989
|
},
|
|
3990
|
+
"/api/v1/syntheticSpotInfo": {
|
|
3991
|
+
"get": {
|
|
3992
|
+
"summary": "syntheticSpotInfo",
|
|
3993
|
+
"operationId": "syntheticSpotInfo",
|
|
3994
|
+
"responses": {
|
|
3995
|
+
"200": {
|
|
3996
|
+
"description": "A successful response.",
|
|
3997
|
+
"schema": {
|
|
3998
|
+
"$ref": "#/definitions/RespSyntheticSpotInfo"
|
|
3999
|
+
}
|
|
4000
|
+
},
|
|
4001
|
+
"400": {
|
|
4002
|
+
"description": "Bad request",
|
|
4003
|
+
"schema": {
|
|
4004
|
+
"$ref": "#/definitions/ResultCode"
|
|
4005
|
+
}
|
|
4006
|
+
}
|
|
4007
|
+
},
|
|
4008
|
+
"parameters": [
|
|
4009
|
+
{
|
|
4010
|
+
"name": "symbol",
|
|
4011
|
+
"in": "query",
|
|
4012
|
+
"required": true,
|
|
4013
|
+
"type": "string"
|
|
4014
|
+
}
|
|
4015
|
+
],
|
|
4016
|
+
"tags": [
|
|
4017
|
+
"info"
|
|
4018
|
+
],
|
|
4019
|
+
"consumes": [
|
|
4020
|
+
"multipart/form-data"
|
|
4021
|
+
],
|
|
4022
|
+
"description": "Get synthetic spot info for a symbol"
|
|
4023
|
+
}
|
|
4024
|
+
},
|
|
3989
4025
|
"/api/v1/systemConfig": {
|
|
3990
4026
|
"get": {
|
|
3991
4027
|
"summary": "systemConfig",
|
|
@@ -10389,7 +10425,8 @@
|
|
|
10389
10425
|
"account_count",
|
|
10390
10426
|
"active_account_count",
|
|
10391
10427
|
"tps",
|
|
10392
|
-
"buyback"
|
|
10428
|
+
"buyback",
|
|
10429
|
+
"buyback_usdc"
|
|
10393
10430
|
]
|
|
10394
10431
|
},
|
|
10395
10432
|
"filter": {
|
|
@@ -11000,6 +11037,18 @@
|
|
|
11000
11037
|
"account_index"
|
|
11001
11038
|
]
|
|
11002
11039
|
},
|
|
11040
|
+
"ReqGetSyntheticSpotInfo": {
|
|
11041
|
+
"type": "object",
|
|
11042
|
+
"properties": {
|
|
11043
|
+
"symbol": {
|
|
11044
|
+
"type": "string"
|
|
11045
|
+
}
|
|
11046
|
+
},
|
|
11047
|
+
"title": "ReqGetSyntheticSpotInfo",
|
|
11048
|
+
"required": [
|
|
11049
|
+
"symbol"
|
|
11050
|
+
]
|
|
11051
|
+
},
|
|
11003
11052
|
"ReqGetTrades": {
|
|
11004
11053
|
"type": "object",
|
|
11005
11054
|
"properties": {
|
|
@@ -12402,6 +12451,46 @@
|
|
|
12402
12451
|
"code"
|
|
12403
12452
|
]
|
|
12404
12453
|
},
|
|
12454
|
+
"RespSyntheticSpotInfo": {
|
|
12455
|
+
"type": "object",
|
|
12456
|
+
"properties": {
|
|
12457
|
+
"code": {
|
|
12458
|
+
"type": "integer",
|
|
12459
|
+
"format": "int32",
|
|
12460
|
+
"example": "200"
|
|
12461
|
+
},
|
|
12462
|
+
"message": {
|
|
12463
|
+
"type": "string"
|
|
12464
|
+
},
|
|
12465
|
+
"bps_per_day": {
|
|
12466
|
+
"type": "number",
|
|
12467
|
+
"format": "double"
|
|
12468
|
+
},
|
|
12469
|
+
"expiry_time_ms": {
|
|
12470
|
+
"type": "integer",
|
|
12471
|
+
"format": "int64"
|
|
12472
|
+
},
|
|
12473
|
+
"spot_close_ms": {
|
|
12474
|
+
"type": "integer",
|
|
12475
|
+
"format": "int64"
|
|
12476
|
+
},
|
|
12477
|
+
"source": {
|
|
12478
|
+
"type": "string"
|
|
12479
|
+
},
|
|
12480
|
+
"symbol": {
|
|
12481
|
+
"type": "string"
|
|
12482
|
+
}
|
|
12483
|
+
},
|
|
12484
|
+
"title": "RespSyntheticSpotInfo",
|
|
12485
|
+
"required": [
|
|
12486
|
+
"code",
|
|
12487
|
+
"bps_per_day",
|
|
12488
|
+
"expiry_time_ms",
|
|
12489
|
+
"spot_close_ms",
|
|
12490
|
+
"source",
|
|
12491
|
+
"symbol"
|
|
12492
|
+
]
|
|
12493
|
+
},
|
|
12405
12494
|
"RespUpdateKickback": {
|
|
12406
12495
|
"type": "object",
|
|
12407
12496
|
"properties": {
|