zklighter-perps 1.0.252 → 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.
@@ -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
@@ -237,6 +237,8 @@ export interface PositionFundingRequest {
237
237
  market_id?: number;
238
238
  cursor?: string;
239
239
  side?: PositionFundingSideEnum;
240
+ start_timestamp?: number;
241
+ end_timestamp?: number;
240
242
  }
241
243
 
242
244
  export interface PublicPoolsMetadataRequest {
@@ -1445,6 +1447,14 @@ export class AccountApi extends runtime.BaseAPI {
1445
1447
  queryParameters['side'] = requestParameters['side'];
1446
1448
  }
1447
1449
 
1450
+ if (requestParameters['start_timestamp'] != null) {
1451
+ queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
1452
+ }
1453
+
1454
+ if (requestParameters['end_timestamp'] != null) {
1455
+ queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
1456
+ }
1457
+
1448
1458
  const headerParameters: runtime.HTTPHeaders = {};
1449
1459
 
1450
1460
  const response = await this.request({
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
 
@@ -55,6 +55,18 @@ export interface ReqGetPositionFunding {
55
55
  * @memberof ReqGetPositionFunding
56
56
  */
57
57
  side?: ReqGetPositionFundingSideEnum;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof ReqGetPositionFunding
62
+ */
63
+ start_timestamp?: number;
64
+ /**
65
+ *
66
+ * @type {number}
67
+ * @memberof ReqGetPositionFunding
68
+ */
69
+ end_timestamp?: number;
58
70
  }
59
71
 
60
72
 
@@ -94,6 +106,8 @@ export function ReqGetPositionFundingFromJSONTyped(json: any, ignoreDiscriminato
94
106
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
95
107
  'limit': json['limit'],
96
108
  'side': json['side'] == null ? undefined : json['side'],
109
+ 'start_timestamp': json['start_timestamp'] == null ? undefined : json['start_timestamp'],
110
+ 'end_timestamp': json['end_timestamp'] == null ? undefined : json['end_timestamp'],
97
111
  };
98
112
  }
99
113
 
@@ -109,6 +123,8 @@ export function ReqGetPositionFundingToJSON(value?: ReqGetPositionFunding | null
109
123
  'cursor': value['cursor'],
110
124
  'limit': value['limit'],
111
125
  'side': value['side'],
126
+ 'start_timestamp': value['start_timestamp'],
127
+ 'end_timestamp': value['end_timestamp'],
112
128
  };
113
129
  }
114
130
 
@@ -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
  {
@@ -2914,6 +2915,20 @@
2914
2915
  "all"
2915
2916
  ],
2916
2917
  "default": "all"
2918
+ },
2919
+ {
2920
+ "name": "start_timestamp",
2921
+ "in": "query",
2922
+ "required": false,
2923
+ "type": "integer",
2924
+ "format": "int64"
2925
+ },
2926
+ {
2927
+ "name": "end_timestamp",
2928
+ "in": "query",
2929
+ "required": false,
2930
+ "type": "integer",
2931
+ "format": "int64"
2917
2932
  }
2918
2933
  ],
2919
2934
  "tags": [
@@ -3972,6 +3987,41 @@
3972
3987
  "description": "Set maker-only API key indexes"
3973
3988
  }
3974
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
+ },
3975
4025
  "/api/v1/systemConfig": {
3976
4026
  "get": {
3977
4027
  "summary": "systemConfig",
@@ -10375,7 +10425,8 @@
10375
10425
  "account_count",
10376
10426
  "active_account_count",
10377
10427
  "tps",
10378
- "buyback"
10428
+ "buyback",
10429
+ "buyback_usdc"
10379
10430
  ]
10380
10431
  },
10381
10432
  "filter": {
@@ -10784,6 +10835,14 @@
10784
10835
  "all"
10785
10836
  ],
10786
10837
  "default": "all"
10838
+ },
10839
+ "start_timestamp": {
10840
+ "type": "integer",
10841
+ "format": "int64"
10842
+ },
10843
+ "end_timestamp": {
10844
+ "type": "integer",
10845
+ "format": "int64"
10787
10846
  }
10788
10847
  },
10789
10848
  "title": "ReqGetPositionFunding",
@@ -10978,6 +11037,18 @@
10978
11037
  "account_index"
10979
11038
  ]
10980
11039
  },
11040
+ "ReqGetSyntheticSpotInfo": {
11041
+ "type": "object",
11042
+ "properties": {
11043
+ "symbol": {
11044
+ "type": "string"
11045
+ }
11046
+ },
11047
+ "title": "ReqGetSyntheticSpotInfo",
11048
+ "required": [
11049
+ "symbol"
11050
+ ]
11051
+ },
10981
11052
  "ReqGetTrades": {
10982
11053
  "type": "object",
10983
11054
  "properties": {
@@ -12380,6 +12451,46 @@
12380
12451
  "code"
12381
12452
  ]
12382
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
+ },
12383
12494
  "RespUpdateKickback": {
12384
12495
  "type": "object",
12385
12496
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.252",
3
+ "version": "1.0.254",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {