zklighter-perps 1.0.103 → 1.0.104

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.
@@ -3,6 +3,7 @@ apis/AnnouncementApi.ts
3
3
  apis/BlockApi.ts
4
4
  apis/BridgeApi.ts
5
5
  apis/CandlestickApi.ts
6
+ apis/FundingApi.ts
6
7
  apis/InfoApi.ts
7
8
  apis/NotificationApi.ts
8
9
  apis/OrderApi.ts
@@ -44,6 +45,8 @@ models/EnrichedTx.ts
44
45
  models/ExchangeStats.ts
45
46
  models/FeeBucket.ts
46
47
  models/Funding.ts
48
+ models/FundingRate.ts
49
+ models/FundingRates.ts
47
50
  models/Fundings.ts
48
51
  models/IsWhitelisted.ts
49
52
  models/L1ProviderInfo.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
+ FundingRates,
19
+ ResultCode,
20
+ } from '../models/index';
21
+ import {
22
+ FundingRatesFromJSON,
23
+ FundingRatesToJSON,
24
+ ResultCodeFromJSON,
25
+ ResultCodeToJSON,
26
+ } from '../models/index';
27
+
28
+ /**
29
+ *
30
+ */
31
+ export class FundingApi extends runtime.BaseAPI {
32
+
33
+ /**
34
+ * Get funding rates
35
+ * funding-rates
36
+ */
37
+ async fundingRatesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FundingRates>> {
38
+ const queryParameters: any = {};
39
+
40
+ const headerParameters: runtime.HTTPHeaders = {};
41
+
42
+ const response = await this.request({
43
+ path: `/api/v1/funding-rates`,
44
+ method: 'GET',
45
+ headers: headerParameters,
46
+ query: queryParameters,
47
+ }, initOverrides);
48
+
49
+ return new runtime.JSONApiResponse(response, (jsonValue) => FundingRatesFromJSON(jsonValue));
50
+ }
51
+
52
+ /**
53
+ * Get funding rates
54
+ * funding-rates
55
+ */
56
+ async fundingRates(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FundingRates> {
57
+ const response = await this.fundingRatesRaw(initOverrides);
58
+ return await response.value();
59
+ }
60
+
61
+ }
package/apis/index.ts CHANGED
@@ -5,6 +5,7 @@ export * from './AnnouncementApi';
5
5
  export * from './BlockApi';
6
6
  export * from './BridgeApi';
7
7
  export * from './CandlestickApi';
8
+ export * from './FundingApi';
8
9
  export * from './InfoApi';
9
10
  export * from './NotificationApi';
10
11
  export * from './OrderApi';
@@ -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 FundingRate
20
+ */
21
+ export interface FundingRate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof FundingRate
26
+ */
27
+ exchange: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof FundingRate
32
+ */
33
+ symbol: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof FundingRate
38
+ */
39
+ rate: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the FundingRate interface.
44
+ */
45
+ export function instanceOfFundingRate(value: object): value is FundingRate {
46
+ if (!('exchange' in value) || value['exchange'] === undefined) return false;
47
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
48
+ if (!('rate' in value) || value['rate'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function FundingRateFromJSON(json: any): FundingRate {
53
+ return FundingRateFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function FundingRateFromJSONTyped(json: any, ignoreDiscriminator: boolean): FundingRate {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'exchange': json['exchange'],
63
+ 'symbol': json['symbol'],
64
+ 'rate': json['rate'],
65
+ };
66
+ }
67
+
68
+ export function FundingRateToJSON(value?: FundingRate | null): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+
74
+ 'exchange': value['exchange'],
75
+ 'symbol': value['symbol'],
76
+ 'rate': value['rate'],
77
+ };
78
+ }
79
+
@@ -0,0 +1,85 @@
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 { FundingRate } from './FundingRate';
17
+ import {
18
+ FundingRateFromJSON,
19
+ FundingRateFromJSONTyped,
20
+ FundingRateToJSON,
21
+ } from './FundingRate';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface FundingRates
27
+ */
28
+ export interface FundingRates {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof FundingRates
33
+ */
34
+ code: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof FundingRates
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {Array<FundingRate>}
44
+ * @memberof FundingRates
45
+ */
46
+ funding_rates: Array<FundingRate>;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the FundingRates interface.
51
+ */
52
+ export function instanceOfFundingRates(value: object): value is FundingRates {
53
+ if (!('code' in value) || value['code'] === undefined) return false;
54
+ if (!('funding_rates' in value) || value['funding_rates'] === undefined) return false;
55
+ return true;
56
+ }
57
+
58
+ export function FundingRatesFromJSON(json: any): FundingRates {
59
+ return FundingRatesFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function FundingRatesFromJSONTyped(json: any, ignoreDiscriminator: boolean): FundingRates {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'code': json['code'],
69
+ 'message': json['message'] == null ? undefined : json['message'],
70
+ 'funding_rates': ((json['funding_rates'] as Array<any>).map(FundingRateFromJSON)),
71
+ };
72
+ }
73
+
74
+ export function FundingRatesToJSON(value?: FundingRates | null): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+ return {
79
+
80
+ 'code': value['code'],
81
+ 'message': value['message'],
82
+ 'funding_rates': ((value['funding_rates'] as Array<any>).map(FundingRateToJSON)),
83
+ };
84
+ }
85
+
package/models/index.ts CHANGED
@@ -33,6 +33,8 @@ export * from './EnrichedTx';
33
33
  export * from './ExchangeStats';
34
34
  export * from './FeeBucket';
35
35
  export * from './Funding';
36
+ export * from './FundingRate';
37
+ export * from './FundingRates';
36
38
  export * from './Fundings';
37
39
  export * from './IsWhitelisted';
38
40
  export * from './L1ProviderInfo';
package/openapi.json CHANGED
@@ -1161,6 +1161,30 @@
1161
1161
  "description": "Get account fee bucket"
1162
1162
  }
1163
1163
  },
