zklighter-perps 1.0.64 → 1.0.66
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/apis/CandlestickApi.ts +5 -0
- package/models/AccountPosition.ts +17 -8
- package/models/OrderBookDetail.ts +13 -4
- package/models/ReqGetCandlesticks.ts +8 -0
- package/openapi.json +31 -7
- package/package.json +1 -1
package/apis/CandlestickApi.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface CandlesticksRequest {
|
|
|
34
34
|
start_timestamp: number;
|
|
35
35
|
end_timestamp: number;
|
|
36
36
|
count_back: number;
|
|
37
|
+
set_timestamp_to_end?: boolean;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export interface FundingsRequest {
|
|
@@ -111,6 +112,10 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
111
112
|
queryParameters['count_back'] = requestParameters['count_back'];
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
if (requestParameters['set_timestamp_to_end'] != null) {
|
|
116
|
+
queryParameters['set_timestamp_to_end'] = requestParameters['set_timestamp_to_end'];
|
|
117
|
+
}
|
|
118
|
+
|
|
114
119
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
115
120
|
|
|
116
121
|
const response = await this.request({
|
|
@@ -27,22 +27,28 @@ export interface AccountPosition {
|
|
|
27
27
|
market_id: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
|
-
* @type {
|
|
30
|
+
* @type {string}
|
|
31
31
|
* @memberof AccountPosition
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
symbol: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AccountPosition
|
|
38
|
+
*/
|
|
39
|
+
initial_margin_fraction: string;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {number}
|
|
37
43
|
* @memberof AccountPosition
|
|
38
44
|
*/
|
|
39
|
-
|
|
45
|
+
open_order_count: number;
|
|
40
46
|
/**
|
|
41
47
|
*
|
|
42
|
-
* @type {
|
|
48
|
+
* @type {number}
|
|
43
49
|
* @memberof AccountPosition
|
|
44
50
|
*/
|
|
45
|
-
|
|
51
|
+
pending_order_count: number;
|
|
46
52
|
/**
|
|
47
53
|
*
|
|
48
54
|
* @type {number}
|
|
@@ -86,9 +92,10 @@ export interface AccountPosition {
|
|
|
86
92
|
*/
|
|
87
93
|
export function instanceOfAccountPosition(value: object): value is AccountPosition {
|
|
88
94
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
95
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
96
|
+
if (!('initial_margin_fraction' in value) || value['initial_margin_fraction'] === undefined) return false;
|
|
89
97
|
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
90
98
|
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
91
|
-
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
92
99
|
if (!('sign' in value) || value['sign'] === undefined) return false;
|
|
93
100
|
if (!('position' in value) || value['position'] === undefined) return false;
|
|
94
101
|
if (!('avg_entry_price' in value) || value['avg_entry_price'] === undefined) return false;
|
|
@@ -109,9 +116,10 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
109
116
|
return {
|
|
110
117
|
|
|
111
118
|
'market_id': json['market_id'],
|
|
119
|
+
'symbol': json['symbol'],
|
|
120
|
+
'initial_margin_fraction': json['initial_margin_fraction'],
|
|
112
121
|
'open_order_count': json['open_order_count'],
|
|
113
122
|
'pending_order_count': json['pending_order_count'],
|
|
114
|
-
'symbol': json['symbol'],
|
|
115
123
|
'sign': json['sign'],
|
|
116
124
|
'position': json['position'],
|
|
117
125
|
'avg_entry_price': json['avg_entry_price'],
|
|
@@ -128,9 +136,10 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
|
|
|
128
136
|
return {
|
|
129
137
|
|
|
130
138
|
'market_id': value['market_id'],
|
|
139
|
+
'symbol': value['symbol'],
|
|
140
|
+
'initial_margin_fraction': value['initial_margin_fraction'],
|
|
131
141
|
'open_order_count': value['open_order_count'],
|
|
132
142
|
'pending_order_count': value['pending_order_count'],
|
|
133
|
-
'symbol': value['symbol'],
|
|
134
143
|
'sign': value['sign'],
|
|
135
144
|
'position': value['position'],
|
|
136
145
|
'avg_entry_price': value['avg_entry_price'],
|
|
@@ -108,7 +108,13 @@ export interface OrderBookDetail {
|
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof OrderBookDetail
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
default_initial_margin_fraction: number;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {number}
|
|
115
|
+
* @memberof OrderBookDetail
|
|
116
|
+
*/
|
|
117
|
+
min_initial_margin_fraction: number;
|
|
112
118
|
/**
|
|
113
119
|
*
|
|
114
120
|
* @type {number}
|
|
@@ -206,7 +212,8 @@ export function instanceOfOrderBookDetail(value: object): value is OrderBookDeta
|
|
|
206
212
|
if (!('size_decimals' in value) || value['size_decimals'] === undefined) return false;
|
|
207
213
|
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
208
214
|
if (!('quote_multiplier' in value) || value['quote_multiplier'] === undefined) return false;
|
|
209
|
-
if (!('
|
|
215
|
+
if (!('default_initial_margin_fraction' in value) || value['default_initial_margin_fraction'] === undefined) return false;
|
|
216
|
+
if (!('min_initial_margin_fraction' in value) || value['min_initial_margin_fraction'] === undefined) return false;
|
|
210
217
|
if (!('maintenance_margin_fraction' in value) || value['maintenance_margin_fraction'] === undefined) return false;
|
|
211
218
|
if (!('closeout_margin_fraction' in value) || value['closeout_margin_fraction'] === undefined) return false;
|
|
212
219
|
if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
|
|
@@ -245,7 +252,8 @@ export function OrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
245
252
|
'size_decimals': json['size_decimals'],
|
|
246
253
|
'price_decimals': json['price_decimals'],
|
|
247
254
|
'quote_multiplier': json['quote_multiplier'],
|
|
248
|
-
'
|
|
255
|
+
'default_initial_margin_fraction': json['default_initial_margin_fraction'],
|
|
256
|
+
'min_initial_margin_fraction': json['min_initial_margin_fraction'],
|
|
249
257
|
'maintenance_margin_fraction': json['maintenance_margin_fraction'],
|
|
250
258
|
'closeout_margin_fraction': json['closeout_margin_fraction'],
|
|
251
259
|
'last_trade_price': json['last_trade_price'],
|
|
@@ -280,7 +288,8 @@ export function OrderBookDetailToJSON(value?: OrderBookDetail | null): any {
|
|
|
280
288
|
'size_decimals': value['size_decimals'],
|
|
281
289
|
'price_decimals': value['price_decimals'],
|
|
282
290
|
'quote_multiplier': value['quote_multiplier'],
|
|
283
|
-
'
|
|
291
|
+
'default_initial_margin_fraction': value['default_initial_margin_fraction'],
|
|
292
|
+
'min_initial_margin_fraction': value['min_initial_margin_fraction'],
|
|
284
293
|
'maintenance_margin_fraction': value['maintenance_margin_fraction'],
|
|
285
294
|
'closeout_margin_fraction': value['closeout_margin_fraction'],
|
|
286
295
|
'last_trade_price': value['last_trade_price'],
|
|
@@ -49,6 +49,12 @@ export interface ReqGetCandlesticks {
|
|
|
49
49
|
* @memberof ReqGetCandlesticks
|
|
50
50
|
*/
|
|
51
51
|
count_back: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof ReqGetCandlesticks
|
|
56
|
+
*/
|
|
57
|
+
set_timestamp_to_end?: boolean;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
|
|
@@ -93,6 +99,7 @@ export function ReqGetCandlesticksFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
93
99
|
'start_timestamp': json['start_timestamp'],
|
|
94
100
|
'end_timestamp': json['end_timestamp'],
|
|
95
101
|
'count_back': json['count_back'],
|
|
102
|
+
'set_timestamp_to_end': json['set_timestamp_to_end'] == null ? undefined : json['set_timestamp_to_end'],
|
|
96
103
|
};
|
|
97
104
|
}
|
|
98
105
|
|
|
@@ -107,6 +114,7 @@ export function ReqGetCandlesticksToJSON(value?: ReqGetCandlesticks | null): any
|
|
|
107
114
|
'start_timestamp': value['start_timestamp'],
|
|
108
115
|
'end_timestamp': value['end_timestamp'],
|
|
109
116
|
'count_back': value['count_back'],
|
|
117
|
+
'set_timestamp_to_end': value['set_timestamp_to_end'],
|
|
110
118
|
};
|
|
111
119
|
}
|
|
112
120
|
|
package/openapi.json
CHANGED
|
@@ -714,6 +714,14 @@
|
|
|
714
714
|
"required": true,
|
|
715
715
|
"type": "integer",
|
|
716
716
|
"format": "int64"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "set_timestamp_to_end",
|
|
720
|
+
"in": "query",
|
|
721
|
+
"required": false,
|
|
722
|
+
"type": "boolean",
|
|
723
|
+
"format": "boolean",
|
|
724
|
+
"default": "false"
|
|
717
725
|
}
|
|
718
726
|
],
|
|
719
727
|
"tags": [
|
|
@@ -1931,6 +1939,14 @@
|
|
|
1931
1939
|
"format": "uint8",
|
|
1932
1940
|
"example": "1"
|
|
1933
1941
|
},
|
|
1942
|
+
"symbol": {
|
|
1943
|
+
"type": "string",
|
|
1944
|
+
"example": "ETH"
|
|
1945
|
+
},
|
|
1946
|
+
"initial_margin_fraction": {
|
|
1947
|
+
"type": "string",
|
|
1948
|
+
"example": "20.00"
|
|
1949
|
+
},
|
|
1934
1950
|
"open_order_count": {
|
|
1935
1951
|
"type": "integer",
|
|
1936
1952
|
"format": "int64",
|
|
@@ -1941,10 +1957,6 @@
|
|
|
1941
1957
|
"format": "int64",
|
|
1942
1958
|
"example": "3"
|
|
1943
1959
|
},
|
|
1944
|
-
"symbol": {
|
|
1945
|
-
"type": "string",
|
|
1946
|
-
"example": "ETH"
|
|
1947
|
-
},
|
|
1948
1960
|
"sign": {
|
|
1949
1961
|
"type": "integer",
|
|
1950
1962
|
"format": "int32",
|
|
@@ -1974,9 +1986,10 @@
|
|
|
1974
1986
|
"title": "AccountPosition",
|
|
1975
1987
|
"required": [
|
|
1976
1988
|
"market_id",
|
|
1989
|
+
"symbol",
|
|
1990
|
+
"initial_margin_fraction",
|
|
1977
1991
|
"open_order_count",
|
|
1978
1992
|
"pending_order_count",
|
|
1979
|
-
"symbol",
|
|
1980
1993
|
"sign",
|
|
1981
1994
|
"position",
|
|
1982
1995
|
"avg_entry_price",
|
|
@@ -3409,7 +3422,12 @@
|
|
|
3409
3422
|
"format": "int64",
|
|
3410
3423
|
"example": "10000"
|
|
3411
3424
|
},
|
|
3412
|
-
"
|
|
3425
|
+
"default_initial_margin_fraction": {
|
|
3426
|
+
"type": "integer",
|
|
3427
|
+
"format": "uin16",
|
|
3428
|
+
"example": "100"
|
|
3429
|
+
},
|
|
3430
|
+
"min_initial_margin_fraction": {
|
|
3413
3431
|
"type": "integer",
|
|
3414
3432
|
"format": "uin16",
|
|
3415
3433
|
"example": "100"
|
|
@@ -3489,7 +3507,8 @@
|
|
|
3489
3507
|
"size_decimals",
|
|
3490
3508
|
"price_decimals",
|
|
3491
3509
|
"quote_multiplier",
|
|
3492
|
-
"
|
|
3510
|
+
"default_initial_margin_fraction",
|
|
3511
|
+
"min_initial_margin_fraction",
|
|
3493
3512
|
"maintenance_margin_fraction",
|
|
3494
3513
|
"closeout_margin_fraction",
|
|
3495
3514
|
"last_trade_price",
|
|
@@ -4245,6 +4264,11 @@
|
|
|
4245
4264
|
"count_back": {
|
|
4246
4265
|
"type": "integer",
|
|
4247
4266
|
"format": "int64"
|
|
4267
|
+
},
|
|
4268
|
+
"set_timestamp_to_end": {
|
|
4269
|
+
"type": "boolean",
|
|
4270
|
+
"format": "boolean",
|
|
4271
|
+
"default": "false"
|
|
4248
4272
|
}
|
|
4249
4273
|
},
|
|
4250
4274
|
"title": "ReqGetCandlesticks",
|