zklighter-perps 1.0.258 → 1.0.260
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/.circleci/openapi_postprocess.py +2 -0
- package/.openapi-generator/FILES +3 -0
- package/apis/AccountApi.ts +137 -0
- package/apis/InfoApi.ts +46 -0
- package/apis/NotificationApi.ts +6 -8
- package/models/ReqGetRollingInfo.ts +61 -0
- package/models/RespRollingInfo.ts +129 -0
- package/models/RollingContractResp.ts +79 -0
- package/models/index.ts +3 -0
- package/openapi.json +227 -1
- package/package.json +1 -1
|
@@ -47,6 +47,8 @@ with open(FILE, "r") as f:
|
|
|
47
47
|
return {"type": "integer", "format": "int64"}
|
|
48
48
|
if obj.get("$ref") == "#/definitions/mapint16string":
|
|
49
49
|
return {"type": "object", "additionalProperties": {"type": "string"}}
|
|
50
|
+
if obj.get("$ref") == "#/definitions/mapstringfloat64":
|
|
51
|
+
return {"type": "object", "additionalProperties": {"type": "number", "format": "double"}}
|
|
50
52
|
return {k: replace_int16_refs(v) for k, v in obj.items()}
|
|
51
53
|
if isinstance(obj, list):
|
|
52
54
|
return [replace_int16_refs(i) for i in obj]
|
package/.openapi-generator/FILES
CHANGED
|
@@ -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
|
package/apis/AccountApi.ts
CHANGED
|
@@ -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
|
package/apis/NotificationApi.ts
CHANGED
|
@@ -23,9 +23,10 @@ import {
|
|
|
23
23
|
} from '../models/index';
|
|
24
24
|
|
|
25
25
|
export interface NotificationAckRequest {
|
|
26
|
-
notif_id: string;
|
|
27
26
|
account_index: number;
|
|
28
27
|
authorization?: string;
|
|
28
|
+
notif_id?: string;
|
|
29
|
+
ack_all?: boolean;
|
|
29
30
|
auth?: string;
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -39,13 +40,6 @@ export class NotificationApi extends runtime.BaseAPI {
|
|
|
39
40
|
* notification_ack
|
|
40
41
|
*/
|
|
41
42
|
async notificationAckRaw(requestParameters: NotificationAckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
42
|
-
if (requestParameters['notif_id'] == null) {
|
|
43
|
-
throw new runtime.RequiredError(
|
|
44
|
-
'notif_id',
|
|
45
|
-
'Required parameter "notif_id" was null or undefined when calling notificationAck().'
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
43
|
if (requestParameters['account_index'] == null) {
|
|
50
44
|
throw new runtime.RequiredError(
|
|
51
45
|
'account_index',
|
|
@@ -79,6 +73,10 @@ export class NotificationApi extends runtime.BaseAPI {
|
|
|
79
73
|
formParams.append('notif_id', requestParameters['notif_id'] as any);
|
|
80
74
|
}
|
|
81
75
|
|
|
76
|
+
if (requestParameters['ack_all'] != null) {
|
|
77
|
+
formParams.append('ack_all', requestParameters['ack_all'] as any);
|
|
78
|
+
}
|
|
79
|
+
|
|
82
80
|
if (requestParameters['auth'] != null) {
|
|
83
81
|
formParams.append('auth', requestParameters['auth'] as any);
|
|
84
82
|
}
|
|
@@ -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,129 @@
|
|
|
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 { RollingContractResp } from './RollingContractResp';
|
|
17
|
+
import {
|
|
18
|
+
RollingContractRespFromJSON,
|
|
19
|
+
RollingContractRespFromJSONTyped,
|
|
20
|
+
RollingContractRespToJSON,
|
|
21
|
+
} from './RollingContractResp';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespRollingInfo
|
|
27
|
+
*/
|
|
28
|
+
export interface RespRollingInfo {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespRollingInfo
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespRollingInfo
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof RespRollingInfo
|
|
45
|
+
*/
|
|
46
|
+
symbol: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {RollingContractResp}
|
|
50
|
+
* @memberof RespRollingInfo
|
|
51
|
+
*/
|
|
52
|
+
current: RollingContractResp;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {RollingContractResp}
|
|
56
|
+
* @memberof RespRollingInfo
|
|
57
|
+
*/
|
|
58
|
+
next?: RollingContractResp;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Array<number>}
|
|
62
|
+
* @memberof RespRollingInfo
|
|
63
|
+
*/
|
|
64
|
+
roll_times_ms: Array<number>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof RespRollingInfo
|
|
69
|
+
*/
|
|
70
|
+
estimated_roll_increase: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {{ [key: string]: number; }}
|
|
74
|
+
* @memberof RespRollingInfo
|
|
75
|
+
*/
|
|
76
|
+
estimated_fundings: { [key: string]: number; };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the RespRollingInfo interface.
|
|
81
|
+
*/
|
|
82
|
+
export function instanceOfRespRollingInfo(value: object): value is RespRollingInfo {
|
|
83
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
84
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
85
|
+
if (!('current' in value) || value['current'] === undefined) return false;
|
|
86
|
+
if (!('roll_times_ms' in value) || value['roll_times_ms'] === undefined) return false;
|
|
87
|
+
if (!('estimated_roll_increase' in value) || value['estimated_roll_increase'] === undefined) return false;
|
|
88
|
+
if (!('estimated_fundings' in value) || value['estimated_fundings'] === undefined) return false;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function RespRollingInfoFromJSON(json: any): RespRollingInfo {
|
|
93
|
+
return RespRollingInfoFromJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function RespRollingInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespRollingInfo {
|
|
97
|
+
if (json == null) {
|
|
98
|
+
return json;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'code': json['code'],
|
|
103
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
104
|
+
'symbol': json['symbol'],
|
|
105
|
+
'current': RollingContractRespFromJSON(json['current']),
|
|
106
|
+
'next': json['next'] == null ? undefined : RollingContractRespFromJSON(json['next']),
|
|
107
|
+
'roll_times_ms': json['roll_times_ms'],
|
|
108
|
+
'estimated_roll_increase': json['estimated_roll_increase'],
|
|
109
|
+
'estimated_fundings': json['estimated_fundings'],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function RespRollingInfoToJSON(value?: RespRollingInfo | null): any {
|
|
114
|
+
if (value == null) {
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
|
|
119
|
+
'code': value['code'],
|
|
120
|
+
'message': value['message'],
|
|
121
|
+
'symbol': value['symbol'],
|
|
122
|
+
'current': RollingContractRespToJSON(value['current']),
|
|
123
|
+
'next': RollingContractRespToJSON(value['next']),
|
|
124
|
+
'roll_times_ms': value['roll_times_ms'],
|
|
125
|
+
'estimated_roll_increase': value['estimated_roll_increase'],
|
|
126
|
+
'estimated_fundings': value['estimated_fundings'],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
@@ -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",
|
|
@@ -9805,6 +9945,11 @@
|
|
|
9805
9945
|
"type": "string",
|
|
9806
9946
|
"example": "'liq:17:5898'"
|
|
9807
9947
|
},
|
|
9948
|
+
"ack_all": {
|
|
9949
|
+
"type": "boolean",
|
|
9950
|
+
"format": "boolean",
|
|
9951
|
+
"default": "false"
|
|
9952
|
+
},
|
|
9808
9953
|
"auth": {
|
|
9809
9954
|
"type": "string",
|
|
9810
9955
|
"description": " made optional to support header auth clients"
|
|
@@ -9816,7 +9961,6 @@
|
|
|
9816
9961
|
},
|
|
9817
9962
|
"title": "ReqAckNotif",
|
|
9818
9963
|
"required": [
|
|
9819
|
-
"notif_id",
|
|
9820
9964
|
"account_index"
|
|
9821
9965
|
]
|
|
9822
9966
|
},
|
|
@@ -11255,6 +11399,18 @@
|
|
|
11255
11399
|
"account_index"
|
|
11256
11400
|
]
|
|
11257
11401
|
},
|
|
11402
|
+
"ReqGetRollingInfo": {
|
|
11403
|
+
"type": "object",
|
|
11404
|
+
"properties": {
|
|
11405
|
+
"symbol": {
|
|
11406
|
+
"type": "string"
|
|
11407
|
+
}
|
|
11408
|
+
},
|
|
11409
|
+
"title": "ReqGetRollingInfo",
|
|
11410
|
+
"required": [
|
|
11411
|
+
"symbol"
|
|
11412
|
+
]
|
|
11413
|
+
},
|
|
11258
11414
|
"ReqGetSyntheticSpotInfo": {
|
|
11259
11415
|
"type": "object",
|
|
11260
11416
|
"properties": {
|
|
@@ -12588,6 +12744,55 @@
|
|
|
12588
12744
|
"revoked"
|
|
12589
12745
|
]
|
|
12590
12746
|
},
|
|
12747
|
+
"RespRollingInfo": {
|
|
12748
|
+
"type": "object",
|
|
12749
|
+
"properties": {
|
|
12750
|
+
"code": {
|
|
12751
|
+
"type": "integer",
|
|
12752
|
+
"format": "int32",
|
|
12753
|
+
"example": "200"
|
|
12754
|
+
},
|
|
12755
|
+
"message": {
|
|
12756
|
+
"type": "string"
|
|
12757
|
+
},
|
|
12758
|
+
"symbol": {
|
|
12759
|
+
"type": "string"
|
|
12760
|
+
},
|
|
12761
|
+
"current": {
|
|
12762
|
+
"$ref": "#/definitions/RollingContractResp"
|
|
12763
|
+
},
|
|
12764
|
+
"next": {
|
|
12765
|
+
"$ref": "#/definitions/RollingContractResp"
|
|
12766
|
+
},
|
|
12767
|
+
"roll_times_ms": {
|
|
12768
|
+
"type": "array",
|
|
12769
|
+
"items": {
|
|
12770
|
+
"type": "integer",
|
|
12771
|
+
"format": "int64"
|
|
12772
|
+
}
|
|
12773
|
+
},
|
|
12774
|
+
"estimated_roll_increase": {
|
|
12775
|
+
"type": "number",
|
|
12776
|
+
"format": "double"
|
|
12777
|
+
},
|
|
12778
|
+
"estimated_fundings": {
|
|
12779
|
+
"type": "object",
|
|
12780
|
+
"additionalProperties": {
|
|
12781
|
+
"type": "number",
|
|
12782
|
+
"format": "double"
|
|
12783
|
+
}
|
|
12784
|
+
}
|
|
12785
|
+
},
|
|
12786
|
+
"title": "RespRollingInfo",
|
|
12787
|
+
"required": [
|
|
12788
|
+
"code",
|
|
12789
|
+
"symbol",
|
|
12790
|
+
"current",
|
|
12791
|
+
"roll_times_ms",
|
|
12792
|
+
"estimated_roll_increase",
|
|
12793
|
+
"estimated_fundings"
|
|
12794
|
+
]
|
|
12795
|
+
},
|
|
12591
12796
|
"RespSendTx": {
|
|
12592
12797
|
"type": "object",
|
|
12593
12798
|
"properties": {
|
|
@@ -12930,6 +13135,27 @@
|
|
|
12930
13135
|
"usdc_portfolio_value"
|
|
12931
13136
|
]
|
|
12932
13137
|
},
|
|
13138
|
+
"RollingContractResp": {
|
|
13139
|
+
"type": "object",
|
|
13140
|
+
"properties": {
|
|
13141
|
+
"weight": {
|
|
13142
|
+
"type": "number",
|
|
13143
|
+
"format": "double"
|
|
13144
|
+
},
|
|
13145
|
+
"symbol": {
|
|
13146
|
+
"type": "string"
|
|
13147
|
+
},
|
|
13148
|
+
"platform": {
|
|
13149
|
+
"type": "string"
|
|
13150
|
+
}
|
|
13151
|
+
},
|
|
13152
|
+
"title": "RollingContractResp",
|
|
13153
|
+
"required": [
|
|
13154
|
+
"weight",
|
|
13155
|
+
"symbol",
|
|
13156
|
+
"platform"
|
|
13157
|
+
]
|
|
13158
|
+
},
|
|
12933
13159
|
"SharePrice": {
|
|
12934
13160
|
"type": "object",
|
|
12935
13161
|
"properties": {
|