1164
+ "/api/v1/funding-rates": {
1165
+ "get": {
1166
+ "summary": "funding-rates",
1167
+ "operationId": "funding-rates",
1168
+ "responses": {
1169
+ "200": {
1170
+ "description": "A successful response.",
1171
+ "schema": {
1172
+ "$ref": "#/definitions/FundingRates"
1173
+ }
1174
+ },
1175
+ "400": {
1176
+ "description": "Bad request",
1177
+ "schema": {
1178
+ "$ref": "#/definitions/ResultCode"
1179
+ }
1180
+ }
1181
+ },
1182
+ "tags": [
1183
+ "funding"
1184
+ ],
1185
+ "description": "Get funding rates"
1186
+ }
1187
+ },
1164
1188
  "/api/v1/fundings": {
1165
1189
  "get": {
1166
1190
  "summary": "fundings",
@@ -3812,6 +3836,51 @@
3812
3836
  "direction"
3813
3837
  ]
3814
3838
  },
3839
+ "FundingRate": {
3840
+ "type": "object",
3841
+ "properties": {
3842
+ "exchange": {
3843
+ "type": "string"
3844
+ },
3845
+ "symbol": {
3846
+ "type": "string"
3847
+ },
3848
+ "rate": {
3849
+ "type": "number",
3850
+ "format": "double"
3851
+ }
3852
+ },
3853
+ "title": "FundingRate",
3854
+ "required": [
3855
+ "exchange",
3856
+ "symbol",
3857
+ "rate"
3858
+ ]
3859
+ },
3860
+ "FundingRates": {
3861
+ "type": "object",
3862
+ "properties": {
3863
+ "code": {
3864
+ "type": "integer",
3865
+ "format": "int32",
3866
+ "example": "200"
3867
+ },
3868
+ "message": {
3869
+ "type": "string"
3870
+ },
3871
+ "funding_rates": {
3872
+ "type": "array",
3873
+ "items": {
3874
+ "$ref": "#/definitions/FundingRate"
3875
+ }
3876
+ }
3877
+ },
3878
+ "title": "FundingRates",
3879
+ "required": [
3880
+ "code",
3881
+ "funding_rates"
3882
+ ]
3883
+ },
3815
3884
  "Fundings": {
3816
3885
  "type": "object",
3817
3886
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {