zklighter-perps 1.0.285 → 1.0.286

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,6 +9,7 @@ apis/FundingApi.ts
9
9
  apis/GeckoApi.ts
10
10
  apis/GeoApi.ts
11
11
  apis/InfoApi.ts
12
+ apis/LivepointsApi.ts
12
13
  apis/MarketnewsApi.ts
13
14
  apis/NotificationApi.ts
14
15
  apis/OrderApi.ts
@@ -92,6 +93,7 @@ models/LiqTrade.ts
92
93
  models/Liquidation.ts
93
94
  models/LiquidationInfo.ts
94
95
  models/LiquidationInfos.ts
96
+ models/LivePointsTotal.ts
95
97
  models/MarkPriceCandle.ts
96
98
  models/MarkPriceCandles.ts
97
99
  models/MarketConfig.ts
@@ -168,6 +170,7 @@ models/ReqGetLatestDeposit.ts
168
170
  models/ReqGetLeaderboard.ts
169
171
  models/ReqGetLeases.ts
170
172
  models/ReqGetLiquidationInfos.ts
173
+ models/ReqGetLivePointsTotal.ts
171
174
  models/ReqGetMakerOnlyApiKeys.ts
172
175
  models/ReqGetMarkPriceCandles.ts
173
176
  models/ReqGetMarketMetrics.ts
@@ -0,0 +1,86 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ LivePointsTotal,
19
+ ResultCode,
20
+ } from '../models/index';
21
+ import {
22
+ LivePointsTotalFromJSON,
23
+ LivePointsTotalToJSON,
24
+ ResultCodeFromJSON,
25
+ ResultCodeToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface LivePointsTotalRequest {
29
+ account_index: number;
30
+ authorization?: string;
31
+ auth?: string;
32
+ }
33
+
34
+ /**
35
+ *
36
+ */
37
+ export class LivepointsApi extends runtime.BaseAPI {
38
+
39
+ /**
40
+ * Get RH live points total for an account
41
+ * livePoints_total
42
+ */
43
+ async livePointsTotalRaw(requestParameters: LivePointsTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LivePointsTotal>> {
44
+ if (requestParameters['account_index'] == null) {
45
+ throw new runtime.RequiredError(
46
+ 'account_index',
47
+ 'Required parameter "account_index" was null or undefined when calling livePointsTotal().'
48
+ );
49
+ }
50
+
51
+ const queryParameters: any = {};
52
+
53
+ if (requestParameters['authorization'] != null) {
54
+ queryParameters['authorization'] = requestParameters['authorization'];
55
+ }
56
+
57
+ if (requestParameters['auth'] != null) {
58
+ queryParameters['auth'] = requestParameters['auth'];
59
+ }
60
+
61
+ if (requestParameters['account_index'] != null) {
62
+ queryParameters['account_index'] = requestParameters['account_index'];
63
+ }
64
+
65
+ const headerParameters: runtime.HTTPHeaders = {};
66
+
67
+ const response = await this.request({
68
+ path: `/api/v1/livePoints/total`,
69
+ method: 'GET',
70
+ headers: headerParameters,
71
+ query: queryParameters,
72
+ }, initOverrides);
73
+
74
+ return new runtime.JSONApiResponse(response, (jsonValue) => LivePointsTotalFromJSON(jsonValue));
75
+ }
76
+
77
+ /**
78
+ * Get RH live points total for an account
79
+ * livePoints_total
80
+ */
81
+ async livePointsTotal(requestParameters: LivePointsTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LivePointsTotal> {
82
+ const response = await this.livePointsTotalRaw(requestParameters, initOverrides);
83
+ return await response.value();
84
+ }
85
+
86
+ }
package/apis/index.ts CHANGED
@@ -11,6 +11,7 @@ export * from './FundingApi';
11
11
  export * from './GeckoApi';
12
12
  export * from './GeoApi';
13
13
  export * from './InfoApi';
14
+ export * from './LivepointsApi';
14
15
  export * from './MarketnewsApi';
15
16
  export * from './NotificationApi';
16
17
  export * from './OrderApi';
@@ -68,12 +68,6 @@ export interface AccountMetadata {
68
68
  * @memberof AccountMetadata
69
69
  */
70
70
  can_rfq_market_ids: Array<string>;
71
- /**
72
- *
73
- * @type {boolean}
74
- * @memberof AccountMetadata
75
- */
76
- agent_enabled: boolean;
77
71
  /**
78
72
  *
79
73
  * @type {number}
@@ -99,7 +93,6 @@ export function instanceOfAccountMetadata(value: object): value is AccountMetada
99
93
  if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
100
94
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
101
95
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
102
- if (!('agent_enabled' in value) || value['agent_enabled'] === undefined) return false;
103
96
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
104
97
  if (!('metadata' in value) || value['metadata'] === undefined) return false;
105
98
  return true;
@@ -122,7 +115,6 @@ export function AccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boo
122
115
  'referral_points_percentage': json['referral_points_percentage'],
123
116
  'can_rfq': json['can_rfq'],
124
117
  'can_rfq_market_ids': json['can_rfq_market_ids'],
125
- 'agent_enabled': json['agent_enabled'],
126
118
  'created_at': json['created_at'],
127
119
  'metadata': SubAccountMetadataFromJSON(json['metadata']),
128
120
  };
@@ -141,7 +133,6 @@ export function AccountMetadataToJSON(value?: AccountMetadata | null): any {
141
133
  'referral_points_percentage': value['referral_points_percentage'],
142
134
  'can_rfq': value['can_rfq'],
143
135
  'can_rfq_market_ids': value['can_rfq_market_ids'],
144
- 'agent_enabled': value['agent_enabled'],
145
136
  'created_at': value['created_at'],
146
137
  'metadata': SubAccountMetadataToJSON(value['metadata']),
147
138
  };
@@ -188,12 +188,6 @@ export interface DetailedAccount {
188
188
  * @memberof DetailedAccount
189
189
  */
190
190
  can_rfq_market_ids: Array<string>;
191
- /**
192
- *
193
- * @type {boolean}
194
- * @memberof DetailedAccount
195
- */
196
- agent_enabled: boolean;
197
191
  /**
198
192
  *
199
193
  * @type {number}
@@ -291,7 +285,6 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
291
285
  if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
292
286
  if (!('can_rfq' in value) || value['can_rfq'] === undefined) return false;
293
287
  if (!('can_rfq_market_ids' in value) || value['can_rfq_market_ids'] === undefined) return false;
294
- if (!('agent_enabled' in value) || value['agent_enabled'] === undefined) return false;
295
288
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
296
289
  if (!('metadata' in value) || value['metadata'] === undefined) return false;
297
290
  if (!('positions' in value) || value['positions'] === undefined) return false;
@@ -336,7 +329,6 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
336
329
  'referral_points_percentage': json['referral_points_percentage'],
337
330
  'can_rfq': json['can_rfq'],
338
331
  'can_rfq_market_ids': json['can_rfq_market_ids'],
339
- 'agent_enabled': json['agent_enabled'],
340
332
  'created_at': json['created_at'],
341
333
  'metadata': SubAccountMetadataFromJSON(json['metadata']),
342
334
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
@@ -379,7 +371,6 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
379
371
  'referral_points_percentage': value['referral_points_percentage'],
380
372
  'can_rfq': value['can_rfq'],
381
373
  'can_rfq_market_ids': value['can_rfq_market_ids'],
382
- 'agent_enabled': value['agent_enabled'],
383
374
  'created_at': value['created_at'],
384
375
  'metadata': SubAccountMetadataToJSON(value['metadata']),
385
376
  'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
@@ -0,0 +1,78 @@
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 LivePointsTotal
20
+ */
21
+ export interface LivePointsTotal {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof LivePointsTotal
26
+ */
27
+ code: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof LivePointsTotal
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof LivePointsTotal
38
+ */
39
+ total_live_points: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the LivePointsTotal interface.
44
+ */
45
+ export function instanceOfLivePointsTotal(value: object): value is LivePointsTotal {
46
+ if (!('code' in value) || value['code'] === undefined) return false;
47
+ if (!('total_live_points' in value) || value['total_live_points'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function LivePointsTotalFromJSON(json: any): LivePointsTotal {
52
+ return LivePointsTotalFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function LivePointsTotalFromJSONTyped(json: any, ignoreDiscriminator: boolean): LivePointsTotal {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'code': json['code'],
62
+ 'message': json['message'] == null ? undefined : json['message'],
63
+ 'total_live_points': json['total_live_points'],
64
+ };
65
+ }
66
+
67
+ export function LivePointsTotalToJSON(value?: LivePointsTotal | null): any {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+
73
+ 'code': value['code'],
74
+ 'message': value['message'],
75
+ 'total_live_points': value['total_live_points'],
76
+ };
77
+ }
78
+
@@ -0,0 +1,69 @@
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 ReqGetLivePointsTotal
20
+ */
21
+ export interface ReqGetLivePointsTotal {
22
+ /**
23
+ * made optional to support header auth clients
24
+ * @type {string}
25
+ * @memberof ReqGetLivePointsTotal
26
+ */
27
+ auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetLivePointsTotal
32
+ */
33
+ account_index: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ReqGetLivePointsTotal interface.
38
+ */
39
+ export function instanceOfReqGetLivePointsTotal(value: object): value is ReqGetLivePointsTotal {
40
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ReqGetLivePointsTotalFromJSON(json: any): ReqGetLivePointsTotal {
45
+ return ReqGetLivePointsTotalFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ReqGetLivePointsTotalFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetLivePointsTotal {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'auth': json['auth'] == null ? undefined : json['auth'],
55
+ 'account_index': json['account_index'],
56
+ };
57
+ }
58
+
59
+ export function ReqGetLivePointsTotalToJSON(value?: ReqGetLivePointsTotal | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'auth': value['auth'],
66
+ 'account_index': value['account_index'],
67
+ };
68
+ }
69
+
package/models/index.ts CHANGED
@@ -71,6 +71,7 @@ export * from './LiqTrade';
71
71
  export * from './Liquidation';
72
72
  export * from './LiquidationInfo';
73
73
  export * from './LiquidationInfos';
74
+ export * from './LivePointsTotal';
74
75
  export * from './MarkPriceCandle';
75
76
  export * from './MarkPriceCandles';
76
77
  export * from './MarketConfig';
@@ -147,6 +148,7 @@ export * from './ReqGetLatestDeposit';
147
148
  export * from './ReqGetLeaderboard';
148
149
  export * from './ReqGetLeases';
149
150
  export * from './ReqGetLiquidationInfos';
151
+ export * from './ReqGetLivePointsTotal';
150
152
  export * from './ReqGetMakerOnlyApiKeys';
151
153
  export * from './ReqGetMarkPriceCandles';
152
154
  export * from './ReqGetMarketMetrics';
package/openapi.json CHANGED
@@ -2696,6 +2696,56 @@
2696
2696
  "description": "Submit LIT lease transfer"
2697
2697
  }
2698
2698
  },
2699
+ "/api/v1/livePoints/total": {
2700
+ "get": {
2701
+ "summary": "livePoints_total",
2702
+ "operationId": "livePoints_total",
2703
+ "responses": {
2704
+ "200": {
2705
+ "description": "A successful response.",
2706
+ "schema": {
2707
+ "$ref": "#/definitions/LivePointsTotal"
2708
+ }
2709
+ },
2710
+ "400": {
2711
+ "description": "Bad request",
2712
+ "schema": {
2713
+ "$ref": "#/definitions/ResultCode"
2714
+ }
2715
+ }
2716
+ },
2717
+ "parameters": [
2718
+ {
2719
+ "name": "authorization",
2720
+ "description": " make required after integ is done",
2721
+ "in": "query",
2722
+ "required": false,
2723
+ "type": "string"
2724
+ },
2725
+ {
2726
+ "name": "auth",
2727
+ "description": " made optional to support header auth clients",
2728
+ "in": "query",
2729
+ "required": false,
2730
+ "type": "string"
2731
+ },
2732
+ {
2733
+ "name": "account_index",
2734
+ "in": "query",
2735
+ "required": true,
2736
+ "type": "integer",
2737
+ "format": "int64"
2738
+ }
2739
+ ],
2740
+ "tags": [
2741
+ "livepoints"
2742
+ ],
2743
+ "consumes": [
2744
+ "multipart/form-data"
2745
+ ],
2746
+ "description": "Get RH live points total for an account"
2747
+ }
2748
+ },
2699
2749
  "/api/v1/markPriceCandles": {
2700
2750
  "get": {
2701
2751
  "summary": "markPriceCandles",
@@ -5900,10 +5950,6 @@
5900
5950
  "type": "string"
5901
5951
  }
5902
5952
  },
5903
- "agent_enabled": {
5904
- "type": "boolean",
5905
- "format": "boolean"
5906
- },
5907
5953
  "created_at": {
5908
5954
  "type": "integer",
5909
5955
  "format": "int64"
@@ -5921,7 +5967,6 @@
5921
5967
  "referral_points_percentage",
5922
5968
  "can_rfq",
5923
5969
  "can_rfq_market_ids",
5924
- "agent_enabled",
5925
5970
  "created_at",
5926
5971
  "metadata"
5927
5972
  ]
@@ -7503,10 +7548,6 @@
7503
7548
  "type": "string"
7504
7549
  }
7505
7550
  },
7506
- "agent_enabled": {
7507
- "type": "boolean",
7508
- "format": "boolean"
7509
- },
7510
7551
  "created_at": {
7511
7552
  "type": "integer",
7512
7553
  "format": "int64"
@@ -7585,7 +7626,6 @@
7585
7626
  "referral_points_percentage",
7586
7627
  "can_rfq",
7587
7628
  "can_rfq_market_ids",
7588
- "agent_enabled",
7589
7629
  "created_at",
7590
7630
  "metadata",
7591
7631
  "positions",
@@ -8632,6 +8672,28 @@
8632
8672
  "liquidations"
8633
8673
  ]
8634
8674
  },
8675
+ "LivePointsTotal": {
8676
+ "type": "object",
8677
+ "properties": {
8678
+ "code": {
8679
+ "type": "integer",
8680
+ "format": "int32",
8681
+ "example": "200"
8682
+ },
8683
+ "message": {
8684
+ "type": "string"
8685
+ },
8686
+ "total_live_points": {
8687
+ "type": "number",
8688
+ "format": "double"
8689
+ }
8690
+ },
8691
+ "title": "LivePointsTotal",
8692
+ "required": [
8693
+ "code",
8694
+ "total_live_points"
8695
+ ]
8696
+ },
8635
8697
  "MarkPriceCandle": {
8636
8698
  "type": "object",
8637
8699
  "properties": {
@@ -12020,6 +12082,23 @@
12020
12082
  "limit"
12021
12083
  ]
12022
12084
  },
12085
+ "ReqGetLivePointsTotal": {
12086
+ "type": "object",
12087
+ "properties": {
12088
+ "auth": {
12089
+ "type": "string",
12090
+ "description": " made optional to support header auth clients"
12091
+ },
12092
+ "account_index": {
12093
+ "type": "integer",
12094
+ "format": "int64"
12095
+ }
12096
+ },
12097
+ "title": "ReqGetLivePointsTotal",
12098
+ "required": [
12099
+ "account_index"
12100
+ ]
12101
+ },
12023
12102
  "ReqGetMakerOnlyApiKeys": {
12024
12103
  "type": "object",
12025
12104
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.285",
3
+ "version": "1.0.286",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {