zklighter-perps 1.0.257 → 1.0.259

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.
@@ -168,6 +168,7 @@ models/ReqGetRangeWithIndexSortable.ts
168
168
  models/ReqGetRecentTrades.ts
169
169
  models/ReqGetReferralCode.ts
170
170
  models/ReqGetReferralPoints.ts
171
+ models/ReqGetRollingInfo.ts
171
172
  models/ReqGetSyntheticSpotInfo.ts
172
173
  models/ReqGetTrades.ts
173
174
  models/ReqGetTransferFeeInfo.ts
@@ -197,6 +198,7 @@ models/RespPostApiToken.ts
197
198
  models/RespPublicPoolsMetadata.ts
198
199
  models/RespRespondToRFQ.ts
199
200
  models/RespRevokeApiToken.ts
201
+ models/RespRollingInfo.ts
200
202
  models/RespSendTx.ts
201
203
  models/RespSendTxBatch.ts
202
204
  models/RespSetMakerOnlyApiKeys.ts
@@ -208,6 +210,7 @@ models/RespWithdrawalDelay.ts
208
210
  models/ResultCode.ts
209
211
  models/RiskInfo.ts
210
212
  models/RiskParameters.ts
213
+ models/RollingContractResp.ts
211
214
  models/SharePrice.ts
212
215
  models/SimpleOrder.ts
213
216
  models/SlippageResult.ts
@@ -158,6 +158,18 @@ export interface ChangeAccountTierRequest {
158
158
  auth?: string;
159
159
  }
160
160
 
161
+ export interface EquityHistoryPnlRequest {
162
+ by: EquityHistoryPnlByEnum;
163
+ value: string;
164
+ resolution: EquityHistoryPnlResolutionEnum;
165
+ start_timestamp: number;
166
+ end_timestamp: number;
167
+ count_back: number;
168
+ authorization?: string;
169
+ auth?: string;
170
+ ignore_transfers?: boolean;
171
+ }
172
+
161
173
  export interface FaucetRequest {
162
174
  l1_address: string;
163
175
  do_l1_transfer: boolean;
@@ -778,6 +790,112 @@ export class AccountApi extends runtime.BaseAPI {
778
790
  return await response.value();
779
791
  }
780
792
 
793
+ /**
794
+ * Shadow account PnL chart computed from equity_history
795
+ * equity_history_pnl
796
+ */
797
+ async equityHistoryPnlRaw(requestParameters: EquityHistoryPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountPnL>> {
798
+ if (requestParameters['by'] == null) {
799
+ throw new runtime.RequiredError(
800
+ 'by',
801
+ 'Required parameter "by" was null or undefined when calling equityHistoryPnl().'
802
+ );
803
+ }
804
+
805
+ if (requestParameters['value'] == null) {
806
+ throw new runtime.RequiredError(
807
+ 'value',
808
+ 'Required parameter "value" was null or undefined when calling equityHistoryPnl().'
809
+ );
810
+ }
811
+
812
+ if (requestParameters['resolution'] == null) {
813
+ throw new runtime.RequiredError(
814
+ 'resolution',
815
+ 'Required parameter "resolution" was null or undefined when calling equityHistoryPnl().'
816
+ );
817
+ }
818
+
819
+ if (requestParameters['start_timestamp'] == null) {
820
+ throw new runtime.RequiredError(
821
+ 'start_timestamp',
822
+ 'Required parameter "start_timestamp" was null or undefined when calling equityHistoryPnl().'
823
+ );
824
+ }
825
+
826
+ if (requestParameters['end_timestamp'] == null) {
827
+ throw new runtime.RequiredError(
828
+ 'end_timestamp',
829
+ 'Required parameter "end_timestamp" was null or undefined when calling equityHistoryPnl().'
830
+ );
831
+ }
832
+
833
+ if (requestParameters['count_back'] == null) {
834
+ throw new runtime.RequiredError(
835
+ 'count_back',
836
+ 'Required parameter "count_back" was null or undefined when calling equityHistoryPnl().'
837
+ );
838
+ }
839
+
840
+ const queryParameters: any = {};
841
+
842
+ if (requestParameters['authorization'] != null) {
843
+ queryParameters['authorization'] = requestParameters['authorization'];
844
+ }
845
+
846
+ if (requestParameters['auth'] != null) {
847
+ queryParameters['auth'] = requestParameters['auth'];
848
+ }
849
+
850
+ if (requestParameters['by'] != null) {
851
+ queryParameters['by'] = requestParameters['by'];
852
+ }
853
+
854
+ if (requestParameters['value'] != null) {
855
+ queryParameters['value'] = requestParameters['value'];
856
+ }
857
+
858
+ if (requestParameters['resolution'] != null) {
859
+ queryParameters['resolution'] = requestParameters['resolution'];
860
+ }
861
+
862
+ if (requestParameters['start_timestamp'] != null) {
863
+ queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
864
+ }
865
+
866
+ if (requestParameters['end_timestamp'] != null) {
867
+ queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
868
+ }
869
+
870
+ if (requestParameters['count_back'] != null) {
871
+ queryParameters['count_back'] = requestParameters['count_back'];
872
+ }
873
+
874
+ if (requestParameters['ignore_transfers'] != null) {
875
+ queryParameters['ignore_transfers'] = requestParameters['ignore_transfers'];
876
+ }
877
+
878
+ const headerParameters: runtime.HTTPHeaders = {};
879
+
880
+ const response = await this.request({
881
+ path: `/api/v1/equity_history/pnl`,
882
+ method: 'GET',
883
+ headers: headerParameters,
884
+ query: queryParameters,
885
+ }, initOverrides);
886
+
887
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountPnLFromJSON(jsonValue));
888
+ }
889
+
890
+ /**
891
+ * Shadow account PnL chart computed from equity_history
892
+ * equity_history_pnl
893
+ */
894
+ async equityHistoryPnl(requestParameters: EquityHistoryPnlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountPnL> {
895
+ const response = await this.equityHistoryPnlRaw(requestParameters, initOverrides);
896
+ return await response.value();
897
+ }
898
+
781
899
  /**
782
900
  * Request funds from faucet
783
901
  * faucet
@@ -2170,6 +2288,25 @@ export const AccountMetadataByEnum = {
2170
2288
  L1Address: 'l1_address'
2171
2289
  } as const;
2172
2290
  export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof AccountMetadataByEnum];
2291
+ /**
2292
+ * @export
2293
+ */
2294
+ export const EquityHistoryPnlByEnum = {
2295
+ Index: 'index'
2296
+ } as const;
2297
+ export type EquityHistoryPnlByEnum = typeof EquityHistoryPnlByEnum[keyof typeof EquityHistoryPnlByEnum];
2298
+ /**
2299
+ * @export
2300
+ */
2301
+ export const EquityHistoryPnlResolutionEnum = {
2302
+ _1m: '1m',
2303
+ _5m: '5m',
2304
+ _15m: '15m',
2305
+ _1h: '1h',
2306
+ _4h: '4h',
2307
+ _1d: '1d'
2308
+ } as const;
2309
+ export type EquityHistoryPnlResolutionEnum = typeof EquityHistoryPnlResolutionEnum[keyof typeof EquityHistoryPnlResolutionEnum];
2173
2310
  /**
2174
2311
  * @export
2175
2312
  */
package/apis/InfoApi.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  Layer1BasicInfo,
19
+ RespRollingInfo,
19
20
  RespSyntheticSpotInfo,
20
21
  RespWithdrawalDelay,
21
22
  ResultCode,
@@ -25,6 +26,8 @@ import type {
25
26
  import {
26
27
  Layer1BasicInfoFromJSON,
27
28
  Layer1BasicInfoToJSON,
29
+ RespRollingInfoFromJSON,
30
+ RespRollingInfoToJSON,
28
31
  RespSyntheticSpotInfoFromJSON,
29
32
  RespSyntheticSpotInfoToJSON,
30
33
  RespWithdrawalDelayFromJSON,
@@ -37,6 +40,10 @@ import {
37
40
  TransferFeeInfoToJSON,
38
41
  } from '../models/index';
39
42
 
43
+ export interface RollingInfoRequest {
44
+ symbol: string;
45
+ }
46
+
40
47
  export interface SyntheticSpotInfoRequest {
41
48
  symbol: string;
42
49
  }
@@ -81,6 +88,45 @@ export class InfoApi extends runtime.BaseAPI {
81
88
  return await response.value();
82
89
  }
83
90
 
91
+ /**
92
+ * Get rolling futures info for a symbol
93
+ * rollingInfo
94
+ */
95
+ async rollingInfoRaw(requestParameters: RollingInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespRollingInfo>> {
96
+ if (requestParameters['symbol'] == null) {
97
+ throw new runtime.RequiredError(
98
+ 'symbol',
99
+ 'Required parameter "symbol" was null or undefined when calling rollingInfo().'
100
+ );
101
+ }
102
+
103
+ const queryParameters: any = {};
104
+
105
+ if (requestParameters['symbol'] != null) {
106
+ queryParameters['symbol'] = requestParameters['symbol'];
107
+ }
108
+
109
+ const headerParameters: runtime.HTTPHeaders = {};
110
+
111
+ const response = await this.request({
112
+ path: `/api/v1/rollingInfo`,
113
+ method: 'GET',
114
+ headers: headerParameters,
115
+ query: queryParameters,
116
+ }, initOverrides);
117
+
118
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespRollingInfoFromJSON(jsonValue));
119
+ }
120
+
121
+ /**
122
+ * Get rolling futures info for a symbol
123
+ * rollingInfo
124
+ */
125
+ async rollingInfo(requestParameters: RollingInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespRollingInfo> {
126
+ const response = await this.rollingInfoRaw(requestParameters, initOverrides);
127
+ return await response.value();
128
+ }
129
+
84
130
  /**
85
131
  * Get synthetic spot info for a symbol
86
132
  * syntheticSpotInfo
@@ -37,6 +37,12 @@ export interface RFQMetadata {
37
37
  * @memberof RFQMetadata
38
38
  */
39
39
  requested_slippage: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RFQMetadata
44
+ */
45
+ mark_price: string;
40
46
  /**
41
47
  *
42
48
  * @type {string}
@@ -52,6 +58,7 @@ export function instanceOfRFQMetadata(value: object): value is RFQMetadata {
52
58
  if (!('requested_est_price' in value) || value['requested_est_price'] === undefined) return false;
53
59
  if (!('requested_max_slippage' in value) || value['requested_max_slippage'] === undefined) return false;
54
60
  if (!('requested_slippage' in value) || value['requested_slippage'] === undefined) return false;
61
+ if (!('mark_price' in value) || value['mark_price'] === undefined) return false;
55
62
  if (!('worst_price' in value) || value['worst_price'] === undefined) return false;
56
63
  return true;
57
64
  }
@@ -69,6 +76,7 @@ export function RFQMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean
69
76
  'requested_est_price': json['requested_est_price'],
70
77
  'requested_max_slippage': json['requested_max_slippage'],
71
78
  'requested_slippage': json['requested_slippage'],
79
+ 'mark_price': json['mark_price'],
72
80
  'worst_price': json['worst_price'],
73
81
  };
74
82
  }
@@ -82,6 +90,7 @@ export function RFQMetadataToJSON(value?: RFQMetadata | null): any {
82
90
  'requested_est_price': value['requested_est_price'],
83
91
  'requested_max_slippage': value['requested_max_slippage'],
84
92
  'requested_slippage': value['requested_slippage'],
93
+ 'mark_price': value['mark_price'],
85
94
  'worst_price': value['worst_price'],
86
95
  };
87
96
  }
@@ -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 ReqGetRollingInfo
20
+ */
21
+ export interface ReqGetRollingInfo {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetRollingInfo
26
+ */
27
+ symbol: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ReqGetRollingInfo interface.
32
+ */
33
+ export function instanceOfReqGetRollingInfo(value: object): value is ReqGetRollingInfo {
34
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ReqGetRollingInfoFromJSON(json: any): ReqGetRollingInfo {
39
+ return ReqGetRollingInfoFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ReqGetRollingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetRollingInfo {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'symbol': json['symbol'],
49
+ };
50
+ }
51
+
52
+ export function ReqGetRollingInfoToJSON(value?: ReqGetRollingInfo | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'symbol': value['symbol'],
59
+ };
60
+ }
61
+
@@ -0,0 +1,135 @@
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
+ import type { Mapstringfloat64 } from './Mapstringfloat64';
17
+ import {
18
+ Mapstringfloat64FromJSON,
19
+ Mapstringfloat64FromJSONTyped,
20
+ Mapstringfloat64ToJSON,
21
+ } from './Mapstringfloat64';
22
+ import type { RollingContractResp } from './RollingContractResp';
23
+ import {
24
+ RollingContractRespFromJSON,
25
+ RollingContractRespFromJSONTyped,
26
+ RollingContractRespToJSON,
27
+ } from './RollingContractResp';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface RespRollingInfo
33
+ */
34
+ export interface RespRollingInfo {
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof RespRollingInfo
39
+ */
40
+ code: number;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof RespRollingInfo
45
+ */
46
+ message?: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof RespRollingInfo
51
+ */
52
+ symbol: string;
53
+ /**
54
+ *
55
+ * @type {RollingContractResp}
56
+ * @memberof RespRollingInfo
57
+ */
58
+ current: RollingContractResp;
59
+ /**
60
+ *
61
+ * @type {RollingContractResp}
62
+ * @memberof RespRollingInfo
63
+ */
64
+ next?: RollingContractResp;
65
+ /**
66
+ *
67
+ * @type {Array<number>}
68
+ * @memberof RespRollingInfo
69
+ */
70
+ roll_times_ms: Array<number>;
71
+ /**
72
+ *
73
+ * @type {number}
74
+ * @memberof RespRollingInfo
75
+ */
76
+ estimated_roll_increase: number;
77
+ /**
78
+ *
79
+ * @type {Mapstringfloat64}
80
+ * @memberof RespRollingInfo
81
+ */
82
+ estimated_fundings: Mapstringfloat64;
83
+ }
84
+
85
+ /**
86
+ * Check if a given object implements the RespRollingInfo interface.
87
+ */
88
+ export function instanceOfRespRollingInfo(value: object): value is RespRollingInfo {
89
+ if (!('code' in value) || value['code'] === undefined) return false;
90
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
91
+ if (!('current' in value) || value['current'] === undefined) return false;
92
+ if (!('roll_times_ms' in value) || value['roll_times_ms'] === undefined) return false;
93
+ if (!('estimated_roll_increase' in value) || value['estimated_roll_increase'] === undefined) return false;
94
+ if (!('estimated_fundings' in value) || value['estimated_fundings'] === undefined) return false;
95
+ return true;
96
+ }
97
+
98
+ export function RespRollingInfoFromJSON(json: any): RespRollingInfo {
99
+ return RespRollingInfoFromJSONTyped(json, false);
100
+ }
101
+
102
+ export function RespRollingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespRollingInfo {
103
+ if (json == null) {
104
+ return json;
105
+ }
106
+ return {
107
+
108
+ 'code': json['code'],
109
+ 'message': json['message'] == null ? undefined : json['message'],
110
+ 'symbol': json['symbol'],
111
+ 'current': RollingContractRespFromJSON(json['current']),
112
+ 'next': json['next'] == null ? undefined : RollingContractRespFromJSON(json['next']),
113
+ 'roll_times_ms': json['roll_times_ms'],
114
+ 'estimated_roll_increase': json['estimated_roll_increase'],
115
+ 'estimated_fundings': Mapstringfloat64FromJSON(json['estimated_fundings']),
116
+ };
117
+ }
118
+
119
+ export function RespRollingInfoToJSON(value?: RespRollingInfo | null): any {
120
+ if (value == null) {
121
+ return value;
122
+ }
123
+ return {
124
+
125
+ 'code': value['code'],
126
+ 'message': value['message'],
127
+ 'symbol': value['symbol'],
128
+ 'current': RollingContractRespToJSON(value['current']),
129
+ 'next': RollingContractRespToJSON(value['next']),
130
+ 'roll_times_ms': value['roll_times_ms'],
131
+ 'estimated_roll_increase': value['estimated_roll_increase'],
132
+ 'estimated_fundings': Mapstringfloat64ToJSON(value['estimated_fundings']),
133
+ };
134
+ }
135
+
@@ -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 RollingContractResp
20
+ */
21
+ export interface RollingContractResp {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof RollingContractResp
26
+ */
27
+ weight: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RollingContractResp
32
+ */
33
+ symbol: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof RollingContractResp
38
+ */
39
+ platform: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the RollingContractResp interface.
44
+ */
45
+ export function instanceOfRollingContractResp(value: object): value is RollingContractResp {
46
+ if (!('weight' in value) || value['weight'] === undefined) return false;
47
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
48
+ if (!('platform' in value) || value['platform'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function RollingContractRespFromJSON(json: any): RollingContractResp {
53
+ return RollingContractRespFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function RollingContractRespFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollingContractResp {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'weight': json['weight'],
63
+ 'symbol': json['symbol'],
64
+ 'platform': json['platform'],
65
+ };
66
+ }
67
+
68
+ export function RollingContractRespToJSON(value?: RollingContractResp | null): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+
74
+ 'weight': value['weight'],
75
+ 'symbol': value['symbol'],
76
+ 'platform': value['platform'],
77
+ };
78
+ }
79
+
package/models/index.ts CHANGED
@@ -152,6 +152,7 @@ export * from './ReqGetRangeWithIndexSortable';
152
152
  export * from './ReqGetRecentTrades';
153
153
  export * from './ReqGetReferralCode';
154
154
  export * from './ReqGetReferralPoints';
155
+ export * from './ReqGetRollingInfo';
155
156
  export * from './ReqGetSyntheticSpotInfo';
156
157
  export * from './ReqGetTrades';
157
158
  export * from './ReqGetTransferFeeInfo';
@@ -181,6 +182,7 @@ export * from './RespPostApiToken';
181
182
  export * from './RespPublicPoolsMetadata';
182
183
  export * from './RespRespondToRFQ';
183
184
  export * from './RespRevokeApiToken';
185
+ export * from './RespRollingInfo';
184
186
  export * from './RespSendTx';
185
187
  export * from './RespSendTxBatch';
186
188
  export * from './RespSetMakerOnlyApiKeys';
@@ -192,6 +194,7 @@ export * from './RespWithdrawalDelay';
192
194
  export * from './ResultCode';
193
195
  export * from './RiskInfo';
194
196
  export * from './RiskParameters';
197
+ export * from './RollingContractResp';
195
198
  export * from './SharePrice';
196
199
  export * from './SimpleOrder';
197
200
  export * from './SlippageResult';
package/openapi.json CHANGED
@@ -1326,6 +1326,111 @@
1326
1326
  "description": "Get deposit supporting networks"
1327
1327
  }
1328
1328
  },
1329
+ "/api/v1/equity_history/pnl": {
1330
+ "get": {
1331
+ "summary": "equity_history_pnl",
1332
+ "operationId": "equity_history_pnl",
1333
+ "responses": {
1334
+ "200": {
1335
+ "description": "A successful response.",
1336
+ "schema": {
1337
+ "$ref": "#/definitions/AccountPnL"
1338
+ }
1339
+ },
1340
+ "400": {
1341
+ "description": "Bad request",
1342
+ "schema": {
1343
+ "$ref": "#/definitions/ResultCode"
1344
+ }
1345
+ }
1346
+ },
1347
+ "parameters": [
1348
+ {
1349
+ "name": "authorization",
1350
+ "description": " make required after integ is done",
1351
+ "in": "query",
1352
+ "required": false,
1353
+ "type": "string"
1354
+ },
1355
+ {
1356
+ "name": "auth",
1357
+ "description": " made optional to support header auth clients",
1358
+ "in": "query",
1359
+ "required": false,
1360
+ "type": "string"
1361
+ },
1362
+ {
1363
+ "name": "by",
1364
+ "in": "query",
1365
+ "required": true,
1366
+ "type": "string",
1367
+ "enum": [
1368
+ "index"
1369
+ ]
1370
+ },
1371
+ {
1372
+ "name": "value",
1373
+ "in": "query",
1374
+ "required": true,
1375
+ "type": "string"
1376
+ },
1377
+ {
1378
+ "name": "resolution",
1379
+ "in": "query",
1380
+ "required": true,
1381
+ "type": "string",
1382
+ "enum": [
1383
+ "1m",
1384
+ "5m",
1385
+ "15m",
1386
+ "1h",
1387
+ "4h",
1388
+ "1d"
1389
+ ]
1390
+ },
1391
+ {
1392
+ "name": "start_timestamp",
1393
+ "in": "query",
1394
+ "required": true,
1395
+ "type": "integer",
1396
+ "format": "int64",
1397
+ "minimum": 0,
1398
+ "maximum": 5000000000000
1399
+ },
1400
+ {
1401
+ "name": "end_timestamp",
1402
+ "in": "query",
1403
+ "required": true,
1404
+ "type": "integer",
1405
+ "format": "int64",
1406
+ "minimum": 0,
1407
+ "maximum": 5000000000000
1408
+ },
1409
+ {
1410
+ "name": "count_back",
1411
+ "in": "query",
1412
+ "required": true,
1413
+ "type": "integer",
1414
+ "format": "int64"
1415
+ },
1416
+ {
1417
+ "name": "ignore_transfers",
1418
+ "in": "query",
1419
+ "required": false,
1420
+ "type": "boolean",
1421
+ "format": "boolean",
1422
+ "default": "false"
1423
+ }
1424
+ ],
1425
+ "tags": [
1426
+ "account"
1427
+ ],
1428
+ "consumes": [
1429
+ "multipart/form-data"
1430
+ ],
1431
+ "description": "Shadow account PnL chart computed from equity_history"
1432
+ }
1433
+ },
1329
1434
  "/api/v1/exchangeMetrics": {
1330
1435
  "get": {
1331
1436
  "summary": "exchangeMetrics",
@@ -3903,6 +4008,41 @@
3903
4008
  "description": "Update RFQ status"
3904
4009
  }
3905
4010
  },
4011
+ "/api/v1/rollingInfo": {
4012
+ "get": {
4013
+ "summary": "rollingInfo",
4014
+ "operationId": "rollingInfo",
4015
+ "responses": {
4016
+ "200": {
4017
+ "description": "A successful response.",
4018
+ "schema": {
4019
+ "$ref": "#/definitions/RespRollingInfo"
4020
+ }
4021
+ },
4022
+ "400": {
4023
+ "description": "Bad request",
4024
+ "schema": {
4025
+ "$ref": "#/definitions/ResultCode"
4026
+ }
4027
+ }
4028
+ },
4029
+ "parameters": [
4030
+ {
4031
+ "name": "symbol",
4032
+ "in": "query",
4033
+ "required": true,
4034
+ "type": "string"
4035
+ }
4036
+ ],
4037
+ "tags": [
4038
+ "info"
4039
+ ],
4040
+ "consumes": [
4041
+ "multipart/form-data"
4042
+ ],
4043
+ "description": "Get rolling futures info for a symbol"
4044
+ }
4045
+ },
3906
4046
  "/api/v1/sendTx": {
3907
4047
  "post": {
3908
4048
  "summary": "sendTx",
@@ -9608,6 +9748,9 @@
9608
9748
  "requested_slippage": {
9609
9749
  "type": "string"
9610
9750
  },
9751
+ "mark_price": {
9752
+ "type": "string"
9753
+ },
9611
9754
  "worst_price": {
9612
9755
  "type": "string"
9613
9756
  }
@@ -9617,6 +9760,7 @@
9617
9760
  "requested_est_price",
9618
9761
  "requested_max_slippage",
9619
9762
  "requested_slippage",
9763
+ "mark_price",
9620
9764
  "worst_price"
9621
9765
  ]
9622
9766
  },
@@ -11251,6 +11395,18 @@
11251
11395
  "account_index"
11252
11396
  ]
11253
11397
  },
11398
+ "ReqGetRollingInfo": {
11399
+ "type": "object",
11400
+ "properties": {
11401
+ "symbol": {
11402
+ "type": "string"
11403
+ }
11404
+ },
11405
+ "title": "ReqGetRollingInfo",
11406
+ "required": [
11407
+ "symbol"
11408
+ ]
11409
+ },
11254
11410
  "ReqGetSyntheticSpotInfo": {
11255
11411
  "type": "object",
11256
11412
  "properties": {
@@ -12584,6 +12740,51 @@
12584
12740
  "revoked"
12585
12741
  ]
12586
12742
  },
12743
+ "RespRollingInfo": {
12744
+ "type": "object",
12745
+ "properties": {
12746
+ "code": {
12747
+ "type": "integer",
12748
+ "format": "int32",
12749
+ "example": "200"
12750
+ },
12751
+ "message": {
12752
+ "type": "string"
12753
+ },
12754
+ "symbol": {
12755
+ "type": "string"
12756
+ },
12757
+ "current": {
12758
+ "$ref": "#/definitions/RollingContractResp"
12759
+ },
12760
+ "next": {
12761
+ "$ref": "#/definitions/RollingContractResp"
12762
+ },
12763
+ "roll_times_ms": {
12764
+ "type": "array",
12765
+ "items": {
12766
+ "type": "integer",
12767
+ "format": "int64"
12768
+ }
12769
+ },
12770
+ "estimated_roll_increase": {
12771
+ "type": "number",
12772
+ "format": "double"
12773
+ },
12774
+ "estimated_fundings": {
12775
+ "$ref": "#/definitions/mapstringfloat64"
12776
+ }
12777
+ },
12778
+ "title": "RespRollingInfo",
12779
+ "required": [
12780
+ "code",
12781
+ "symbol",
12782
+ "current",
12783
+ "roll_times_ms",
12784
+ "estimated_roll_increase",
12785
+ "estimated_fundings"
12786
+ ]
12787
+ },
12587
12788
  "RespSendTx": {
12588
12789
  "type": "object",
12589
12790
  "properties": {
@@ -12926,6 +13127,27 @@
12926
13127
  "usdc_portfolio_value"
12927
13128
  ]
12928
13129
  },
13130
+ "RollingContractResp": {
13131
+ "type": "object",
13132
+ "properties": {
13133
+ "weight": {
13134
+ "type": "number",
13135
+ "format": "double"
13136
+ },
13137
+ "symbol": {
13138
+ "type": "string"
13139
+ },
13140
+ "platform": {
13141
+ "type": "string"
13142
+ }
13143
+ },
13144
+ "title": "RollingContractResp",
13145
+ "required": [
13146
+ "weight",
13147
+ "symbol",
13148
+ "platform"
13149
+ ]
13150
+ },
12929
13151
  "SharePrice": {
12930
13152
  "type": "object",
12931
13153
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.257",
3
+ "version": "1.0.259",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {