zklighter-perps 1.0.360 → 1.0.362

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.
@@ -51,6 +51,8 @@ models/Alert.ts
51
51
  models/Announcement.ts
52
52
  models/Announcements.ts
53
53
  models/ApiKey.ts
54
+ models/ApiKeyRestrictions.ts
55
+ models/ApiKeySeries.ts
54
56
  models/ApiToken.ts
55
57
  models/ApprovedIntegrator.ts
56
58
  models/Asset.ts
@@ -152,6 +154,7 @@ models/OrderBook.ts
152
154
  models/OrderBookDepth.ts
153
155
  models/OrderBookDepthWithBeginNonce.ts
154
156
  models/OrderBookDetails.ts
157
+ models/OrderBookLevel.ts
155
158
  models/OrderBookOrders.ts
156
159
  models/OrderBookStats.ts
157
160
  models/OrderBooks.ts
@@ -169,6 +169,8 @@ export interface AirdropCreateRequest {
169
169
 
170
170
  export interface ApikeysRequest {
171
171
  account_index: number;
172
+ authorization?: string;
173
+ auth?: string;
172
174
  api_key_index?: number;
173
175
  }
174
176
 
@@ -367,6 +369,18 @@ export interface RfqUpdateRequest {
367
369
  auth?: string;
368
370
  }
369
371
 
372
+ export interface SetApiKeyRestrictionsRequest {
373
+ account_index: number;
374
+ api_key_index: number;
375
+ public_key: string;
376
+ market_ids: string;
377
+ valid_until: number;
378
+ timestamp: number;
379
+ signature: string;
380
+ series?: string;
381
+ allowed_ips?: string;
382
+ }
383
+
370
384
  export interface SetMakerOnlyApiKeysRequest {
371
385
  account_index: number;
372
386
  api_key_indexes: string;
@@ -741,7 +755,7 @@ export class AccountApi extends runtime.BaseAPI {
741
755
  }
742
756
 
743
757
  /**
744
- * Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
758
+ * Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account. Restrictions are returned only with auth for the account.
745
759
  * apikeys
746
760
  */
747
761
  async apikeysRaw(requestParameters: ApikeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountApiKeys>> {
@@ -754,6 +768,14 @@ export class AccountApi extends runtime.BaseAPI {
754
768
 
755
769
  const queryParameters: any = {};
756
770
 
771
+ if (requestParameters['authorization'] != null) {
772
+ queryParameters['authorization'] = requestParameters['authorization'];
773
+ }
774
+
775
+ if (requestParameters['auth'] != null) {
776
+ queryParameters['auth'] = requestParameters['auth'];
777
+ }
778
+
757
779
  if (requestParameters['account_index'] != null) {
758
780
  queryParameters['account_index'] = requestParameters['account_index'];
759
781
  }
@@ -775,7 +797,7 @@ export class AccountApi extends runtime.BaseAPI {
775
797
  }
776
798
 
777
799
  /**
778
- * Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
800
+ * Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account. Restrictions are returned only with auth for the account.
779
801
  * apikeys
780
802
  */
781
803
  async apikeys(requestParameters: ApikeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountApiKeys> {
@@ -2492,6 +2514,134 @@ export class AccountApi extends runtime.BaseAPI {
2492
2514
  return await response.value();
2493
2515
  }
2494
2516
 
2517
+ /**
2518
+ * Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
2519
+ * setApiKeyRestrictions
2520
+ */
2521
+ async setApiKeyRestrictionsRaw(requestParameters: SetApiKeyRestrictionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
2522
+ if (requestParameters['account_index'] == null) {
2523
+ throw new runtime.RequiredError(
2524
+ 'account_index',
2525
+ 'Required parameter "account_index" was null or undefined when calling setApiKeyRestrictions().'
2526
+ );
2527
+ }
2528
+
2529
+ if (requestParameters['api_key_index'] == null) {
2530
+ throw new runtime.RequiredError(
2531
+ 'api_key_index',
2532
+ 'Required parameter "api_key_index" was null or undefined when calling setApiKeyRestrictions().'
2533
+ );
2534
+ }
2535
+
2536
+ if (requestParameters['public_key'] == null) {
2537
+ throw new runtime.RequiredError(
2538
+ 'public_key',
2539
+ 'Required parameter "public_key" was null or undefined when calling setApiKeyRestrictions().'
2540
+ );
2541
+ }
2542
+
2543
+ if (requestParameters['market_ids'] == null) {
2544
+ throw new runtime.RequiredError(
2545
+ 'market_ids',
2546
+ 'Required parameter "market_ids" was null or undefined when calling setApiKeyRestrictions().'
2547
+ );
2548
+ }
2549
+
2550
+ if (requestParameters['valid_until'] == null) {
2551
+ throw new runtime.RequiredError(
2552
+ 'valid_until',
2553
+ 'Required parameter "valid_until" was null or undefined when calling setApiKeyRestrictions().'
2554
+ );
2555
+ }
2556
+
2557
+ if (requestParameters['timestamp'] == null) {
2558
+ throw new runtime.RequiredError(
2559
+ 'timestamp',
2560
+ 'Required parameter "timestamp" was null or undefined when calling setApiKeyRestrictions().'
2561
+ );
2562
+ }
2563
+
2564
+ if (requestParameters['signature'] == null) {
2565
+ throw new runtime.RequiredError(
2566
+ 'signature',
2567
+ 'Required parameter "signature" was null or undefined when calling setApiKeyRestrictions().'
2568
+ );
2569
+ }
2570
+
2571
+ const queryParameters: any = {};
2572
+
2573
+ const headerParameters: runtime.HTTPHeaders = {};
2574
+
2575
+ const consumes: runtime.Consume[] = [
2576
+ { contentType: 'multipart/form-data' },
2577
+ ];
2578
+ // @ts-ignore: canConsumeForm may be unused
2579
+ const canConsumeForm = runtime.canConsumeForm(consumes);
2580
+
2581
+ let formParams: { append(param: string, value: any): any };
2582
+ let useForm = false;
2583
+ if (useForm) {
2584
+ formParams = new FormData();
2585
+ } else {
2586
+ formParams = new URLSearchParams();
2587
+ }
2588
+
2589
+ if (requestParameters['account_index'] != null) {
2590
+ formParams.append('account_index', requestParameters['account_index'] as any);
2591
+ }
2592
+
2593
+ if (requestParameters['api_key_index'] != null) {
2594
+ formParams.append('api_key_index', requestParameters['api_key_index'] as any);
2595
+ }
2596
+
2597
+ if (requestParameters['public_key'] != null) {
2598
+ formParams.append('public_key', requestParameters['public_key'] as any);
2599
+ }
2600
+
2601
+ if (requestParameters['market_ids'] != null) {
2602
+ formParams.append('market_ids', requestParameters['market_ids'] as any);
2603
+ }
2604
+
2605
+ if (requestParameters['series'] != null) {
2606
+ formParams.append('series', requestParameters['series'] as any);
2607
+ }
2608
+
2609
+ if (requestParameters['allowed_ips'] != null) {
2610
+ formParams.append('allowed_ips', requestParameters['allowed_ips'] as any);
2611
+ }
2612
+
2613
+ if (requestParameters['valid_until'] != null) {
2614
+ formParams.append('valid_until', requestParameters['valid_until'] as any);
2615
+ }
2616
+
2617
+ if (requestParameters['timestamp'] != null) {
2618
+ formParams.append('timestamp', requestParameters['timestamp'] as any);
2619
+ }
2620
+
2621
+ if (requestParameters['signature'] != null) {
2622
+ formParams.append('signature', requestParameters['signature'] as any);
2623
+ }
2624
+
2625
+ const response = await this.request({
2626
+ path: `/api/v1/setApiKeyRestrictions`,
2627
+ method: 'POST',
2628
+ headers: headerParameters,
2629
+ query: queryParameters,
2630
+ body: formParams,
2631
+ }, initOverrides);
2632
+
2633
+ return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
2634
+ }
2635
+
2636
+ /**
2637
+ * Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
2638
+ * setApiKeyRestrictions
2639
+ */
2640
+ async setApiKeyRestrictions(requestParameters: SetApiKeyRestrictionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
2641
+ const response = await this.setApiKeyRestrictionsRaw(requestParameters, initOverrides);
2642
+ return await response.value();
2643
+ }
2644
+
2495
2645
  /**
2496
2646
  * Set maker-only API key indexes
2497
2647
  * setMakerOnlyApiKeys
package/apis/OrderApi.ts CHANGED
@@ -167,6 +167,8 @@ export interface OrderBookDetailsRequest {
167
167
  export interface OrderBookOrdersRequest {
168
168
  market_id: number;
169
169
  limit: number;
170
+ n_sig_figs?: number;
171
+ mantissa?: number;
170
172
  }
171
173
 
172
174
  export interface OrderBooksRequest {
@@ -988,6 +990,14 @@ export class OrderApi extends runtime.BaseAPI {
988
990
  queryParameters['limit'] = requestParameters['limit'];
989
991
  }
990
992
 
993
+ if (requestParameters['n_sig_figs'] != null) {
994
+ queryParameters['n_sig_figs'] = requestParameters['n_sig_figs'];
995
+ }
996
+
997
+ if (requestParameters['mantissa'] != null) {
998
+ queryParameters['mantissa'] = requestParameters['mantissa'];
999
+ }
1000
+
991
1001
  const headerParameters: runtime.HTTPHeaders = {};
992
1002
 
993
1003
  const response = await this.request({
@@ -1396,6 +1406,7 @@ export type TradesMarketTypeEnum = typeof TradesMarketTypeEnum[keyof typeof Trad
1396
1406
  * @export
1397
1407
  */
1398
1408
  export const TradesSortDirEnum = {
1409
+ Asc: 'asc',
1399
1410
  Desc: 'desc'
1400
1411
  } as const;
1401
1412
  export type TradesSortDirEnum = typeof TradesSortDirEnum[keyof typeof TradesSortDirEnum];
package/models/ApiKey.ts CHANGED
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ApiKeyRestrictions } from './ApiKeyRestrictions';
17
+ import {
18
+ ApiKeyRestrictionsFromJSON,
19
+ ApiKeyRestrictionsFromJSONTyped,
20
+ ApiKeyRestrictionsToJSON,
21
+ } from './ApiKeyRestrictions';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -37,6 +44,12 @@ export interface ApiKey {
37
44
  * @memberof ApiKey
38
45
  */
39
46
  nonce: number;
47
+ /**
48
+ *
49
+ * @type {number}
50
+ * @memberof ApiKey
51
+ */
52
+ key_type: number;
40
53
  /**
41
54
  *
42
55
  * @type {string}
@@ -49,6 +62,12 @@ export interface ApiKey {
49
62
  * @memberof ApiKey
50
63
  */
51
64
  transaction_time: number;
65
+ /**
66
+ *
67
+ * @type {ApiKeyRestrictions}
68
+ * @memberof ApiKey
69
+ */
70
+ restrictions: ApiKeyRestrictions;
52
71
  }
53
72
 
54
73
  /**
@@ -58,8 +77,10 @@ export function instanceOfApiKey(value: object): value is ApiKey {
58
77
  if (!('account_index' in value) || value['account_index'] === undefined) return false;
59
78
  if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
60
79
  if (!('nonce' in value) || value['nonce'] === undefined) return false;
80
+ if (!('key_type' in value) || value['key_type'] === undefined) return false;
61
81
  if (!('public_key' in value) || value['public_key'] === undefined) return false;
62
82
  if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false;
83
+ if (!('restrictions' in value) || value['restrictions'] === undefined) return false;
63
84
  return true;
64
85
  }
65
86
 
@@ -76,8 +97,10 @@ export function ApiKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ap
76
97
  'account_index': json['account_index'],
77
98
  'api_key_index': json['api_key_index'],
78
99
  'nonce': json['nonce'],
100
+ 'key_type': json['key_type'],
79
101
  'public_key': json['public_key'],
80
102
  'transaction_time': json['transaction_time'],
103
+ 'restrictions': ApiKeyRestrictionsFromJSON(json['restrictions']),
81
104
  };
82
105
  }
83
106
 
@@ -90,8 +113,10 @@ export function ApiKeyToJSON(value?: ApiKey | null): any {
90
113
  'account_index': value['account_index'],
91
114
  'api_key_index': value['api_key_index'],
92
115
  'nonce': value['nonce'],
116
+ 'key_type': value['key_type'],
93
117
  'public_key': value['public_key'],
94
118
  'transaction_time': value['transaction_time'],
119
+ 'restrictions': ApiKeyRestrictionsToJSON(value['restrictions']),
95
120
  };
96
121
  }
97
122
 
@@ -0,0 +1,95 @@
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 { ApiKeySeries } from './ApiKeySeries';
17
+ import {
18
+ ApiKeySeriesFromJSON,
19
+ ApiKeySeriesFromJSONTyped,
20
+ ApiKeySeriesToJSON,
21
+ } from './ApiKeySeries';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ApiKeyRestrictions
27
+ */
28
+ export interface ApiKeyRestrictions {
29
+ /**
30
+ * markets this key may trade; with series also empty, allows all
31
+ * @type {Array<number>}
32
+ * @memberof ApiKeyRestrictions
33
+ */
34
+ market_ids: Array<number>;
35
+ /**
36
+ * binary options series this key may trade, in addition to market_ids
37
+ * @type {Array<ApiKeySeries>}
38
+ * @memberof ApiKeyRestrictions
39
+ */
40
+ series: Array<ApiKeySeries>;
41
+ /**
42
+ * IP addresses this key may send from; empty allows all
43
+ * @type {Array<string>}
44
+ * @memberof ApiKeyRestrictions
45
+ */
46
+ allowed_ips: Array<string>;
47
+ /**
48
+ * unix seconds when the key expires; 0 means never
49
+ * @type {number}
50
+ * @memberof ApiKeyRestrictions
51
+ */
52
+ valid_until: number;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the ApiKeyRestrictions interface.
57
+ */
58
+ export function instanceOfApiKeyRestrictions(value: object): value is ApiKeyRestrictions {
59
+ if (!('market_ids' in value) || value['market_ids'] === undefined) return false;
60
+ if (!('series' in value) || value['series'] === undefined) return false;
61
+ if (!('allowed_ips' in value) || value['allowed_ips'] === undefined) return false;
62
+ if (!('valid_until' in value) || value['valid_until'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function ApiKeyRestrictionsFromJSON(json: any): ApiKeyRestrictions {
67
+ return ApiKeyRestrictionsFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function ApiKeyRestrictionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyRestrictions {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'market_ids': json['market_ids'],
77
+ 'series': ((json['series'] as Array<any>).map(ApiKeySeriesFromJSON)),
78
+ 'allowed_ips': json['allowed_ips'],
79
+ 'valid_until': json['valid_until'],
80
+ };
81
+ }
82
+
83
+ export function ApiKeyRestrictionsToJSON(value?: ApiKeyRestrictions | null): any {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+ return {
88
+
89
+ 'market_ids': value['market_ids'],
90
+ 'series': ((value['series'] as Array<any>).map(ApiKeySeriesToJSON)),
91
+ 'allowed_ips': value['allowed_ips'],
92
+ 'valid_until': value['valid_until'],
93
+ };
94
+ }
95
+
@@ -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 ApiKeySeries
20
+ */
21
+ export interface ApiKeySeries {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ApiKeySeries
26
+ */
27
+ creator_account_index: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiKeySeries
32
+ */
33
+ tag: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ApiKeySeries interface.
38
+ */
39
+ export function instanceOfApiKeySeries(value: object): value is ApiKeySeries {
40
+ if (!('creator_account_index' in value) || value['creator_account_index'] === undefined) return false;
41
+ if (!('tag' in value) || value['tag'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function ApiKeySeriesFromJSON(json: any): ApiKeySeries {
46
+ return ApiKeySeriesFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function ApiKeySeriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeySeries {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'creator_account_index': json['creator_account_index'],
56
+ 'tag': json['tag'],
57
+ };
58
+ }
59
+
60
+ export function ApiKeySeriesToJSON(value?: ApiKeySeries | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'creator_account_index': value['creator_account_index'],
67
+ 'tag': value['tag'],
68
+ };
69
+ }
70
+
package/models/Block.ts CHANGED
@@ -38,6 +38,12 @@ export interface Block {
38
38
  * @memberof Block
39
39
  */
40
40
  height: number;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof Block
45
+ */
46
+ created_at: number;
41
47
  /**
42
48
  *
43
49
  * @type {string}
@@ -112,6 +118,7 @@ export interface Block {
112
118
  export function instanceOfBlock(value: object): value is Block {
113
119
  if (!('commitment' in value) || value['commitment'] === undefined) return false;
114
120
  if (!('height' in value) || value['height'] === undefined) return false;
121
+ if (!('created_at' in value) || value['created_at'] === undefined) return false;
115
122
  if (!('state_root' in value) || value['state_root'] === undefined) return false;
116
123
  if (!('priority_operations' in value) || value['priority_operations'] === undefined) return false;
117
124
  if (!('on_chain_l2_operations' in value) || value['on_chain_l2_operations'] === undefined) return false;
@@ -138,6 +145,7 @@ export function BlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Blo
138
145
 
139
146
  'commitment': json['commitment'],
140
147
  'height': json['height'],
148
+ 'created_at': json['created_at'],
141
149
  'state_root': json['state_root'],
142
150
  'priority_operations': json['priority_operations'],
143
151
  'on_chain_l2_operations': json['on_chain_l2_operations'],
@@ -160,6 +168,7 @@ export function BlockToJSON(value?: Block | null): any {
160
168
 
161
169
  'commitment': value['commitment'],
162
170
  'height': value['height'],
171
+ 'created_at': value['created_at'],
163
172
  'state_root': value['state_root'],
164
173
  'priority_operations': value['priority_operations'],
165
174
  'on_chain_l2_operations': value['on_chain_l2_operations'],
@@ -43,6 +43,12 @@ export interface NotificationPreferences {
43
43
  * @memberof NotificationPreferences
44
44
  */
45
45
  price_alerts_enabled: boolean;
46
+ /**
47
+ *
48
+ * @type {boolean}
49
+ * @memberof NotificationPreferences
50
+ */
51
+ web_price_alerts_enabled: boolean;
46
52
  /**
47
53
  *
48
54
  * @type {boolean}
@@ -89,6 +95,7 @@ export function instanceOfNotificationPreferences(value: object): value is Notif
89
95
  if (!('global_announcements_enabled' in value) || value['global_announcements_enabled'] === undefined) return false;
90
96
  if (!('private_announcements_enabled' in value) || value['private_announcements_enabled'] === undefined) return false;
91
97
  if (!('price_alerts_enabled' in value) || value['price_alerts_enabled'] === undefined) return false;
98
+ if (!('web_price_alerts_enabled' in value) || value['web_price_alerts_enabled'] === undefined) return false;
92
99
  if (!('order_filled_enabled' in value) || value['order_filled_enabled'] === undefined) return false;
93
100
  if (!('cashflow_enabled' in value) || value['cashflow_enabled'] === undefined) return false;
94
101
  if (!('api_key_change_enabled' in value) || value['api_key_change_enabled'] === undefined) return false;
@@ -112,6 +119,7 @@ export function NotificationPreferencesFromJSONTyped(json: any, ignoreDiscrimina
112
119
  'global_announcements_enabled': json['global_announcements_enabled'],
113
120
  'private_announcements_enabled': json['private_announcements_enabled'],
114
121
  'price_alerts_enabled': json['price_alerts_enabled'],
122
+ 'web_price_alerts_enabled': json['web_price_alerts_enabled'],
115
123
  'order_filled_enabled': json['order_filled_enabled'],
116
124
  'cashflow_enabled': json['cashflow_enabled'],
117
125
  'api_key_change_enabled': json['api_key_change_enabled'],
@@ -131,6 +139,7 @@ export function NotificationPreferencesToJSON(value?: NotificationPreferences |
131
139
  'global_announcements_enabled': value['global_announcements_enabled'],
132
140
  'private_announcements_enabled': value['private_announcements_enabled'],
133
141
  'price_alerts_enabled': value['price_alerts_enabled'],
142
+ 'web_price_alerts_enabled': value['web_price_alerts_enabled'],
134
143
  'order_filled_enabled': value['order_filled_enabled'],
135
144
  'cashflow_enabled': value['cashflow_enabled'],
136
145
  'api_key_change_enabled': value['api_key_change_enabled'],
@@ -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 OrderBookLevel
20
+ */
21
+ export interface OrderBookLevel {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof OrderBookLevel
26
+ */
27
+ price: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof OrderBookLevel
32
+ */
33
+ size: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof OrderBookLevel
38
+ */
39
+ orders: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the OrderBookLevel interface.
44
+ */
45
+ export function instanceOfOrderBookLevel(value: object): value is OrderBookLevel {
46
+ if (!('price' in value) || value['price'] === undefined) return false;
47
+ if (!('size' in value) || value['size'] === undefined) return false;
48
+ if (!('orders' in value) || value['orders'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function OrderBookLevelFromJSON(json: any): OrderBookLevel {
53
+ return OrderBookLevelFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function OrderBookLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderBookLevel {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'price': json['price'],
63
+ 'size': json['size'],
64
+ 'orders': json['orders'],
65
+ };
66
+ }
67
+
68
+ export function OrderBookLevelToJSON(value?: OrderBookLevel | null): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+
74
+ 'price': value['price'],
75
+ 'size': value['size'],
76
+ 'orders': value['orders'],
77
+ };
78
+ }
79
+
@@ -13,6 +13,12 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { OrderBookLevel } from './OrderBookLevel';
17
+ import {
18
+ OrderBookLevelFromJSON,
19
+ OrderBookLevelFromJSONTyped,
20
+ OrderBookLevelToJSON,
21
+ } from './OrderBookLevel';
16
22
  import type { SimpleOrder } from './SimpleOrder';
17
23
  import {
18
24
  SimpleOrderFromJSON,
@@ -62,6 +68,24 @@ export interface OrderBookOrders {
62
68
  * @memberof OrderBookOrders
63
69
  */
64
70
  bids: Array<SimpleOrder>;
71
+ /**
72
+ *
73
+ * @type {string}
74
+ * @memberof OrderBookOrders
75
+ */
76
+ group_size: string;
77
+ /**
78
+ *
79
+ * @type {Array<OrderBookLevel>}
80
+ * @memberof OrderBookOrders
81
+ */
82
+ ask_levels: Array<OrderBookLevel>;
83
+ /**
84
+ *
85
+ * @type {Array<OrderBookLevel>}
86
+ * @memberof OrderBookOrders
87
+ */
88
+ bid_levels: Array<OrderBookLevel>;
65
89
  }
66
90
 
67
91
  /**
@@ -73,6 +97,9 @@ export function instanceOfOrderBookOrders(value: object): value is OrderBookOrde
73
97
  if (!('asks' in value) || value['asks'] === undefined) return false;
74
98
  if (!('total_bids' in value) || value['total_bids'] === undefined) return false;
75
99
  if (!('bids' in value) || value['bids'] === undefined) return false;
100
+ if (!('group_size' in value) || value['group_size'] === undefined) return false;
101
+ if (!('ask_levels' in value) || value['ask_levels'] === undefined) return false;
102
+ if (!('bid_levels' in value) || value['bid_levels'] === undefined) return false;
76
103
  return true;
77
104
  }
78
105
 
@@ -92,6 +119,9 @@ export function OrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminator: boo
92
119
  'asks': ((json['asks'] as Array<any>).map(SimpleOrderFromJSON)),
93
120
  'total_bids': json['total_bids'],
94
121
  'bids': ((json['bids'] as Array<any>).map(SimpleOrderFromJSON)),
122
+ 'group_size': json['group_size'],
123
+ 'ask_levels': ((json['ask_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
124
+ 'bid_levels': ((json['bid_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
95
125
  };
96
126
  }
97
127
 
@@ -107,6 +137,9 @@ export function OrderBookOrdersToJSON(value?: OrderBookOrders | null): any {
107
137
  'asks': ((value['asks'] as Array<any>).map(SimpleOrderToJSON)),
108
138
  'total_bids': value['total_bids'],
109
139
  'bids': ((value['bids'] as Array<any>).map(SimpleOrderToJSON)),
140
+ 'group_size': value['group_size'],
141
+ 'ask_levels': ((value['ask_levels'] as Array<any>).map(OrderBookLevelToJSON)),
142
+ 'bid_levels': ((value['bid_levels'] as Array<any>).map(OrderBookLevelToJSON)),
110
143
  };
111
144
  }
112
145
 
@@ -37,6 +37,12 @@ export interface ReferralCode {
37
37
  * @memberof ReferralCode
38
38
  */
39
39
  referral_code: string;
40
+ /**
41
+ * the one-time change was used: referral/update rejects another one
42
+ * @type {boolean}
43
+ * @memberof ReferralCode
44
+ */
45
+ code_updated: boolean;
40
46
  }
41
47
 
42
48
  /**
@@ -45,6 +51,7 @@ export interface ReferralCode {
45
51
  export function instanceOfReferralCode(value: object): value is ReferralCode {
46
52
  if (!('code' in value) || value['code'] === undefined) return false;
47
53
  if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
54
+ if (!('code_updated' in value) || value['code_updated'] === undefined) return false;
48
55
  return true;
49
56
  }
50
57
 
@@ -61,6 +68,7 @@ export function ReferralCodeFromJSONTyped(json: any, ignoreDiscriminator: boolea
61
68
  'code': json['code'],
62
69
  'message': json['message'] == null ? undefined : json['message'],
63
70
  'referral_code': json['referral_code'],
71
+ 'code_updated': json['code_updated'],
64
72
  };
65
73
  }
66
74
 
@@ -73,6 +81,7 @@ export function ReferralCodeToJSON(value?: ReferralCode | null): any {
73
81
  'code': value['code'],
74
82
  'message': value['message'],
75
83
  'referral_code': value['referral_code'],
84
+ 'code_updated': value['code_updated'],
76
85
  };
77
86
  }
78
87
 
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
19
19
  * @interface ReqGetAccountApiKeys
20
20
  */
21
21
  export interface ReqGetAccountApiKeys {
22
+ /**
23
+ * made optional to support header auth clients
24
+ * @type {string}
25
+ * @memberof ReqGetAccountApiKeys
26
+ */
27
+ auth?: string;
22
28
  /**
23
29
  *
24
30
  * @type {number}
@@ -51,6 +57,7 @@ export function ReqGetAccountApiKeysFromJSONTyped(json: any, ignoreDiscriminator
51
57
  }
52
58
  return {
53
59
 
60
+ 'auth': json['auth'] == null ? undefined : json['auth'],
54
61
  'account_index': json['account_index'],
55
62
  'api_key_index': json['api_key_index'] == null ? undefined : json['api_key_index'],
56
63
  };
@@ -62,6 +69,7 @@ export function ReqGetAccountApiKeysToJSON(value?: ReqGetAccountApiKeys | null):
62
69
  }
63
70
  return {
64
71
 
72
+ 'auth': value['auth'],
65
73
  'account_index': value['account_index'],
66
74
  'api_key_index': value['api_key_index'],
67
75
  };
@@ -31,6 +31,18 @@ export interface ReqGetOrderBookOrders {
31
31
  * @memberof ReqGetOrderBookOrders
32
32
  */
33
33
  limit: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof ReqGetOrderBookOrders
38
+ */
39
+ n_sig_figs?: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof ReqGetOrderBookOrders
44
+ */
45
+ mantissa?: number;
34
46
  }
35
47
 
36
48
  /**
@@ -54,6 +66,8 @@ export function ReqGetOrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminato
54
66
 
55
67
  'market_id': json['market_id'],
56
68
  'limit': json['limit'],
69
+ 'n_sig_figs': json['n_sig_figs'] == null ? undefined : json['n_sig_figs'],
70
+ 'mantissa': json['mantissa'] == null ? undefined : json['mantissa'],
57
71
  };
58
72
  }
59
73
 
@@ -65,6 +79,8 @@ export function ReqGetOrderBookOrdersToJSON(value?: ReqGetOrderBookOrders | null
65
79
 
66
80
  'market_id': value['market_id'],
67
81
  'limit': value['limit'],
82
+ 'n_sig_figs': value['n_sig_figs'],
83
+ 'mantissa': value['mantissa'],
68
84
  };
69
85
  }
70
86
 
@@ -149,6 +149,7 @@ export type ReqGetTradesSortByEnum = typeof ReqGetTradesSortByEnum[keyof typeof
149
149
  * @export
150
150
  */
151
151
  export const ReqGetTradesSortDirEnum = {
152
+ Asc: 'asc',
152
153
  Desc: 'desc'
153
154
  } as const;
154
155
  export type ReqGetTradesSortDirEnum = typeof ReqGetTradesSortDirEnum[keyof typeof ReqGetTradesSortDirEnum];
@@ -56,12 +56,6 @@ export interface UserReferrals {
56
56
  * @memberof UserReferrals
57
57
  */
58
58
  used_code: string;
59
- /**
60
- *
61
- * @type {boolean}
62
- * @memberof UserReferrals
63
- */
64
- used_code_eligible: boolean;
65
59
  /**
66
60
  * the caller's L1 is not excluded from the referee rebate, bound yet or not; doesn't check whether a binding would be accepted
67
61
  * @type {boolean}
@@ -89,7 +83,6 @@ export function instanceOfUserReferrals(value: object): value is UserReferrals {
89
83
  if (!('code' in value) || value['code'] === undefined) return false;
90
84
  if (!('cursor' in value) || value['cursor'] === undefined) return false;
91
85
  if (!('used_code' in value) || value['used_code'] === undefined) return false;
92
- if (!('used_code_eligible' in value) || value['used_code_eligible'] === undefined) return false;
93
86
  if (!('l1_eligible' in value) || value['l1_eligible'] === undefined) return false;
94
87
  if (!('totals' in value) || value['totals'] === undefined) return false;
95
88
  if (!('referrals' in value) || value['referrals'] === undefined) return false;
@@ -110,7 +103,6 @@ export function UserReferralsFromJSONTyped(json: any, ignoreDiscriminator: boole
110
103
  'message': json['message'] == null ? undefined : json['message'],
111
104
  'cursor': json['cursor'],
112
105
  'used_code': json['used_code'],
113
- 'used_code_eligible': json['used_code_eligible'],
114
106
  'l1_eligible': json['l1_eligible'],
115
107
  'totals': ReferralTotalsFromJSON(json['totals']),
116
108
  'referrals': ((json['referrals'] as Array<any>).map(ReferralFromJSON)),
@@ -127,7 +119,6 @@ export function UserReferralsToJSON(value?: UserReferrals | null): any {
127
119
  'message': value['message'],
128
120
  'cursor': value['cursor'],
129
121
  'used_code': value['used_code'],
130
- 'used_code_eligible': value['used_code_eligible'],
131
122
  'l1_eligible': value['l1_eligible'],
132
123
  'totals': ReferralTotalsToJSON(value['totals']),
133
124
  'referrals': ((value['referrals'] as Array<any>).map(ReferralToJSON)),
package/models/index.ts CHANGED
@@ -22,6 +22,8 @@ export * from './Alert';
22
22
  export * from './Announcement';
23
23
  export * from './Announcements';
24
24
  export * from './ApiKey';
25
+ export * from './ApiKeyRestrictions';
26
+ export * from './ApiKeySeries';
25
27
  export * from './ApiToken';
26
28
  export * from './ApprovedIntegrator';
27
29
  export * from './Asset';
@@ -123,6 +125,7 @@ export * from './OrderBook';
123
125
  export * from './OrderBookDepth';
124
126
  export * from './OrderBookDepthWithBeginNonce';
125
127
  export * from './OrderBookDetails';
128
+ export * from './OrderBookLevel';
126
129
  export * from './OrderBookOrders';
127
130
  export * from './OrderBookStats';
128
131
  export * from './OrderBooks';
package/openapi.json CHANGED
@@ -911,6 +911,20 @@
911
911
  }
912
912
  },
913
913
  "parameters": [
914
+ {
915
+ "name": "authorization",
916
+ "description": " make required after integ is done",
917
+ "in": "query",
918
+ "required": false,
919
+ "type": "string"
920
+ },
921
+ {
922
+ "name": "auth",
923
+ "description": " made optional to support header auth clients",
924
+ "in": "query",
925
+ "required": false,
926
+ "type": "string"
927
+ },
914
928
  {
915
929
  "name": "account_index",
916
930
  "in": "query",
@@ -933,7 +947,7 @@
933
947
  "consumes": [
934
948
  "multipart/form-data"
935
949
  ],
936
- "description": "Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account."
950
+ "description": "Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account. Restrictions are returned only with auth for the account."
937
951
  }
938
952
  },
939
953
  "/api/v1/assetDetails": {
@@ -5386,6 +5400,20 @@
5386
5400
  "format": "int64",
5387
5401
  "minimum": 1,
5388
5402
  "maximum": 250
5403
+ },
5404
+ {
5405
+ "name": "n_sig_figs",
5406
+ "in": "query",
5407
+ "required": false,
5408
+ "type": "integer",
5409
+ "format": "uint8"
5410
+ },
5411
+ {
5412
+ "name": "mantissa",
5413
+ "in": "query",
5414
+ "required": false,
5415
+ "type": "integer",
5416
+ "format": "uint8"
5389
5417
  }
5390
5418
  ],
5391
5419
  "tags": [
@@ -7114,6 +7142,43 @@
7114
7142
  "description": "Set account metadata"
7115
7143
  }
7116
7144
  },
7145
+ "/api/v1/setApiKeyRestrictions": {
7146
+ "post": {
7147
+ "summary": "setApiKeyRestrictions",
7148
+ "operationId": "setApiKeyRestrictions",
7149
+ "responses": {
7150
+ "200": {
7151
+ "description": "A successful response.",
7152
+ "schema": {
7153
+ "$ref": "#/definitions/ResultCode"
7154
+ }
7155
+ },
7156
+ "400": {
7157
+ "description": "Bad request",
7158
+ "schema": {
7159
+ "$ref": "#/definitions/ResultCode"
7160
+ }
7161
+ }
7162
+ },
7163
+ "parameters": [
7164
+ {
7165
+ "name": "body",
7166
+ "in": "body",
7167
+ "required": true,
7168
+ "schema": {
7169
+ "$ref": "#/definitions/ReqSetApiKeyRestrictions"
7170
+ }
7171
+ }
7172
+ ],
7173
+ "tags": [
7174
+ "account"
7175
+ ],
7176
+ "consumes": [
7177
+ "multipart/form-data"
7178
+ ],
7179
+ "description": "Replace an API key's restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key's public key. The account's L1 wallet personal_signs these lines: 'Set API Key Restrictions', a blank line, 'account index: N', 'api key index: N', 'pubkey: 0x<public_key>', 'market ids: <market_ids>', 'series: <series>', 'allowed ips: <allowed_ips>', 'valid until: N', 'timestamp: N', 'chainId: N', 'Only sign this message for a trusted client!'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as []."
7180
+ }
7181
+ },
7117
7182
  "/api/v1/setMakerOnlyApiKeys": {
7118
7183
  "post": {
7119
7184
  "summary": "setMakerOnlyApiKeys",
@@ -7612,6 +7677,7 @@
7612
7677
  "required": false,
7613
7678
  "type": "string",
7614
7679
  "enum": [
7680
+ "asc",
7615
7681
  "desc"
7616
7682
  ],
7617
7683
  "default": "desc"
@@ -9671,6 +9737,11 @@
9671
9737
  "format": "int64",
9672
9738
  "example": "722"
9673
9739
  },
9740
+ "key_type": {
9741
+ "type": "integer",
9742
+ "format": "uint8",
9743
+ "example": "0"
9744
+ },
9674
9745
  "public_key": {
9675
9746
  "type": "string"
9676
9747
  },
@@ -9678,6 +9749,10 @@
9678
9749
  "type": "integer",
9679
9750
  "format": "int64",
9680
9751
  "example": "1257894000000000"
9752
+ },
9753
+ "restrictions": {
9754
+ "$ref": "#/definitions/ApiKeyRestrictions",
9755
+ "description": " only returned with auth for the account"
9681
9756
  }
9682
9757
  },
9683
9758
  "title": "ApiKey",
@@ -9685,8 +9760,69 @@
9685
9760
  "account_index",
9686
9761
  "api_key_index",
9687
9762
  "nonce",
9763
+ "key_type",
9688
9764
  "public_key",
9689
- "transaction_time"
9765
+ "transaction_time",
9766
+ "restrictions"
9767
+ ]
9768
+ },
9769
+ "ApiKeyRestrictions": {
9770
+ "type": "object",
9771
+ "properties": {
9772
+ "market_ids": {
9773
+ "type": "array",
9774
+ "items": {
9775
+ "type": "integer",
9776
+ "format": "int64"
9777
+ },
9778
+ "description": " markets this key may trade; with series also empty, allows all"
9779
+ },
9780
+ "series": {
9781
+ "type": "array",
9782
+ "items": {
9783
+ "$ref": "#/definitions/ApiKeySeries"
9784
+ },
9785
+ "description": " binary options series this key may trade, in addition to market_ids"
9786
+ },
9787
+ "allowed_ips": {
9788
+ "type": "array",
9789
+ "items": {
9790
+ "type": "string"
9791
+ },
9792
+ "description": " IP addresses this key may send from; empty allows all"
9793
+ },
9794
+ "valid_until": {
9795
+ "type": "integer",
9796
+ "format": "int64",
9797
+ "example": "0",
9798
+ "description": " unix seconds when the key expires; 0 means never"
9799
+ }
9800
+ },
9801
+ "title": "ApiKeyRestrictions",
9802
+ "required": [
9803
+ "market_ids",
9804
+ "series",
9805
+ "allowed_ips",
9806
+ "valid_until"
9807
+ ]
9808
+ },
9809
+ "ApiKeySeries": {
9810
+ "type": "object",
9811
+ "properties": {
9812
+ "creator_account_index": {
9813
+ "type": "integer",
9814
+ "format": "int64",
9815
+ "example": "3"
9816
+ },
9817
+ "tag": {
9818
+ "type": "string",
9819
+ "example": "btc-updown-5m"
9820
+ }
9821
+ },
9822
+ "title": "ApiKeySeries",
9823
+ "required": [
9824
+ "creator_account_index",
9825
+ "tag"
9690
9826
  ]
9691
9827
  },
9692
9828
  "ApiToken": {
@@ -10433,6 +10569,10 @@
10433
10569
  "type": "integer",
10434
10570
  "format": "int64"
10435
10571
  },
10572
+ "created_at": {
10573
+ "type": "integer",
10574
+ "format": "int64"
10575
+ },
10436
10576
  "state_root": {
10437
10577
  "type": "string"
10438
10578
  },
@@ -10480,6 +10620,7 @@
10480
10620
  "required": [
10481
10621
  "commitment",
10482
10622
  "height",
10623
+ "created_at",
10483
10624
  "state_root",
10484
10625
  "priority_operations",
10485
10626
  "on_chain_l2_operations",
@@ -14200,6 +14341,10 @@
14200
14341
  "type": "boolean",
14201
14342
  "format": "boolean"
14202
14343
  },
14344
+ "web_price_alerts_enabled": {
14345
+ "type": "boolean",
14346
+ "format": "boolean"
14347
+ },
14203
14348
  "order_filled_enabled": {
14204
14349
  "type": "boolean",
14205
14350
  "format": "boolean"
@@ -14231,6 +14376,7 @@
14231
14376
  "global_announcements_enabled",
14232
14377
  "private_announcements_enabled",
14233
14378
  "price_alerts_enabled",
14379
+ "web_price_alerts_enabled",
14234
14380
  "order_filled_enabled",
14235
14381
  "cashflow_enabled",
14236
14382
  "api_key_change_enabled",
@@ -14869,6 +15015,30 @@
14869
15015
  "spot_order_book_details"
14870
15016
  ]
14871
15017
  },
15018
+ "OrderBookLevel": {
15019
+ "type": "object",
15020
+ "properties": {
15021
+ "price": {
15022
+ "type": "string",
15023
+ "example": "74890.0"
15024
+ },
15025
+ "size": {
15026
+ "type": "string",
15027
+ "example": "3.21500"
15028
+ },
15029
+ "orders": {
15030
+ "type": "integer",
15031
+ "format": "int64",
15032
+ "example": "14"
15033
+ }
15034
+ },
15035
+ "title": "OrderBookLevel",
15036
+ "required": [
15037
+ "price",
15038
+ "size",
15039
+ "orders"
15040
+ ]
15041
+ },
14872
15042
  "OrderBookOrders": {
14873
15043
  "type": "object",
14874
15044
  "properties": {
@@ -14901,6 +15071,21 @@
14901
15071
  "items": {
14902
15072
  "$ref": "#/definitions/SimpleOrder"
14903
15073
  }
15074
+ },
15075
+ "group_size": {
15076
+ "type": "string"
15077
+ },
15078
+ "ask_levels": {
15079
+ "type": "array",
15080
+ "items": {
15081
+ "$ref": "#/definitions/OrderBookLevel"
15082
+ }
15083
+ },
15084
+ "bid_levels": {
15085
+ "type": "array",
15086
+ "items": {
15087
+ "$ref": "#/definitions/OrderBookLevel"
15088
+ }
14904
15089
  }
14905
15090
  },
14906
15091
  "title": "OrderBookOrders",
@@ -14909,7 +15094,10 @@
14909
15094
  "total_asks",
14910
15095
  "asks",
14911
15096
  "total_bids",
14912
- "bids"
15097
+ "bids",
15098
+ "group_size",
15099
+ "ask_levels",
15100
+ "bid_levels"
14913
15101
  ]
14914
15102
  },
14915
15103
  "OrderBookStats": {
@@ -17044,12 +17232,19 @@
17044
17232
  "referral_code": {
17045
17233
  "type": "string",
17046
17234
  "example": "5V24K3MJ"
17235
+ },
17236
+ "code_updated": {
17237
+ "type": "boolean",
17238
+ "format": "boolean",
17239
+ "example": "false",
17240
+ "description": " the one-time change was used: referral/update rejects another one"
17047
17241
  }
17048
17242
  },
17049
17243
  "title": "ReferralCode",
17050
17244
  "required": [
17051
17245
  "code",
17052
- "referral_code"
17246
+ "referral_code",
17247
+ "code_updated"
17053
17248
  ]
17054
17249
  },
17055
17250
  "ReferralPointEntry": {
@@ -17931,6 +18126,10 @@
17931
18126
  "ReqGetAccountApiKeys": {
17932
18127
  "type": "object",
17933
18128
  "properties": {
18129
+ "auth": {
18130
+ "type": "string",
18131
+ "description": " made optional to support header auth clients"
18132
+ },
17934
18133
  "account_index": {
17935
18134
  "type": "integer",
17936
18135
  "format": "int64"
@@ -19303,6 +19502,14 @@
19303
19502
  "format": "int64",
19304
19503
  "maximum": 250,
19305
19504
  "minimum": 1
19505
+ },
19506
+ "n_sig_figs": {
19507
+ "type": "integer",
19508
+ "format": "uint8"
19509
+ },
19510
+ "mantissa": {
19511
+ "type": "integer",
19512
+ "format": "uint8"
19306
19513
  }
19307
19514
  },
19308
19515
  "title": "ReqGetOrderBookOrders",
@@ -19842,6 +20049,7 @@
19842
20049
  "sort_dir": {
19843
20050
  "type": "string",
19844
20051
  "enum": [
20052
+ "asc",
19845
20053
  "desc"
19846
20054
  ],
19847
20055
  "default": "desc"
@@ -20801,6 +21009,59 @@
20801
21009
  "metadata"
20802
21010
  ]
20803
21011
  },
21012
+ "ReqSetApiKeyRestrictions": {
21013
+ "type": "object",
21014
+ "properties": {
21015
+ "account_index": {
21016
+ "type": "integer",
21017
+ "format": "int64"
21018
+ },
21019
+ "api_key_index": {
21020
+ "type": "integer",
21021
+ "format": "uint8"
21022
+ },
21023
+ "public_key": {
21024
+ "type": "string",
21025
+ "description": " hex public key the restrictions apply to, without 0x"
21026
+ },
21027
+ "market_ids": {
21028
+ "type": "string",
21029
+ "description": " JSON array of up to 16 market ids, e.g. \"[0,1]\"; \"[]\" with no series allows all"
21030
+ },
21031
+ "series": {
21032
+ "type": "string",
21033
+ "description": " JSON array of up to 16 {\"creator_account_index\", \"tag\"} event series, e.g. btc-updown-5m"
21034
+ },
21035
+ "allowed_ips": {
21036
+ "type": "string",
21037
+ "description": " JSON array of up to 16 IP addresses, e.g. \"[\\\"203.0.113.7\\\"]\"; empty allows all"
21038
+ },
21039
+ "valid_until": {
21040
+ "type": "integer",
21041
+ "format": "int64",
21042
+ "description": " unix seconds, at most 180 days ahead; 0 means no expiry"
21043
+ },
21044
+ "timestamp": {
21045
+ "type": "integer",
21046
+ "format": "int64",
21047
+ "description": " unix seconds when signed; must be recent and newer than the last update"
21048
+ },
21049
+ "signature": {
21050
+ "type": "string",
21051
+ "description": " L1 signature of the account owner over TemplateApiKeyRestrictions"
21052
+ }
21053
+ },
21054
+ "title": "ReqSetApiKeyRestrictions",
21055
+ "required": [
21056
+ "account_index",
21057
+ "api_key_index",
21058
+ "public_key",
21059
+ "market_ids",
21060
+ "valid_until",
21061
+ "timestamp",
21062
+ "signature"
21063
+ ]
21064
+ },
20804
21065
  "ReqSetMakerOnlyApiKeys": {
20805
21066
  "type": "object",
20806
21067
  "properties": {
@@ -25937,10 +26198,6 @@
25937
26198
  "used_code": {
25938
26199
  "type": "string"
25939
26200
  },
25940
- "used_code_eligible": {
25941
- "type": "boolean",
25942
- "format": "boolean"
25943
- },
25944
26201
  "l1_eligible": {
25945
26202
  "type": "boolean",
25946
26203
  "format": "boolean",
@@ -25961,7 +26218,6 @@
25961
26218
  "code",
25962
26219
  "cursor",
25963
26220
  "used_code",
25964
- "used_code_eligible",
25965
26221
  "l1_eligible",
25966
26222
  "totals",
25967
26223
  "referrals"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.360",
3
+ "version": "1.0.362",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {
@@ -1,6 +0,0 @@
1
- # Supply-chain checks (age, malware, known vulnerabilities) over every lockfile on each PR.
2
- name: pkg-guard
3
- on: [pull_request]
4
- jobs:
5
- supply-chain-check:
6
- uses: elliottech/pkg-guard/.github/workflows/supply-chain-check.yml@main