zklighter-perps 1.0.22 → 1.0.24
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/models/AccountPosition.ts +0 -9
- package/models/OrderBookDetail.ts +20 -20
- package/openapi.json +39 -44
- package/package.json +1 -1
|
@@ -31,12 +31,6 @@ export interface AccountPosition {
|
|
|
31
31
|
* @memberof AccountPosition
|
|
32
32
|
*/
|
|
33
33
|
ooc: number;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof AccountPosition
|
|
38
|
-
*/
|
|
39
|
-
name: string;
|
|
40
34
|
/**
|
|
41
35
|
*
|
|
42
36
|
* @type {string}
|
|
@@ -87,7 +81,6 @@ export interface AccountPosition {
|
|
|
87
81
|
export function instanceOfAccountPosition(value: object): value is AccountPosition {
|
|
88
82
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
89
83
|
if (!('ooc' in value) || value['ooc'] === undefined) return false;
|
|
90
|
-
if (!('name' in value) || value['name'] === undefined) return false;
|
|
91
84
|
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
92
85
|
if (!('sign' in value) || value['sign'] === undefined) return false;
|
|
93
86
|
if (!('position' in value) || value['position'] === undefined) return false;
|
|
@@ -110,7 +103,6 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
110
103
|
|
|
111
104
|
'market_id': json['market_id'],
|
|
112
105
|
'ooc': json['ooc'],
|
|
113
|
-
'name': json['name'],
|
|
114
106
|
'symbol': json['symbol'],
|
|
115
107
|
'sign': json['sign'],
|
|
116
108
|
'position': json['position'],
|
|
@@ -129,7 +121,6 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
|
|
|
129
121
|
|
|
130
122
|
'market_id': value['market_id'],
|
|
131
123
|
'ooc': value['ooc'],
|
|
132
|
-
'name': value['name'],
|
|
133
124
|
'symbol': value['symbol'],
|
|
134
125
|
'sign': value['sign'],
|
|
135
126
|
'position': value['position'],
|
|
@@ -90,13 +90,13 @@ export interface OrderBookDetail {
|
|
|
90
90
|
* @type {number}
|
|
91
91
|
* @memberof OrderBookDetail
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
size_decimals: number;
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
96
|
* @type {number}
|
|
97
97
|
* @memberof OrderBookDetail
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
price_decimals: number;
|
|
100
100
|
/**
|
|
101
101
|
*
|
|
102
102
|
* @type {number}
|
|
@@ -108,19 +108,19 @@ export interface OrderBookDetail {
|
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof OrderBookDetail
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
initial_margin_fraction: number;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {number}
|
|
115
115
|
* @memberof OrderBookDetail
|
|
116
116
|
*/
|
|
117
|
-
|
|
117
|
+
maintenance_margin_fraction: number;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {number}
|
|
121
121
|
* @memberof OrderBookDetail
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
closeout_margin_fraction: number;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
126
126
|
* @type {number}
|
|
@@ -210,12 +210,12 @@ export type OrderBookDetailStatusEnum = typeof OrderBookDetailStatusEnum[keyof t
|
|
|
210
210
|
* Check if a given object implements the OrderBookDetail interface.
|
|
211
211
|
*/
|
|
212
212
|
export function instanceOfOrderBookDetail(value: object): value is OrderBookDetail {
|
|
213
|
-
if (!('
|
|
214
|
-
if (!('
|
|
213
|
+
if (!('size_decimals' in value) || value['size_decimals'] === undefined) return false;
|
|
214
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
215
215
|
if (!('quote_multiplier' in value) || value['quote_multiplier'] === undefined) return false;
|
|
216
|
-
if (!('
|
|
217
|
-
if (!('
|
|
218
|
-
if (!('
|
|
216
|
+
if (!('initial_margin_fraction' in value) || value['initial_margin_fraction'] === undefined) return false;
|
|
217
|
+
if (!('maintenance_margin_fraction' in value) || value['maintenance_margin_fraction'] === undefined) return false;
|
|
218
|
+
if (!('closeout_margin_fraction' in value) || value['closeout_margin_fraction'] === undefined) return false;
|
|
219
219
|
if (!('ask_nonce' in value) || value['ask_nonce'] === undefined) return false;
|
|
220
220
|
if (!('bid_nonce' in value) || value['bid_nonce'] === undefined) return false;
|
|
221
221
|
if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
|
|
@@ -252,12 +252,12 @@ export function OrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
252
252
|
'supported_size_decimals': json['supported_size_decimals'] == null ? undefined : json['supported_size_decimals'],
|
|
253
253
|
'supported_price_decimals': json['supported_price_decimals'] == null ? undefined : json['supported_price_decimals'],
|
|
254
254
|
'supported_quote_decimals': json['supported_quote_decimals'] == null ? undefined : json['supported_quote_decimals'],
|
|
255
|
-
'
|
|
256
|
-
'
|
|
255
|
+
'size_decimals': json['size_decimals'],
|
|
256
|
+
'price_decimals': json['price_decimals'],
|
|
257
257
|
'quote_multiplier': json['quote_multiplier'],
|
|
258
|
-
'
|
|
259
|
-
'
|
|
260
|
-
'
|
|
258
|
+
'initial_margin_fraction': json['initial_margin_fraction'],
|
|
259
|
+
'maintenance_margin_fraction': json['maintenance_margin_fraction'],
|
|
260
|
+
'closeout_margin_fraction': json['closeout_margin_fraction'],
|
|
261
261
|
'ask_nonce': json['ask_nonce'],
|
|
262
262
|
'bid_nonce': json['bid_nonce'],
|
|
263
263
|
'last_trade_price': json['last_trade_price'],
|
|
@@ -290,12 +290,12 @@ export function OrderBookDetailToJSON(value?: OrderBookDetail | null): any {
|
|
|
290
290
|
'supported_size_decimals': value['supported_size_decimals'],
|
|
291
291
|
'supported_price_decimals': value['supported_price_decimals'],
|
|
292
292
|
'supported_quote_decimals': value['supported_quote_decimals'],
|
|
293
|
-
'
|
|
294
|
-
'
|
|
293
|
+
'size_decimals': value['size_decimals'],
|
|
294
|
+
'price_decimals': value['price_decimals'],
|
|
295
295
|
'quote_multiplier': value['quote_multiplier'],
|
|
296
|
-
'
|
|
297
|
-
'
|
|
298
|
-
'
|
|
296
|
+
'initial_margin_fraction': value['initial_margin_fraction'],
|
|
297
|
+
'maintenance_margin_fraction': value['maintenance_margin_fraction'],
|
|
298
|
+
'closeout_margin_fraction': value['closeout_margin_fraction'],
|
|
299
299
|
'ask_nonce': value['ask_nonce'],
|
|
300
300
|
'bid_nonce': value['bid_nonce'],
|
|
301
301
|
'last_trade_price': value['last_trade_price'],
|
package/openapi.json
CHANGED
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"in": "query",
|
|
116
116
|
"required": true,
|
|
117
117
|
"type": "integer",
|
|
118
|
-
"format": "
|
|
118
|
+
"format": "uint8"
|
|
119
119
|
}
|
|
120
120
|
],
|
|
121
121
|
"tags": [
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"in": "query",
|
|
169
169
|
"required": false,
|
|
170
170
|
"type": "integer",
|
|
171
|
-
"format": "
|
|
171
|
+
"format": "uint8"
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"name": "cursor",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"in": "query",
|
|
227
227
|
"required": true,
|
|
228
228
|
"type": "integer",
|
|
229
|
-
"format": "
|
|
229
|
+
"format": "uint8"
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"name": "cursor",
|
|
@@ -675,7 +675,7 @@
|
|
|
675
675
|
"in": "query",
|
|
676
676
|
"required": true,
|
|
677
677
|
"type": "integer",
|
|
678
|
-
"format": "
|
|
678
|
+
"format": "uint8"
|
|
679
679
|
},
|
|
680
680
|
{
|
|
681
681
|
"name": "resolution",
|
|
@@ -828,7 +828,7 @@
|
|
|
828
828
|
"in": "query",
|
|
829
829
|
"required": true,
|
|
830
830
|
"type": "integer",
|
|
831
|
-
"format": "
|
|
831
|
+
"format": "uint8"
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
"name": "resolution",
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
"in": "query",
|
|
1094
1094
|
"required": false,
|
|
1095
1095
|
"type": "integer",
|
|
1096
|
-
"format": "
|
|
1096
|
+
"format": "uint8"
|
|
1097
1097
|
}
|
|
1098
1098
|
],
|
|
1099
1099
|
"tags": [
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
"in": "query",
|
|
1130
1130
|
"required": true,
|
|
1131
1131
|
"type": "integer",
|
|
1132
|
-
"format": "
|
|
1132
|
+
"format": "uint8"
|
|
1133
1133
|
},
|
|
1134
1134
|
{
|
|
1135
1135
|
"name": "limit",
|
|
@@ -1184,7 +1184,7 @@
|
|
|
1184
1184
|
"in": "query",
|
|
1185
1185
|
"required": false,
|
|
1186
1186
|
"type": "integer",
|
|
1187
|
-
"format": "
|
|
1187
|
+
"format": "uint8"
|
|
1188
1188
|
}
|
|
1189
1189
|
],
|
|
1190
1190
|
"tags": [
|
|
@@ -1396,7 +1396,7 @@
|
|
|
1396
1396
|
"in": "query",
|
|
1397
1397
|
"required": true,
|
|
1398
1398
|
"type": "integer",
|
|
1399
|
-
"format": "
|
|
1399
|
+
"format": "uint8"
|
|
1400
1400
|
},
|
|
1401
1401
|
{
|
|
1402
1402
|
"name": "limit",
|
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
"in": "query",
|
|
1605
1605
|
"required": true,
|
|
1606
1606
|
"type": "integer",
|
|
1607
|
-
"format": "
|
|
1607
|
+
"format": "uint8"
|
|
1608
1608
|
},
|
|
1609
1609
|
{
|
|
1610
1610
|
"name": "order_index",
|
|
@@ -1861,7 +1861,7 @@
|
|
|
1861
1861
|
"properties": {
|
|
1862
1862
|
"market_id": {
|
|
1863
1863
|
"type": "integer",
|
|
1864
|
-
"format": "
|
|
1864
|
+
"format": "uint8",
|
|
1865
1865
|
"example": "1"
|
|
1866
1866
|
},
|
|
1867
1867
|
"daily_trades_count": {
|
|
@@ -1933,7 +1933,7 @@
|
|
|
1933
1933
|
"properties": {
|
|
1934
1934
|
"market_id": {
|
|
1935
1935
|
"type": "integer",
|
|
1936
|
-
"format": "
|
|
1936
|
+
"format": "uint8",
|
|
1937
1937
|
"example": "1"
|
|
1938
1938
|
},
|
|
1939
1939
|
"ooc": {
|
|
@@ -1941,10 +1941,6 @@
|
|
|
1941
1941
|
"format": "int64",
|
|
1942
1942
|
"example": "3"
|
|
1943
1943
|
},
|
|
1944
|
-
"name": {
|
|
1945
|
-
"type": "string",
|
|
1946
|
-
"example": "Ethereum"
|
|
1947
|
-
},
|
|
1948
1944
|
"symbol": {
|
|
1949
1945
|
"type": "string",
|
|
1950
1946
|
"example": "ETH"
|
|
@@ -1979,7 +1975,6 @@
|
|
|
1979
1975
|
"required": [
|
|
1980
1976
|
"market_id",
|
|
1981
1977
|
"ooc",
|
|
1982
|
-
"name",
|
|
1983
1978
|
"symbol",
|
|
1984
1979
|
"sign",
|
|
1985
1980
|
"position",
|
|
@@ -2754,7 +2749,7 @@
|
|
|
2754
2749
|
"properties": {
|
|
2755
2750
|
"market_id": {
|
|
2756
2751
|
"type": "integer",
|
|
2757
|
-
"format": "
|
|
2752
|
+
"format": "uint8",
|
|
2758
2753
|
"example": "1"
|
|
2759
2754
|
},
|
|
2760
2755
|
"index_price": {
|
|
@@ -2846,7 +2841,7 @@
|
|
|
2846
2841
|
"properties": {
|
|
2847
2842
|
"market_index": {
|
|
2848
2843
|
"type": "integer",
|
|
2849
|
-
"format": "
|
|
2844
|
+
"format": "uint8",
|
|
2850
2845
|
"example": "1"
|
|
2851
2846
|
},
|
|
2852
2847
|
"owner_account_index": {
|
|
@@ -2962,7 +2957,7 @@
|
|
|
2962
2957
|
},
|
|
2963
2958
|
"market_id": {
|
|
2964
2959
|
"type": "integer",
|
|
2965
|
-
"format": "
|
|
2960
|
+
"format": "uint8",
|
|
2966
2961
|
"example": "1"
|
|
2967
2962
|
},
|
|
2968
2963
|
"status": {
|
|
@@ -3069,7 +3064,7 @@
|
|
|
3069
3064
|
},
|
|
3070
3065
|
"market_id": {
|
|
3071
3066
|
"type": "integer",
|
|
3072
|
-
"format": "
|
|
3067
|
+
"format": "uint8",
|
|
3073
3068
|
"example": "1"
|
|
3074
3069
|
},
|
|
3075
3070
|
"status": {
|
|
@@ -3115,32 +3110,32 @@
|
|
|
3115
3110
|
"format": "int64",
|
|
3116
3111
|
"example": "4"
|
|
3117
3112
|
},
|
|
3118
|
-
"
|
|
3113
|
+
"size_decimals": {
|
|
3119
3114
|
"type": "integer",
|
|
3120
3115
|
"format": "uint8",
|
|
3121
3116
|
"example": "4"
|
|
3122
3117
|
},
|
|
3123
|
-
"
|
|
3118
|
+
"price_decimals": {
|
|
3124
3119
|
"type": "integer",
|
|
3125
|
-
"format": "
|
|
3126
|
-
"example": "
|
|
3120
|
+
"format": "uint8",
|
|
3121
|
+
"example": "4"
|
|
3127
3122
|
},
|
|
3128
3123
|
"quote_multiplier": {
|
|
3129
3124
|
"type": "integer",
|
|
3130
3125
|
"format": "int64",
|
|
3131
3126
|
"example": "10000"
|
|
3132
3127
|
},
|
|
3133
|
-
"
|
|
3128
|
+
"initial_margin_fraction": {
|
|
3134
3129
|
"type": "integer",
|
|
3135
3130
|
"format": "uin16",
|
|
3136
3131
|
"example": "100"
|
|
3137
3132
|
},
|
|
3138
|
-
"
|
|
3133
|
+
"maintenance_margin_fraction": {
|
|
3139
3134
|
"type": "integer",
|
|
3140
3135
|
"format": "uin16",
|
|
3141
3136
|
"example": "50"
|
|
3142
3137
|
},
|
|
3143
|
-
"
|
|
3138
|
+
"closeout_margin_fraction": {
|
|
3144
3139
|
"type": "integer",
|
|
3145
3140
|
"format": "uin16",
|
|
3146
3141
|
"example": "100"
|
|
@@ -3211,12 +3206,12 @@
|
|
|
3211
3206
|
},
|
|
3212
3207
|
"title": "OrderBookDetail",
|
|
3213
3208
|
"required": [
|
|
3214
|
-
"
|
|
3215
|
-
"
|
|
3209
|
+
"size_decimals",
|
|
3210
|
+
"price_decimals",
|
|
3216
3211
|
"quote_multiplier",
|
|
3217
|
-
"
|
|
3218
|
-
"
|
|
3219
|
-
"
|
|
3212
|
+
"initial_margin_fraction",
|
|
3213
|
+
"maintenance_margin_fraction",
|
|
3214
|
+
"closeout_margin_fraction",
|
|
3220
3215
|
"ask_nonce",
|
|
3221
3216
|
"bid_nonce",
|
|
3222
3217
|
"last_trade_price",
|
|
@@ -3489,7 +3484,7 @@
|
|
|
3489
3484
|
},
|
|
3490
3485
|
"market_id": {
|
|
3491
3486
|
"type": "integer",
|
|
3492
|
-
"format": "
|
|
3487
|
+
"format": "uint8"
|
|
3493
3488
|
}
|
|
3494
3489
|
},
|
|
3495
3490
|
"title": "ReqGetAccountActiveOrders",
|
|
@@ -3544,7 +3539,7 @@
|
|
|
3544
3539
|
},
|
|
3545
3540
|
"market_id": {
|
|
3546
3541
|
"type": "integer",
|
|
3547
|
-
"format": "
|
|
3542
|
+
"format": "uint8"
|
|
3548
3543
|
},
|
|
3549
3544
|
"cursor": {
|
|
3550
3545
|
"type": "string"
|
|
@@ -3572,7 +3567,7 @@
|
|
|
3572
3567
|
},
|
|
3573
3568
|
"market_id": {
|
|
3574
3569
|
"type": "integer",
|
|
3575
|
-
"format": "
|
|
3570
|
+
"format": "uint8"
|
|
3576
3571
|
},
|
|
3577
3572
|
"cursor": {
|
|
3578
3573
|
"type": "string"
|
|
@@ -3755,7 +3750,7 @@
|
|
|
3755
3750
|
"properties": {
|
|
3756
3751
|
"market_id": {
|
|
3757
3752
|
"type": "integer",
|
|
3758
|
-
"format": "
|
|
3753
|
+
"format": "uint8"
|
|
3759
3754
|
},
|
|
3760
3755
|
"resolution": {
|
|
3761
3756
|
"type": "string",
|
|
@@ -3799,7 +3794,7 @@
|
|
|
3799
3794
|
"properties": {
|
|
3800
3795
|
"market_id": {
|
|
3801
3796
|
"type": "integer",
|
|
3802
|
-
"format": "
|
|
3797
|
+
"format": "uint8"
|
|
3803
3798
|
},
|
|
3804
3799
|
"resolution": {
|
|
3805
3800
|
"type": "string",
|
|
@@ -3871,7 +3866,7 @@
|
|
|
3871
3866
|
},
|
|
3872
3867
|
"market_id": {
|
|
3873
3868
|
"type": "integer",
|
|
3874
|
-
"format": "
|
|
3869
|
+
"format": "uint8"
|
|
3875
3870
|
}
|
|
3876
3871
|
},
|
|
3877
3872
|
"title": "ReqGetOrderBookDetails",
|
|
@@ -3884,7 +3879,7 @@
|
|
|
3884
3879
|
"properties": {
|
|
3885
3880
|
"market_id": {
|
|
3886
3881
|
"type": "integer",
|
|
3887
|
-
"format": "
|
|
3882
|
+
"format": "uint8"
|
|
3888
3883
|
},
|
|
3889
3884
|
"limit": {
|
|
3890
3885
|
"type": "integer",
|
|
@@ -3911,7 +3906,7 @@
|
|
|
3911
3906
|
},
|
|
3912
3907
|
"market_id": {
|
|
3913
3908
|
"type": "integer",
|
|
3914
|
-
"format": "
|
|
3909
|
+
"format": "uint8"
|
|
3915
3910
|
}
|
|
3916
3911
|
},
|
|
3917
3912
|
"title": "ReqGetOrderBooks",
|
|
@@ -4010,7 +4005,7 @@
|
|
|
4010
4005
|
"properties": {
|
|
4011
4006
|
"market_id": {
|
|
4012
4007
|
"type": "integer",
|
|
4013
|
-
"format": "
|
|
4008
|
+
"format": "uint8"
|
|
4014
4009
|
},
|
|
4015
4010
|
"limit": {
|
|
4016
4011
|
"type": "integer",
|
|
@@ -4056,7 +4051,7 @@
|
|
|
4056
4051
|
"properties": {
|
|
4057
4052
|
"market_id": {
|
|
4058
4053
|
"type": "integer",
|
|
4059
|
-
"format": "
|
|
4054
|
+
"format": "uint8"
|
|
4060
4055
|
},
|
|
4061
4056
|
"order_index": {
|
|
4062
4057
|
"type": "integer",
|
|
@@ -4408,7 +4403,7 @@
|
|
|
4408
4403
|
},
|
|
4409
4404
|
"market_id": {
|
|
4410
4405
|
"type": "integer",
|
|
4411
|
-
"format": "
|
|
4406
|
+
"format": "uint8",
|
|
4412
4407
|
"example": "1"
|
|
4413
4408
|
},
|
|
4414
4409
|
"size": {
|