zklighter-perps 1.0.267 → 1.0.269

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.
@@ -4,6 +4,7 @@ apis/AtomicordersApi.ts
4
4
  apis/BlockApi.ts
5
5
  apis/BridgeApi.ts
6
6
  apis/CandlestickApi.ts
7
+ apis/EarningsApi.ts
7
8
  apis/FundingApi.ts
8
9
  apis/GeckoApi.ts
9
10
  apis/GeoApi.ts
@@ -13,6 +14,7 @@ apis/OrderApi.ts
13
14
  apis/PushnotifApi.ts
14
15
  apis/ReferralApi.ts
15
16
  apis/RootApi.ts
17
+ apis/StockfinancialsApi.ts
16
18
  apis/TokenlistApi.ts
17
19
  apis/TransactionApi.ts
18
20
  apis/index.ts
@@ -133,6 +135,7 @@ models/ReqGetAccountByL1Address.ts
133
135
  models/ReqGetAccountInactiveOrders.ts
134
136
  models/ReqGetAccountLimits.ts
135
137
  models/ReqGetAccountMetadata.ts
138
+ models/ReqGetAccountOrders.ts
136
139
  models/ReqGetAccountPnL.ts
137
140
  models/ReqGetAccountTxs.ts
138
141
  models/ReqGetAirdropAllocations.ts
@@ -175,6 +178,7 @@ models/ReqGetRecentTrades.ts
175
178
  models/ReqGetReferralCode.ts
176
179
  models/ReqGetReferralPoints.ts
177
180
  models/ReqGetRollingInfo.ts
181
+ models/ReqGetStockFinancials.ts
178
182
  models/ReqGetSyntheticSpotInfo.ts
179
183
  models/ReqGetTrades.ts
180
184
  models/ReqGetTransferFeeInfo.ts
@@ -211,6 +215,7 @@ models/RespRollingInfo.ts
211
215
  models/RespSendTx.ts
212
216
  models/RespSendTxBatch.ts
213
217
  models/RespSetMakerOnlyApiKeys.ts
218
+ models/RespStockFinancials.ts
214
219
  models/RespSyntheticSpotInfo.ts
215
220
  models/RespUpdateKickback.ts
216
221
  models/RespUpdateRFQ.ts
@@ -227,6 +232,15 @@ models/SpotAvgEntryPrice.ts
227
232
  models/SpotMarketStats.ts
228
233
  models/SpotOrderBookDetail.ts
229
234
  models/Status.ts
235
+ models/StockBalanceSheet.ts
236
+ models/StockCashFlowStatement.ts
237
+ models/StockFinancial.ts
238
+ models/StockFinancialEarnings.ts
239
+ models/StockFinancialEarningsEvent.ts
240
+ models/StockFinancialPeriod.ts
241
+ models/StockFinancialProfile.ts
242
+ models/StockFinancialStatements.ts
243
+ models/StockIncomeStatement.ts
230
244
  models/Strategy.ts
231
245
  models/SubAccountMetadata.ts
232
246
  models/SubAccounts.ts
@@ -244,6 +258,8 @@ models/Tx.ts
244
258
  models/TxHash.ts
245
259
  models/TxHashes.ts
246
260
  models/Txs.ts
261
+ models/UpcomingEarning.ts
262
+ models/UpcomingEarnings.ts
247
263
  models/UserReferrals.ts
248
264
  models/ValidatorInfo.ts
249
265
  models/WithdrawHistory.ts
@@ -0,0 +1,61 @@
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
+ ResultCode,
19
+ UpcomingEarnings,
20
+ } from '../models/index';
21
+ import {
22
+ ResultCodeFromJSON,
23
+ ResultCodeToJSON,
24
+ UpcomingEarningsFromJSON,
25
+ UpcomingEarningsToJSON,
26
+ } from '../models/index';
27
+
28
+ /**
29
+ *
30
+ */
31
+ export class EarningsApi extends runtime.BaseAPI {
32
+
33
+ /**
34
+ * Get upcoming earnings
35
+ * upcomingEarnings
36
+ */
37
+ async upcomingEarningsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpcomingEarnings>> {
38
+ const queryParameters: any = {};
39
+
40
+ const headerParameters: runtime.HTTPHeaders = {};
41
+
42
+ const response = await this.request({
43
+ path: `/api/v1/upcomingEarnings`,
44
+ method: 'GET',
45
+ headers: headerParameters,
46
+ query: queryParameters,
47
+ }, initOverrides);
48
+
49
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpcomingEarningsFromJSON(jsonValue));
50
+ }
51
+
52
+ /**
53
+ * Get upcoming earnings
54
+ * upcomingEarnings
55
+ */
56
+ async upcomingEarnings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpcomingEarnings> {
57
+ const response = await this.upcomingEarningsRaw(initOverrides);
58
+ return await response.value();
59
+ }
60
+
61
+ }
package/apis/OrderApi.ts CHANGED
@@ -89,6 +89,13 @@ export interface AccountInactiveOrdersRequest {
89
89
  cursor?: string;
90
90
  }
91
91
 
92
+ export interface AccountOrdersRequest {
93
+ client_order_indexes: string;
94
+ authorization?: string;
95
+ auth?: string;
96
+ account_index?: number;
97
+ }
98
+
92
99
  export interface AssetDetailsRequest {
93
100
  asset_id?: number;
94
101
  }
@@ -366,6 +373,57 @@ export class OrderApi extends runtime.BaseAPI {
366
373
  return await response.value();
367
374
  }
368
375
 
376
+ /**
377
+ * Get account orders by client order indexes. Account index defaults to the auth token\'s account.
378
+ * accountOrders
379
+ */
380
+ async accountOrdersRaw(requestParameters: AccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
381
+ if (requestParameters['client_order_indexes'] == null) {
382
+ throw new runtime.RequiredError(
383
+ 'client_order_indexes',
384
+ 'Required parameter "client_order_indexes" was null or undefined when calling accountOrders().'
385
+ );
386
+ }
387
+
388
+ const queryParameters: any = {};
389
+
390
+ if (requestParameters['authorization'] != null) {
391
+ queryParameters['authorization'] = requestParameters['authorization'];
392
+ }
393
+
394
+ if (requestParameters['auth'] != null) {
395
+ queryParameters['auth'] = requestParameters['auth'];
396
+ }
397
+
398
+ if (requestParameters['account_index'] != null) {
399
+ queryParameters['account_index'] = requestParameters['account_index'];
400
+ }
401
+
402
+ if (requestParameters['client_order_indexes'] != null) {
403
+ queryParameters['client_order_indexes'] = requestParameters['client_order_indexes'];
404
+ }
405
+
406
+ const headerParameters: runtime.HTTPHeaders = {};
407
+
408
+ const response = await this.request({
409
+ path: `/api/v1/accountOrders`,
410
+ method: 'GET',
411
+ headers: headerParameters,
412
+ query: queryParameters,
413
+ }, initOverrides);
414
+
415
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrdersFromJSON(jsonValue));
416
+ }
417
+
418
+ /**
419
+ * Get account orders by client order indexes. Account index defaults to the auth token\'s account.
420
+ * accountOrders
421
+ */
422
+ async accountOrders(requestParameters: AccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Orders> {
423
+ const response = await this.accountOrdersRaw(requestParameters, initOverrides);
424
+ return await response.value();
425
+ }
426
+
369
427
  /**
370
428
  * Get asset details
371
429
  * assetDetails
@@ -0,0 +1,76 @@
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
+ RespStockFinancials,
19
+ ResultCode,
20
+ } from '../models/index';
21
+ import {
22
+ RespStockFinancialsFromJSON,
23
+ RespStockFinancialsToJSON,
24
+ ResultCodeFromJSON,
25
+ ResultCodeToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface StockFinancialsRequest {
29
+ market_id: number;
30
+ }
31
+
32
+ /**
33
+ *
34
+ */
35
+ export class StockfinancialsApi extends runtime.BaseAPI {
36
+
37
+ /**
38
+ * Get stock financials
39
+ * stockFinancials
40
+ */
41
+ async stockFinancialsRaw(requestParameters: StockFinancialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespStockFinancials>> {
42
+ if (requestParameters['market_id'] == null) {
43
+ throw new runtime.RequiredError(
44
+ 'market_id',
45
+ 'Required parameter "market_id" was null or undefined when calling stockFinancials().'
46
+ );
47
+ }
48
+
49
+ const queryParameters: any = {};
50
+
51
+ if (requestParameters['market_id'] != null) {
52
+ queryParameters['market_id'] = requestParameters['market_id'];
53
+ }
54
+
55
+ const headerParameters: runtime.HTTPHeaders = {};
56
+
57
+ const response = await this.request({
58
+ path: `/api/v1/stockFinancials`,
59
+ method: 'GET',
60
+ headers: headerParameters,
61
+ query: queryParameters,
62
+ }, initOverrides);
63
+
64
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespStockFinancialsFromJSON(jsonValue));
65
+ }
66
+
67
+ /**
68
+ * Get stock financials
69
+ * stockFinancials
70
+ */
71
+ async stockFinancials(requestParameters: StockFinancialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespStockFinancials> {
72
+ const response = await this.stockFinancialsRaw(requestParameters, initOverrides);
73
+ return await response.value();
74
+ }
75
+
76
+ }
package/apis/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from './AtomicordersApi';
6
6
  export * from './BlockApi';
7
7
  export * from './BridgeApi';
8
8
  export * from './CandlestickApi';
9
+ export * from './EarningsApi';
9
10
  export * from './FundingApi';
10
11
  export * from './GeckoApi';
11
12
  export * from './GeoApi';
@@ -15,5 +16,6 @@ export * from './OrderApi';
15
16
  export * from './PushnotifApi';
16
17
  export * from './ReferralApi';
17
18
  export * from './RootApi';
19
+ export * from './StockfinancialsApi';
18
20
  export * from './TokenlistApi';
19
21
  export * from './TransactionApi';
@@ -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 MarketPriceChart
20
+ */
21
+ export interface MarketPriceChart {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof MarketPriceChart
26
+ */
27
+ market_id: number;
28
+ /**
29
+ *
30
+ * @type {Array<string>}
31
+ * @memberof MarketPriceChart
32
+ */
33
+ prices: Array<string>;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the MarketPriceChart interface.
38
+ */
39
+ export function instanceOfMarketPriceChart(value: object): value is MarketPriceChart {
40
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
41
+ if (!('prices' in value) || value['prices'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function MarketPriceChartFromJSON(json: any): MarketPriceChart {
46
+ return MarketPriceChartFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function MarketPriceChartFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketPriceChart {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'market_id': json['market_id'],
56
+ 'prices': json['prices'],
57
+ };
58
+ }
59
+
60
+ export function MarketPriceChartToJSON(value?: MarketPriceChart | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'market_id': value['market_id'],
67
+ 'prices': value['prices'],
68
+ };
69
+ }
70
+
@@ -0,0 +1,94 @@
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 { MarketPriceChart } from './MarketPriceChart';
17
+ import {
18
+ MarketPriceChartFromJSON,
19
+ MarketPriceChartFromJSONTyped,
20
+ MarketPriceChartToJSON,
21
+ } from './MarketPriceChart';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface MarketPriceCharts
27
+ */
28
+ export interface MarketPriceCharts {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof MarketPriceCharts
33
+ */
34
+ code: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof MarketPriceCharts
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof MarketPriceCharts
45
+ */
46
+ resolution: string;
47
+ /**
48
+ *
49
+ * @type {Array<MarketPriceChart>}
50
+ * @memberof MarketPriceCharts
51
+ */
52
+ price_charts: Array<MarketPriceChart>;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the MarketPriceCharts interface.
57
+ */
58
+ export function instanceOfMarketPriceCharts(value: object): value is MarketPriceCharts {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
60
+ if (!('resolution' in value) || value['resolution'] === undefined) return false;
61
+ if (!('price_charts' in value) || value['price_charts'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function MarketPriceChartsFromJSON(json: any): MarketPriceCharts {
66
+ return MarketPriceChartsFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function MarketPriceChartsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketPriceCharts {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'code': json['code'],
76
+ 'message': json['message'] == null ? undefined : json['message'],
77
+ 'resolution': json['resolution'],
78
+ 'price_charts': ((json['price_charts'] as Array<any>).map(MarketPriceChartFromJSON)),
79
+ };
80
+ }
81
+
82
+ export function MarketPriceChartsToJSON(value?: MarketPriceCharts | null): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+ return {
87
+
88
+ 'code': value['code'],
89
+ 'message': value['message'],
90
+ 'resolution': value['resolution'],
91
+ 'price_charts': ((value['price_charts'] as Array<any>).map(MarketPriceChartToJSON)),
92
+ };
93
+ }
94
+
@@ -20,45 +20,30 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface ReqGetAccountOrders {
22
22
  /**
23
- *
23
+ * made optional to support header auth clients
24
24
  * @type {string}
25
25
  * @memberof ReqGetAccountOrders
26
26
  */
27
- auth: string;
28
- /**
29
- *
30
- * @type {number}
31
- * @memberof ReqGetAccountOrders
32
- */
33
- account_index: number;
27
+ auth?: string;
34
28
  /**
35
29
  *
36
30
  * @type {number}
37
31
  * @memberof ReqGetAccountOrders
38
32
  */
39
- market_id: number;
33
+ account_index?: number;
40
34
  /**
41
- *
35
+ * comma-separated int64s, e.g. "123,456"
42
36
  * @type {string}
43
37
  * @memberof ReqGetAccountOrders
44
38
  */
45
- cursor?: string;
46
- /**
47
- *
48
- * @type {number}
49
- * @memberof ReqGetAccountOrders
50
- */
51
- limit: number;
39
+ client_order_indexes: string;
52
40
  }
53
41
 
54
42
  /**
55
43
  * Check if a given object implements the ReqGetAccountOrders interface.
56
44
  */
57
45
  export function instanceOfReqGetAccountOrders(value: object): value is ReqGetAccountOrders {
58
- if (!('auth' in value) || value['auth'] === undefined) return false;
59
- if (!('account_index' in value) || value['account_index'] === undefined) return false;
60
- if (!('market_id' in value) || value['market_id'] === undefined) return false;
61
- if (!('limit' in value) || value['limit'] === undefined) return false;
46
+ if (!('client_order_indexes' in value) || value['client_order_indexes'] === undefined) return false;
62
47
  return true;
63
48
  }
64
49
 
@@ -72,11 +57,9 @@ export function ReqGetAccountOrdersFromJSONTyped(json: any, ignoreDiscriminator:
72
57
  }
73
58
  return {
74
59
 
75
- 'auth': json['auth'],
76
- 'account_index': json['account_index'],
77
- 'market_id': json['market_id'],
78
- 'cursor': json['cursor'] == null ? undefined : json['cursor'],
79
- 'limit': json['limit'],
60
+ 'auth': json['auth'] == null ? undefined : json['auth'],
61
+ 'account_index': json['account_index'] == null ? undefined : json['account_index'],
62
+ 'client_order_indexes': json['client_order_indexes'],
80
63
  };
81
64
  }
82
65
 
@@ -88,9 +71,7 @@ export function ReqGetAccountOrdersToJSON(value?: ReqGetAccountOrders | null): a
88
71
 
89
72
  'auth': value['auth'],
90
73
  'account_index': value['account_index'],
91
- 'market_id': value['market_id'],
92
- 'cursor': value['cursor'],
93
- 'limit': value['limit'],
74
+ 'client_order_indexes': value['client_order_indexes'],
94
75
  };
95
76
  }
96
77
 
@@ -0,0 +1,60 @@
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 ReqGetMarketPriceCharts
20
+ */
21
+ export interface ReqGetMarketPriceCharts {
22
+ /**
23
+ *
24
+ * @type {Array<number>}
25
+ * @memberof ReqGetMarketPriceCharts
26
+ */
27
+ market_ids?: Array<number>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ReqGetMarketPriceCharts interface.
32
+ */
33
+ export function instanceOfReqGetMarketPriceCharts(value: object): value is ReqGetMarketPriceCharts {
34
+ return true;
35
+ }
36
+
37
+ export function ReqGetMarketPriceChartsFromJSON(json: any): ReqGetMarketPriceCharts {
38
+ return ReqGetMarketPriceChartsFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function ReqGetMarketPriceChartsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetMarketPriceCharts {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'market_ids': json['market_ids'] == null ? undefined : json['market_ids'],
48
+ };
49
+ }
50
+
51
+ export function ReqGetMarketPriceChartsToJSON(value?: ReqGetMarketPriceCharts | null): any {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+
57
+ 'market_ids': value['market_ids'],
58
+ };
59
+ }
60
+
@@ -0,0 +1,61 @@
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 ReqGetStockFinancials
20
+ */
21
+ export interface ReqGetStockFinancials {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetStockFinancials
26
+ */
27
+ market_id: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ReqGetStockFinancials interface.
32
+ */
33
+ export function instanceOfReqGetStockFinancials(value: object): value is ReqGetStockFinancials {
34
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function ReqGetStockFinancialsFromJSON(json: any): ReqGetStockFinancials {
39
+ return ReqGetStockFinancialsFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function ReqGetStockFinancialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetStockFinancials {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'market_id': json['market_id'],
49
+ };
50
+ }
51
+
52
+ export function ReqGetStockFinancialsToJSON(value?: ReqGetStockFinancials | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'market_id': value['market_id'],
59
+ };
60
+ }
61
+