zklighter-perps 1.0.17 → 1.0.19

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.
@@ -9,11 +9,13 @@ apis/TransactionApi.ts
9
9
  apis/index.ts
10
10
  index.ts
11
11
  models/Account.ts
12
+ models/AccountApiKeys.ts
12
13
  models/AccountMarketStats.ts
13
14
  models/AccountPnL.ts
14
15
  models/AccountPosition.ts
15
16
  models/AccountStats.ts
16
17
  models/Accounts.ts
18
+ models/ApiKey.ts
17
19
  models/Block.ts
18
20
  models/Blocks.ts
19
21
  models/Candlestick.ts
@@ -48,6 +50,7 @@ models/PriceLevel.ts
48
50
  models/ReqDoFaucet.ts
49
51
  models/ReqGetAccount.ts
50
52
  models/ReqGetAccountActiveOrders.ts
53
+ models/ReqGetAccountApiKeys.ts
51
54
  models/ReqGetAccountByL1Address.ts
52
55
  models/ReqGetAccountInactiveOrders.ts
53
56
  models/ReqGetAccountOrders.ts
@@ -15,6 +15,7 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AccountApiKeys,
18
19
  AccountPnL,
19
20
  Accounts,
20
21
  DetailedAccounts,
@@ -23,6 +24,8 @@ import type {
23
24
  SubAccounts,
24
25
  } from '../models/index';
25
26
  import {
27
+ AccountApiKeysFromJSON,
28
+ AccountApiKeysToJSON,
26
29
  AccountPnLFromJSON,
27
30
  AccountPnLToJSON,
28
31
  AccountsFromJSON,
@@ -46,6 +49,11 @@ export interface GetAccountRequest {
46
49
  value: string;
47
50
  }
48
51
 
52
+ export interface GetAccountApiKeysRequest {
53
+ account_index: number;
54
+ api_key_index: number;
55
+ }
56
+
49
57
  export interface GetAccountPnlRequest {
50
58
  by: GetAccountPnlByEnum;
51
59
  value: string;
@@ -165,6 +173,56 @@ export class AccountApi extends runtime.BaseAPI {
165
173
  return await response.value();
166
174
  }
167
175
 
176
+ /**
177
+ * Get account api key
178
+ * GetAccountApiKeys
179
+ */
180
+ async getAccountApiKeysRaw(requestParameters: GetAccountApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountApiKeys>> {
181
+ if (requestParameters['account_index'] == null) {
182
+ throw new runtime.RequiredError(
183
+ 'account_index',
184
+ 'Required parameter "account_index" was null or undefined when calling getAccountApiKeys().'
185
+ );
186
+ }
187
+
188
+ if (requestParameters['api_key_index'] == null) {
189
+ throw new runtime.RequiredError(
190
+ 'api_key_index',
191
+ 'Required parameter "api_key_index" was null or undefined when calling getAccountApiKeys().'
192
+ );
193
+ }
194
+
195
+ const queryParameters: any = {};
196
+
197
+ if (requestParameters['account_index'] != null) {
198
+ queryParameters['account_index'] = requestParameters['account_index'];
199
+ }
200
+
201
+ if (requestParameters['api_key_index'] != null) {
202
+ queryParameters['api_key_index'] = requestParameters['api_key_index'];
203
+ }
204
+
205
+ const headerParameters: runtime.HTTPHeaders = {};
206
+
207
+ const response = await this.request({
208
+ path: `/api/v1/apikeys`,
209
+ method: 'GET',
210
+ headers: headerParameters,
211
+ query: queryParameters,
212
+ }, initOverrides);
213
+
214
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountApiKeysFromJSON(jsonValue));
215
+ }
216
+
217
+ /**
218
+ * Get account api key
219
+ * GetAccountApiKeys
220
+ */
221
+ async getAccountApiKeys(requestParameters: GetAccountApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountApiKeys> {
222
+ const response = await this.getAccountApiKeysRaw(requestParameters, initOverrides);
223
+ return await response.value();
224
+ }
225
+
168
226
  /**
169
227
  * Get account PnL chart
170
228
  * GetAccountPnl
package/models/Account.ts CHANGED
@@ -43,6 +43,18 @@ export interface Account {
43
43
  * @memberof Account
44
44
  */
45
45
  l1_address: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof Account
50
+ */
51
+ cancel_all_time: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof Account
56
+ */
57
+ open_order_count: number;
46
58
  /**
47
59
  *
48
60
  * @type {number}
@@ -63,6 +75,8 @@ export interface Account {
63
75
  export function instanceOfAccount(value: object): value is Account {
64
76
  if (!('index' in value) || value['index'] === undefined) return false;
65
77
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
78
+ if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
79
+ if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
66
80
  if (!('status' in value) || value['status'] === undefined) return false;
67
81
  if (!('collateral' in value) || value['collateral'] === undefined) return false;
68
82
  return true;
@@ -82,6 +96,8 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
82
96
  'message': json['message'] == null ? undefined : json['message'],
83
97
  'index': json['index'],
84
98
  'l1_address': json['l1_address'],
99
+ 'cancel_all_time': json['cancel_all_time'],
100
+ 'open_order_count': json['open_order_count'],
85
101
  'status': json['status'],
86
102
  'collateral': json['collateral'],
87
103
  };
@@ -97,6 +113,8 @@ export function AccountToJSON(value?: Account | null): any {
97
113
  'message': value['message'],
98
114
  'index': value['index'],
99
115
  'l1_address': value['l1_address'],
116
+ 'cancel_all_time': value['cancel_all_time'],
117
+ 'open_order_count': value['open_order_count'],
100
118
  'status': value['status'],
101
119
  'collateral': value['collateral'],
102
120
  };
@@ -0,0 +1,84 @@
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 { ApiKey } from './ApiKey';
17
+ import {
18
+ ApiKeyFromJSON,
19
+ ApiKeyFromJSONTyped,
20
+ ApiKeyToJSON,
21
+ } from './ApiKey';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface AccountApiKeys
27
+ */
28
+ export interface AccountApiKeys {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof AccountApiKeys
33
+ */
34
+ code?: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof AccountApiKeys
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {Array<ApiKey>}
44
+ * @memberof AccountApiKeys
45
+ */
46
+ api_keys: Array<ApiKey>;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the AccountApiKeys interface.
51
+ */
52
+ export function instanceOfAccountApiKeys(value: object): value is AccountApiKeys {
53
+ if (!('api_keys' in value) || value['api_keys'] === undefined) return false;
54
+ return true;
55
+ }
56
+
57
+ export function AccountApiKeysFromJSON(json: any): AccountApiKeys {
58
+ return AccountApiKeysFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function AccountApiKeysFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountApiKeys {
62
+ if (json == null) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'code': json['code'] == null ? undefined : json['code'],
68
+ 'message': json['message'] == null ? undefined : json['message'],
69
+ 'api_keys': ((json['api_keys'] as Array<any>).map(ApiKeyFromJSON)),
70
+ };
71
+ }
72
+
73
+ export function AccountApiKeysToJSON(value?: AccountApiKeys | null): any {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+ return {
78
+
79
+ 'code': value['code'],
80
+ 'message': value['message'],
81
+ 'api_keys': ((value['api_keys'] as Array<any>).map(ApiKeyToJSON)),
82
+ };
83
+ }
84
+
@@ -49,18 +49,6 @@ export interface AccountPosition {
49
49
  * @memberof AccountPosition
50
50
  */
51
51
  position: string;
52
- /**
53
- *
54
- * @type {string}
55
- * @memberof AccountPosition
56
- */
57
- ask_order_size: string;
58
- /**
59
- *
60
- * @type {string}
61
- * @memberof AccountPosition
62
- */
63
- bid_order_size: string;
64
52
  /**
65
53
  *
66
54
  * @type {string}
@@ -96,8 +84,6 @@ export function instanceOfAccountPosition(value: object): value is AccountPositi
96
84
  if (!('symbol' in value) || value['symbol'] === undefined) return false;
97
85
  if (!('sign' in value) || value['sign'] === undefined) return false;
98
86
  if (!('position' in value) || value['position'] === undefined) return false;
99
- if (!('ask_order_size' in value) || value['ask_order_size'] === undefined) return false;
100
- if (!('bid_order_size' in value) || value['bid_order_size'] === undefined) return false;
101
87
  if (!('avg_entry_price' in value) || value['avg_entry_price'] === undefined) return false;
102
88
  if (!('position_value' in value) || value['position_value'] === undefined) return false;
103
89
  if (!('unrealized_pnl' in value) || value['unrealized_pnl'] === undefined) return false;
@@ -120,8 +106,6 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
120
106
  'symbol': json['symbol'],
121
107
  'sign': json['sign'],
122
108
  'position': json['position'],
123
- 'ask_order_size': json['ask_order_size'],
124
- 'bid_order_size': json['bid_order_size'],
125
109
  'avg_entry_price': json['avg_entry_price'],
126
110
  'position_value': json['position_value'],
127
111
  'unrealized_pnl': json['unrealized_pnl'],
@@ -140,8 +124,6 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
140
124
  'symbol': value['symbol'],
141
125
  'sign': value['sign'],
142
126
  'position': value['position'],
143
- 'ask_order_size': value['ask_order_size'],
144
- 'bid_order_size': value['bid_order_size'],
145
127
  'avg_entry_price': value['avg_entry_price'],
146
128
  'position_value': value['position_value'],
147
129
  'unrealized_pnl': value['unrealized_pnl'],
@@ -0,0 +1,88 @@
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 ApiKey
20
+ */
21
+ export interface ApiKey {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ApiKey
26
+ */
27
+ account_index: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ApiKey
32
+ */
33
+ api_key_index: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof ApiKey
38
+ */
39
+ nonce: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ApiKey
44
+ */
45
+ public_key: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the ApiKey interface.
50
+ */
51
+ export function instanceOfApiKey(value: object): value is ApiKey {
52
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
53
+ if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
54
+ if (!('nonce' in value) || value['nonce'] === undefined) return false;
55
+ if (!('public_key' in value) || value['public_key'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function ApiKeyFromJSON(json: any): ApiKey {
60
+ return ApiKeyFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function ApiKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKey {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'account_index': json['account_index'],
70
+ 'api_key_index': json['api_key_index'],
71
+ 'nonce': json['nonce'],
72
+ 'public_key': json['public_key'],
73
+ };
74
+ }
75
+
76
+ export function ApiKeyToJSON(value?: ApiKey | null): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+
82
+ 'account_index': value['account_index'],
83
+ 'api_key_index': value['api_key_index'],
84
+ 'nonce': value['nonce'],
85
+ 'public_key': value['public_key'],
86
+ };
87
+ }
88
+
@@ -56,6 +56,18 @@ export interface DetailedAccount {
56
56
  * @memberof DetailedAccount
57
57
  */
58
58
  l1_address?: string;
59
+ /**
60
+ *
61
+ * @type {number}
62
+ * @memberof DetailedAccount
63
+ */
64
+ cancel_all_time?: number;
65
+ /**
66
+ *
67
+ * @type {number}
68
+ * @memberof DetailedAccount
69
+ */
70
+ open_order_count?: number;
59
71
  /**
60
72
  *
61
73
  * @type {number}
@@ -112,6 +124,8 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
112
124
  'message': json['message'] == null ? undefined : json['message'],
113
125
  'index': json['index'] == null ? undefined : json['index'],
114
126
  'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
127
+ 'cancel_all_time': json['cancel_all_time'] == null ? undefined : json['cancel_all_time'],
128
+ 'open_order_count': json['open_order_count'] == null ? undefined : json['open_order_count'],
115
129
  'status': json['status'] == null ? undefined : json['status'],
116
130
  'collateral': json['collateral'] == null ? undefined : json['collateral'],
117
131
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
@@ -130,6 +144,8 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
130
144
  'message': value['message'],
131
145
  'index': value['index'],
132
146
  'l1_address': value['l1_address'],
147
+ 'cancel_all_time': value['cancel_all_time'],
148
+ 'open_order_count': value['open_order_count'],
133
149
  'status': value['status'],
134
150
  'collateral': value['collateral'],
135
151
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
package/models/Order.ts CHANGED
@@ -85,6 +85,12 @@ export interface Order {
85
85
  * @memberof Order
86
86
  */
87
87
  is_ask: boolean;
88
+ /**
89
+ *
90
+ * @type {number}
91
+ * @memberof Order
92
+ */
93
+ order_expiry: number;
88
94
  /**
89
95
  *
90
96
  * @type {string}
@@ -153,6 +159,7 @@ export function instanceOfOrder(value: object): value is Order {
153
159
  if (!('base_price' in value) || value['base_price'] === undefined) return false;
154
160
  if (!('nonce' in value) || value['nonce'] === undefined) return false;
155
161
  if (!('is_ask' in value) || value['is_ask'] === undefined) return false;
162
+ if (!('order_expiry' in value) || value['order_expiry'] === undefined) return false;
156
163
  if (!('side' in value) || value['side'] === undefined) return false;
157
164
  if (!('type' in value) || value['type'] === undefined) return false;
158
165
  if (!('status' in value) || value['status'] === undefined) return false;
@@ -182,6 +189,7 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
182
189
  'base_price': json['base_price'],
183
190
  'nonce': json['nonce'],
184
191
  'is_ask': json['is_ask'],
192
+ 'order_expiry': json['order_expiry'],
185
193
  'side': json['side'],
186
194
  'type': json['type'],
187
195
  'status': json['status'],
@@ -207,6 +215,7 @@ export function OrderToJSON(value?: Order | null): any {
207
215
  'base_price': value['base_price'],
208
216
  'nonce': value['nonce'],
209
217
  'is_ask': value['is_ask'],
218
+ 'order_expiry': value['order_expiry'],
210
219
  'side': value['side'],
211
220
  'type': value['type'],
212
221
  'status': value['status'],
@@ -0,0 +1,70 @@
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 ReqGetAccountApiKeys
20
+ */
21
+ export interface ReqGetAccountApiKeys {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetAccountApiKeys
26
+ */
27
+ account_index: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetAccountApiKeys
32
+ */
33
+ api_key_index: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ReqGetAccountApiKeys interface.
38
+ */
39
+ export function instanceOfReqGetAccountApiKeys(value: object): value is ReqGetAccountApiKeys {
40
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
41
+ if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ReqGetAccountApiKeysFromJSON(json: any): ReqGetAccountApiKeys {
46
+ return ReqGetAccountApiKeysFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ReqGetAccountApiKeysFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountApiKeys {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'account_index': json['account_index'],
56
+ 'api_key_index': json['api_key_index'],
57
+ };
58
+ }
59
+
60
+ export function ReqGetAccountApiKeysToJSON(value?: ReqGetAccountApiKeys | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'account_index': value['account_index'],
67
+ 'api_key_index': value['api_key_index'],
68
+ };
69
+ }
70
+
@@ -49,6 +49,12 @@ export interface SimpleOrder {
49
49
  * @memberof SimpleOrder
50
50
  */
51
51
  nonce: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof SimpleOrder
56
+ */
57
+ order_expiry: number;
52
58
  }
53
59
 
54
60
  /**
@@ -60,6 +66,7 @@ export function instanceOfSimpleOrder(value: object): value is SimpleOrder {
60
66
  if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
61
67
  if (!('price' in value) || value['price'] === undefined) return false;
62
68
  if (!('nonce' in value) || value['nonce'] === undefined) return false;
69
+ if (!('order_expiry' in value) || value['order_expiry'] === undefined) return false;
63
70
  return true;
64
71
  }
65
72
 
@@ -78,6 +85,7 @@ export function SimpleOrderFromJSONTyped(json: any, ignoreDiscriminator: boolean
78
85
  'remaining_base_amount': json['remaining_base_amount'],
79
86
  'price': json['price'],
80
87
  'nonce': json['nonce'],
88
+ 'order_expiry': json['order_expiry'],
81
89
  };
82
90
  }
83
91
 
@@ -92,6 +100,7 @@ export function SimpleOrderToJSON(value?: SimpleOrder | null): any {
92
100
  'remaining_base_amount': value['remaining_base_amount'],
93
101
  'price': value['price'],
94
102
  'nonce': value['nonce'],
103
+ 'order_expiry': value['order_expiry'],
95
104
  };
96
105
  }
97
106
 
package/models/index.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './Account';
4
+ export * from './AccountApiKeys';
4
5
  export * from './AccountMarketStats';
5
6
  export * from './AccountPnL';
6
7
  export * from './AccountPosition';
7
8
  export * from './AccountStats';
8
9
  export * from './Accounts';
10
+ export * from './ApiKey';
9
11
  export * from './Block';
10
12
  export * from './Blocks';
11
13
  export * from './Candlestick';
@@ -40,6 +42,7 @@ export * from './PriceLevel';
40
42
  export * from './ReqDoFaucet';
41
43
  export * from './ReqGetAccount';
42
44
  export * from './ReqGetAccountActiveOrders';
45
+ export * from './ReqGetAccountApiKeys';
43
46
  export * from './ReqGetAccountByL1Address';
44
47
  export * from './ReqGetAccountInactiveOrders';
45
48
  export * from './ReqGetAccountOrders';
package/openapi.json CHANGED
@@ -464,6 +464,49 @@
464
464
  "description": "Get accounts by l1_address returns all accounts associated with the given L1 address"
465
465
  }
466
466
  },
467
+ "/api/v1/apikeys": {
468
+ "get": {
469
+ "summary": "GetAccountApiKeys",
470
+ "operationId": "GetAccountApiKeys",
471
+ "responses": {
472
+ "200": {
473
+ "description": "A successful response.",
474
+ "schema": {
475
+ "$ref": "#/definitions/AccountApiKeys"
476
+ }
477
+ },
478
+ "400": {
479
+ "description": "Bad request",
480
+ "schema": {
481
+ "$ref": "#/definitions/ResultCode"
482
+ }
483
+ }
484
+ },
485
+ "parameters": [
486
+ {
487
+ "name": "account_index",
488
+ "in": "query",
489
+ "required": true,
490
+ "type": "integer",
491
+ "format": "int32"
492
+ },
493
+ {
494
+ "name": "api_key_index",
495
+ "in": "query",
496
+ "required": true,
497
+ "type": "integer",
498
+ "format": "uint8"
499
+ }
500
+ ],
501
+ "tags": [
502
+ "account"
503
+ ],
504
+ "consumes": [
505
+ "multipart/form-data"
506
+ ],
507
+ "description": "Get account api key"
508
+ }
509
+ },
467
510
  "/api/v1/block": {
468
511
  "get": {
469
512
  "summary": "GetBlock",
@@ -1757,6 +1800,16 @@
1757
1800
  "type": "string",
1758
1801
  "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
1759
1802
  },
1803
+ "cancel_all_time": {
1804
+ "type": "integer",
1805
+ "format": "int64",
1806
+ "example": "1640995200"
1807
+ },
1808
+ "open_order_count": {
1809
+ "type": "integer",
1810
+ "format": "int64",
1811
+ "example": "100"
1812
+ },
1760
1813
  "status": {
1761
1814
  "type": "integer",
1762
1815
  "format": "int32",
@@ -1771,10 +1824,35 @@
1771
1824
  "required": [
1772
1825
  "index",
1773
1826
  "l1_address",
1827
+ "cancel_all_time",
1828
+ "open_order_count",
1774
1829
  "status",
1775
1830
  "collateral"
1776
1831
  ]
1777
1832
  },
1833
+ "AccountApiKeys": {
1834
+ "type": "object",
1835
+ "properties": {
1836
+ "code": {
1837
+ "type": "integer",
1838
+ "format": "int32",
1839
+ "example": "100"
1840
+ },
1841
+ "message": {
1842
+ "type": "string"
1843
+ },
1844
+ "api_keys": {
1845
+ "type": "array",
1846
+ "items": {
1847
+ "$ref": "#/definitions/ApiKey"
1848
+ }
1849
+ }
1850
+ },
1851
+ "title": "AccountApiKeys",
1852
+ "required": [
1853
+ "api_keys"
1854
+ ]
1855
+ },
1778
1856
  "AccountMarketStats": {
1779
1857
  "type": "object",
1780
1858
  "properties": {
@@ -1872,14 +1950,6 @@
1872
1950
  "type": "string",
1873
1951
  "example": "3.6956"
1874
1952
  },
1875
- "ask_order_size": {
1876
- "type": "string",
1877
- "example": "58933.9753"
1878
- },
1879
- "bid_order_size": {
1880
- "type": "string",
1881
- "example": "59010.2588"
1882
- },
1883
1953
  "avg_entry_price": {
1884
1954
  "type": "string",
1885
1955
  "example": "3024.66"
@@ -1904,8 +1974,6 @@
1904
1974
  "symbol",
1905
1975
  "sign",
1906
1976
  "position",
1907
- "ask_order_size",
1908
- "bid_order_size",
1909
1977
  "avg_entry_price",
1910
1978
  "position_value",
1911
1979
  "unrealized_pnl",
@@ -1974,6 +2042,36 @@
1974
2042
  "accounts"
1975
2043
  ]
1976
2044
  },
2045
+ "ApiKey": {
2046
+ "type": "object",
2047
+ "properties": {
2048
+ "account_index": {
2049
+ "type": "integer",
2050
+ "format": "int32",
2051
+ "example": "3"
2052
+ },
2053
+ "api_key_index": {
2054
+ "type": "integer",
2055
+ "format": "uint8",
2056
+ "example": "0"
2057
+ },
2058
+ "nonce": {
2059
+ "type": "integer",
2060
+ "format": "int64",
2061
+ "example": "722"
2062
+ },
2063
+ "public_key": {
2064
+ "type": "string"
2065
+ }
2066
+ },
2067
+ "title": "ApiKey",
2068
+ "required": [
2069
+ "account_index",
2070
+ "api_key_index",
2071
+ "nonce",
2072
+ "public_key"
2073
+ ]
2074
+ },
1977
2075
  "Block": {
1978
2076
  "type": "object",
1979
2077
  "properties": {
@@ -2218,6 +2316,16 @@
2218
2316
  "type": "string",
2219
2317
  "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
2220
2318
  },
2319
+ "cancel_all_time": {
2320
+ "type": "integer",
2321
+ "format": "int64",
2322
+ "example": "1640995200"
2323
+ },
2324
+ "open_order_count": {
2325
+ "type": "integer",
2326
+ "format": "int64",
2327
+ "example": "100"
2328
+ },
2221
2329
  "status": {
2222
2330
  "type": "integer",
2223
2331
  "format": "int32",
@@ -2764,6 +2872,11 @@
2764
2872
  "format": "boolean",
2765
2873
  "example": "true"
2766
2874
  },
2875
+ "order_expiry": {
2876
+ "type": "integer",
2877
+ "format": "int64",
2878
+ "example": "1640995200"
2879
+ },
2767
2880
  "side": {
2768
2881
  "type": "string",
2769
2882
  "example": "buy",
@@ -2810,6 +2923,7 @@
2810
2923
  "base_price",
2811
2924
  "nonce",
2812
2925
  "is_ask",
2926
+ "order_expiry",
2813
2927
  "side",
2814
2928
  "type",
2815
2929
  "status",
@@ -3362,6 +3476,24 @@
3362
3476
  "market_id"
3363
3477
  ]
3364
3478
  },
3479
+ "ReqGetAccountApiKeys": {
3480
+ "type": "object",
3481
+ "properties": {
3482
+ "account_index": {
3483
+ "type": "integer",
3484
+ "format": "int32"
3485
+ },
3486
+ "api_key_index": {
3487
+ "type": "integer",
3488
+ "format": "uint8"
3489
+ }
3490
+ },
3491
+ "title": "ReqGetAccountApiKeys",
3492
+ "required": [
3493
+ "account_index",
3494
+ "api_key_index"
3495
+ ]
3496
+ },
3365
3497
  "ReqGetAccountByL1Address": {
3366
3498
  "type": "object",
3367
3499
  "properties": {
@@ -4178,6 +4310,11 @@
4178
4310
  "type": "integer",
4179
4311
  "format": "int64",
4180
4312
  "example": "234"
4313
+ },
4314
+ "order_expiry": {
4315
+ "type": "integer",
4316
+ "format": "int64",
4317
+ "example": "1640995200"
4181
4318
  }
4182
4319
  },
4183
4320
  "title": "SimpleOrder",
@@ -4186,7 +4323,8 @@
4186
4323
  "initial_base_amount",
4187
4324
  "remaining_base_amount",
4188
4325
  "price",
4189
- "nonce"
4326
+ "nonce",
4327
+ "order_expiry"
4190
4328
  ]
4191
4329
  },
4192
4330
  "Status": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {