zklighter-perps 1.0.65 → 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.
@@ -27,22 +27,28 @@ export interface AccountPosition {
27
27
  market_id: number;
28
28
  /**
29
29
  *
30
- * @type {number}
30
+ * @type {string}
31
31
  * @memberof AccountPosition
32
32
  */
33
- open_order_count: number;
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
- pending_order_count: number;
45
+ open_order_count: number;
40
46
  /**
41
47
  *
42
- * @type {string}
48
+ * @type {number}
43
49
  * @memberof AccountPosition
44
50
  */
45
- symbol: string;
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
- initial_margin_fraction: number;
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 (!('initial_margin_fraction' in value) || value['initial_margin_fraction'] === undefined) return false;
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
- 'initial_margin_fraction': json['initial_margin_fraction'],
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
- 'initial_margin_fraction': value['initial_margin_fraction'],
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'],
package/openapi.json CHANGED
@@ -1939,6 +1939,14 @@
1939
1939
  "format": "uint8",
1940
1940
  "example": "1"
1941
1941
  },
1942
+ "symbol": {
1943
+ "type": "string",
1944
+ "example": "ETH"
1945
+ },
1946
+ "initial_margin_fraction": {
1947
+ "type": "string",
1948
+ "example": "20.00"
1949
+ },
1942
1950
  "open_order_count": {
1943
1951
  "type": "integer",
1944
1952
  "format": "int64",
@@ -1949,10 +1957,6 @@
1949
1957
  "format": "int64",
1950
1958
  "example": "3"
1951
1959
  },
1952
- "symbol": {
1953
- "type": "string",
1954
- "example": "ETH"
1955
- },
1956
1960
  "sign": {
1957
1961
  "type": "integer",
1958
1962
  "format": "int32",
@@ -1982,9 +1986,10 @@
1982
1986
  "title": "AccountPosition",
1983
1987
  "required": [
1984
1988
  "market_id",
1989
+ "symbol",
1990
+ "initial_margin_fraction",
1985
1991
  "open_order_count",
1986
1992
  "pending_order_count",
1987
- "symbol",
1988
1993
  "sign",
1989
1994
  "position",
1990
1995
  "avg_entry_price",
@@ -3417,7 +3422,12 @@
3417
3422
  "format": "int64",
3418
3423
  "example": "10000"
3419
3424
  },
3420
- "initial_margin_fraction": {
3425
+ "default_initial_margin_fraction": {
3426
+ "type": "integer",
3427
+ "format": "uin16",
3428
+ "example": "100"
3429
+ },
3430
+ "min_initial_margin_fraction": {
3421
3431
  "type": "integer",
3422
3432
  "format": "uin16",
3423
3433
  "example": "100"
@@ -3497,7 +3507,8 @@
3497
3507
  "size_decimals",
3498
3508
  "price_decimals",
3499
3509
  "quote_multiplier",
3500
- "initial_margin_fraction",
3510
+ "default_initial_margin_fraction",
3511
+ "min_initial_margin_fraction",
3501
3512
  "maintenance_margin_fraction",
3502
3513
  "closeout_margin_fraction",
3503
3514
  "last_trade_price",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {