zklighter-perps 1.0.293 → 1.0.295

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.
@@ -88,6 +88,7 @@ export interface ReferralUseRequest {
88
88
  discord?: string;
89
89
  telegram?: string;
90
90
  signature?: string;
91
+ source?: string;
91
92
  }
92
93
 
93
94
  export interface ReferralUserReferralsRequest {
@@ -535,6 +536,10 @@ export class ReferralApi extends runtime.BaseAPI {
535
536
  formParams.append('signature', requestParameters['signature'] as any);
536
537
  }
537
538
 
539
+ if (requestParameters['source'] != null) {
540
+ formParams.append('source', requestParameters['source'] as any);
541
+ }
542
+
538
543
  const response = await this.request({
539
544
  path: `/api/v1/referral/use`,
540
545
  method: 'POST',
@@ -26,7 +26,8 @@ import {
26
26
  } from '../models/index';
27
27
 
28
28
  export interface StockFinancialsRequest {
29
- market_id: number;
29
+ market_id?: number;
30
+ fields?: string;
30
31
  }
31
32
 
32
33
  /**
@@ -35,23 +36,20 @@ export interface StockFinancialsRequest {
35
36
  export class StockfinancialsApi extends runtime.BaseAPI {
36
37
 
37
38
  /**
38
- * Get stock financials
39
+ * Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id.
39
40
  * stockFinancials
40
41
  */
41
42
  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
43
  const queryParameters: any = {};
50
44
 
51
45
  if (requestParameters['market_id'] != null) {
52
46
  queryParameters['market_id'] = requestParameters['market_id'];
53
47
  }
54
48
 
49
+ if (requestParameters['fields'] != null) {
50
+ queryParameters['fields'] = requestParameters['fields'];
51
+ }
52
+
55
53
  const headerParameters: runtime.HTTPHeaders = {};
56
54
 
57
55
  const response = await this.request({
@@ -65,10 +63,10 @@ export class StockfinancialsApi extends runtime.BaseAPI {
65
63
  }
66
64
 
67
65
  /**
68
- * Get stock financials
66
+ * Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id.
69
67
  * stockFinancials
70
68
  */
71
- async stockFinancials(requestParameters: StockFinancialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespStockFinancials> {
69
+ async stockFinancials(requestParameters: StockFinancialsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespStockFinancials> {
72
70
  const response = await this.stockFinancialsRaw(requestParameters, initOverrides);
73
71
  return await response.value();
74
72
  }
@@ -50,6 +50,12 @@ export interface Referral {
50
50
  * @memberof Referral
51
51
  */
52
52
  tier: string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof Referral
57
+ */
58
+ source: string;
53
59
  /**
54
60
  *
55
61
  * @type {TradeStats}
@@ -66,6 +72,7 @@ export function instanceOfReferral(value: object): value is Referral {
66
72
  if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
67
73
  if (!('used_at' in value) || value['used_at'] === undefined) return false;
68
74
  if (!('tier' in value) || value['tier'] === undefined) return false;
75
+ if (!('source' in value) || value['source'] === undefined) return false;
69
76
  if (!('trade_stats' in value) || value['trade_stats'] === undefined) return false;
70
77
  return true;
71
78
  }
@@ -84,6 +91,7 @@ export function ReferralFromJSONTyped(json: any, ignoreDiscriminator: boolean):
84
91
  'referral_code': json['referral_code'],
85
92
  'used_at': json['used_at'],
86
93
  'tier': json['tier'],
94
+ 'source': json['source'],
87
95
  'trade_stats': TradeStatsFromJSON(json['trade_stats']),
88
96
  };
89
97
  }
@@ -98,6 +106,7 @@ export function ReferralToJSON(value?: Referral | null): any {
98
106
  'referral_code': value['referral_code'],
99
107
  'used_at': value['used_at'],
100
108
  'tier': value['tier'],
109
+ 'source': value['source'],
101
110
  'trade_stats': TradeStatsToJSON(value['trade_stats']),
102
111
  };
103
112
  }
@@ -24,14 +24,19 @@ export interface ReqGetStockFinancials {
24
24
  * @type {number}
25
25
  * @memberof ReqGetStockFinancials
26
26
  */
27
- market_id: number;
27
+ market_id?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetStockFinancials
32
+ */
33
+ fields?: string;
28
34
  }
29
35
 
30
36
  /**
31
37
  * Check if a given object implements the ReqGetStockFinancials interface.
32
38
  */
33
39
  export function instanceOfReqGetStockFinancials(value: object): value is ReqGetStockFinancials {
34
- if (!('market_id' in value) || value['market_id'] === undefined) return false;
35
40
  return true;
36
41
  }
37
42
 
@@ -45,7 +50,8 @@ export function ReqGetStockFinancialsFromJSONTyped(json: any, ignoreDiscriminato
45
50
  }
46
51
  return {
47
52
 
48
- 'market_id': json['market_id'],
53
+ 'market_id': json['market_id'] == null ? undefined : json['market_id'],
54
+ 'fields': json['fields'] == null ? undefined : json['fields'],
49
55
  };
50
56
  }
51
57
 
@@ -56,6 +62,7 @@ export function ReqGetStockFinancialsToJSON(value?: ReqGetStockFinancials | null
56
62
  return {
57
63
 
58
64
  'market_id': value['market_id'],
65
+ 'fields': value['fields'],
59
66
  };
60
67
  }
61
68
 
@@ -44,6 +44,12 @@ export interface RespStockFinancials {
44
44
  * @memberof RespStockFinancials
45
45
  */
46
46
  stock_financial: StockFinancial;
47
+ /**
48
+ *
49
+ * @type {Array<StockFinancial>}
50
+ * @memberof RespStockFinancials
51
+ */
52
+ stock_financials: Array<StockFinancial>;
47
53
  }
48
54
 
49
55
  /**
@@ -52,6 +58,7 @@ export interface RespStockFinancials {
52
58
  export function instanceOfRespStockFinancials(value: object): value is RespStockFinancials {
53
59
  if (!('code' in value) || value['code'] === undefined) return false;
54
60
  if (!('stock_financial' in value) || value['stock_financial'] === undefined) return false;
61
+ if (!('stock_financials' in value) || value['stock_financials'] === undefined) return false;
55
62
  return true;
56
63
  }
57
64
 
@@ -68,6 +75,7 @@ export function RespStockFinancialsFromJSONTyped(json: any, ignoreDiscriminator:
68
75
  'code': json['code'],
69
76
  'message': json['message'] == null ? undefined : json['message'],
70
77
  'stock_financial': StockFinancialFromJSON(json['stock_financial']),
78
+ 'stock_financials': ((json['stock_financials'] as Array<any>).map(StockFinancialFromJSON)),
71
79
  };
72
80
  }
73
81
 
@@ -80,6 +88,7 @@ export function RespStockFinancialsToJSON(value?: RespStockFinancials | null): a
80
88
  'code': value['code'],
81
89
  'message': value['message'],
82
90
  'stock_financial': StockFinancialToJSON(value['stock_financial']),
91
+ 'stock_financials': ((value['stock_financials'] as Array<any>).map(StockFinancialToJSON)),
83
92
  };
84
93
  }
85
94
 
package/openapi.json CHANGED
@@ -4627,9 +4627,16 @@
4627
4627
  {
4628
4628
  "name": "market_id",
4629
4629
  "in": "query",
4630
- "required": true,
4630
+ "required": false,
4631
4631
  "type": "integer",
4632
- "format": "int16"
4632
+ "format": "int16",
4633
+ "default": "-1"
4634
+ },
4635
+ {
4636
+ "name": "fields",
4637
+ "in": "query",
4638
+ "required": false,
4639
+ "type": "string"
4633
4640
  }
4634
4641
  ],
4635
4642
  "tags": [
@@ -4638,7 +4645,7 @@
4638
4645
  "consumes": [
4639
4646
  "multipart/form-data"
4640
4647
  ],
4641
- "description": "Get stock financials"
4648
+ "description": "Get stock financials. Returns stock_financial for a single market_id, or stock_financials for every stock market when market_id is omitted. fields narrows the response to a subset of currency, exchange, industry, sector, country, market_cap, next_earnings; omit it to get the full record, which requires market_id."
4642
4649
  }
4643
4650
  },
4644
4651
  "/api/v1/syntheticSpotInfo": {
@@ -10782,6 +10789,9 @@
10782
10789
  "tier": {
10783
10790
  "type": "string"
10784
10791
  },
10792
+ "source": {
10793
+ "type": "string"
10794
+ },
10785
10795
  "trade_stats": {
10786
10796
  "$ref": "#/definitions/TradeStats"
10787
10797
  }
@@ -10792,6 +10802,7 @@
10792
10802
  "referral_code",
10793
10803
  "used_at",
10794
10804
  "tier",
10805
+ "source",
10795
10806
  "trade_stats"
10796
10807
  ]
10797
10808
  },
@@ -12587,13 +12598,14 @@
12587
12598
  "properties": {
12588
12599
  "market_id": {
12589
12600
  "type": "integer",
12590
- "format": "int16"
12601
+ "format": "int16",
12602
+ "default": "-1"
12603
+ },
12604
+ "fields": {
12605
+ "type": "string"
12591
12606
  }
12592
12607
  },
12593
- "title": "ReqGetStockFinancials",
12594
- "required": [
12595
- "market_id"
12596
- ]
12608
+ "title": "ReqGetStockFinancials"
12597
12609
  },
12598
12610
  "ReqGetSyntheticSpotInfo": {
12599
12611
  "type": "object",
@@ -13337,6 +13349,9 @@
13337
13349
  },
13338
13350
  "signature": {
13339
13351
  "type": "string"
13352
+ },
13353
+ "source": {
13354
+ "type": "string"
13340
13355
  }
13341
13356
  },
13342
13357
  "title": "ReqUseReferralCode",
@@ -14249,12 +14264,19 @@
14249
14264
  },
14250
14265
  "stock_financial": {
14251
14266
  "$ref": "#/definitions/StockFinancial"
14267
+ },
14268
+ "stock_financials": {
14269
+ "type": "array",
14270
+ "items": {
14271
+ "$ref": "#/definitions/StockFinancial"
14272
+ }
14252
14273
  }
14253
14274
  },
14254
14275
  "title": "RespStockFinancials",
14255
14276
  "required": [
14256
14277
  "code",
14257
- "stock_financial"
14278
+ "stock_financial",
14279
+ "stock_financials"
14258
14280
  ]
14259
14281
  },
14260
14282
  "RespSyntheticSpotInfo": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.293",
3
+ "version": "1.0.295",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {