zklighter-perps 1.0.123 → 1.0.125

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.
@@ -44,6 +44,7 @@ models/DetailedAccounts.ts
44
44
  models/DetailedCandlestick.ts
45
45
  models/EnrichedTx.ts
46
46
  models/ExchangeStats.ts
47
+ models/ExportData.ts
47
48
  models/Funding.ts
48
49
  models/FundingRate.ts
49
50
  models/FundingRates.ts
@@ -81,6 +82,7 @@ models/ReferralCode.ts
81
82
  models/ReferralPointEntry.ts
82
83
  models/ReferralPoints.ts
83
84
  models/ReqDoFaucet.ts
85
+ models/ReqExportData.ts
84
86
  models/ReqGetAccount.ts
85
87
  models/ReqGetAccountActiveOrders.ts
86
88
  models/ReqGetAccountApiKeys.ts
@@ -101,7 +101,9 @@ export interface L1MetadataRequest {
101
101
 
102
102
  export interface LeaderboardRequest {
103
103
  type: LeaderboardTypeEnum;
104
+ authorization?: string;
104
105
  l1_address?: string;
106
+ auth?: string;
105
107
  }
106
108
 
107
109
  export interface LiquidationsRequest {
@@ -533,8 +535,16 @@ export class AccountApi extends runtime.BaseAPI {
533
535
  queryParameters['l1_address'] = requestParameters['l1_address'];
534
536
  }
535
537
 
538
+ if (requestParameters['auth'] != null) {
539
+ queryParameters['auth'] = requestParameters['auth'];
540
+ }
541
+
536
542
  const headerParameters: runtime.HTTPHeaders = {};
537
543
 
544
+ if (requestParameters['authorization'] != null) {
545
+ headerParameters['authorization'] = String(requestParameters['authorization']);
546
+ }
547
+
538
548
  const response = await this.request({
539
549
  path: `/api/v1/leaderboard`,
540
550
  method: 'GET',
package/apis/OrderApi.ts CHANGED
@@ -16,6 +16,7 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ExchangeStats,
19
+ ExportData,
19
20
  OrderBookDetails,
20
21
  OrderBookOrders,
21
22
  OrderBooks,
@@ -26,6 +27,8 @@ import type {
26
27
  import {
27
28
  ExchangeStatsFromJSON,
28
29
  ExchangeStatsToJSON,
30
+ ExportDataFromJSON,
31
+ ExportDataToJSON,
29
32
  OrderBookDetailsFromJSON,
30
33
  OrderBookDetailsToJSON,
31
34
  OrderBookOrdersFromJSON,
@@ -40,6 +43,14 @@ import {
40
43
  TradesToJSON,
41
44
  } from '../models/index';
42
45
 
46
+ export interface ExportRequest {
47
+ type: ExportTypeEnum;
48
+ authorization?: string;
49
+ auth?: string;
50
+ account_index?: number;
51
+ market_id?: number;
52
+ }
53
+
43
54
  export interface AccountActiveOrdersRequest {
44
55
  account_index: number;
45
56
  market_id: number;
@@ -95,6 +106,61 @@ export interface TradesRequest {
95
106
  */
96
107
  export class OrderApi extends runtime.BaseAPI {
97
108
 
109
+ /**
110
+ * Export data
111
+ * export
112
+ */
113
+ async _exportRaw(requestParameters: ExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExportData>> {
114
+ if (requestParameters['type'] == null) {
115
+ throw new runtime.RequiredError(
116
+ 'type',
117
+ 'Required parameter "type" was null or undefined when calling _export().'
118
+ );
119
+ }
120
+
121
+ const queryParameters: any = {};
122
+
123
+ if (requestParameters['auth'] != null) {
124
+ queryParameters['auth'] = requestParameters['auth'];
125
+ }
126
+
127
+ if (requestParameters['account_index'] != null) {
128
+ queryParameters['account_index'] = requestParameters['account_index'];
129
+ }
130
+
131
+ if (requestParameters['market_id'] != null) {
132
+ queryParameters['market_id'] = requestParameters['market_id'];
133
+ }
134
+
135
+ if (requestParameters['type'] != null) {
136
+ queryParameters['type'] = requestParameters['type'];
137
+ }
138
+
139
+ const headerParameters: runtime.HTTPHeaders = {};
140
+
141
+ if (requestParameters['authorization'] != null) {
142
+ headerParameters['authorization'] = String(requestParameters['authorization']);
143
+ }
144
+
145
+ const response = await this.request({
146
+ path: `/api/v1/export`,
147
+ method: 'GET',
148
+ headers: headerParameters,
149
+ query: queryParameters,
150
+ }, initOverrides);
151
+
152
+ return new runtime.JSONApiResponse(response, (jsonValue) => ExportDataFromJSON(jsonValue));
153
+ }
154
+
155
+ /**
156
+ * Export data
157
+ * export
158
+ */
159
+ async _export(requestParameters: ExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExportData> {
160
+ const response = await this._exportRaw(requestParameters, initOverrides);
161
+ return await response.value();
162
+ }
163
+
98
164
  /**
99
165
  * Get account active orders. `auth` can be generated using the SDK.
100
166
  * accountActiveOrders
@@ -507,6 +573,14 @@ export class OrderApi extends runtime.BaseAPI {
507
573
 
508
574
  }
509
575
 
576
+ /**
577
+ * @export
578
+ */
579
+ export const ExportTypeEnum = {
580
+ Order: 'order',
581
+ Trade: 'trade'
582
+ } as const;
583
+ export type ExportTypeEnum = typeof ExportTypeEnum[keyof typeof ExportTypeEnum];
510
584
  /**
511
585
  * @export
512
586
  */
@@ -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 ExportData
20
+ */
21
+ export interface ExportData {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ExportData
26
+ */
27
+ code: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ExportData
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ExportData
38
+ */
39
+ data_url: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ExportData interface.
44
+ */
45
+ export function instanceOfExportData(value: object): value is ExportData {
46
+ if (!('code' in value) || value['code'] === undefined) return false;
47
+ if (!('data_url' in value) || value['data_url'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function ExportDataFromJSON(json: any): ExportData {
52
+ return ExportDataFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function ExportDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportData {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'code': json['code'],
62
+ 'message': json['message'] == null ? undefined : json['message'],
63
+ 'data_url': json['data_url'],
64
+ };
65
+ }
66
+
67
+ export function ExportDataToJSON(value?: ExportData | null): any {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+
73
+ 'code': value['code'],
74
+ 'message': value['message'],
75
+ 'data_url': value['data_url'],
76
+ };
77
+ }
78
+
@@ -33,16 +33,16 @@ export interface LiqTrade {
33
33
  size: string;
34
34
  /**
35
35
  *
36
- * @type {number}
36
+ * @type {string}
37
37
  * @memberof LiqTrade
38
38
  */
39
- taker_fee: number;
39
+ taker_fee: string;
40
40
  /**
41
41
  *
42
- * @type {number}
42
+ * @type {string}
43
43
  * @memberof LiqTrade
44
44
  */
45
- maker_fee: number;
45
+ maker_fee: string;
46
46
  }
47
47
 
48
48
  /**
@@ -0,0 +1,96 @@
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 ReqExportData
20
+ */
21
+ export interface ReqExportData {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqExportData
26
+ */
27
+ auth?: string;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqExportData
32
+ */
33
+ account_index?: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof ReqExportData
38
+ */
39
+ market_id?: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ReqExportData
44
+ */
45
+ type: ReqExportDataTypeEnum;
46
+ }
47
+
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const ReqExportDataTypeEnum = {
53
+ Order: 'order',
54
+ Trade: 'trade'
55
+ } as const;
56
+ export type ReqExportDataTypeEnum = typeof ReqExportDataTypeEnum[keyof typeof ReqExportDataTypeEnum];
57
+
58
+
59
+ /**
60
+ * Check if a given object implements the ReqExportData interface.
61
+ */
62
+ export function instanceOfReqExportData(value: object): value is ReqExportData {
63
+ if (!('type' in value) || value['type'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function ReqExportDataFromJSON(json: any): ReqExportData {
68
+ return ReqExportDataFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function ReqExportDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqExportData {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'auth': json['auth'] == null ? undefined : json['auth'],
78
+ 'account_index': json['account_index'] == null ? undefined : json['account_index'],
79
+ 'market_id': json['market_id'] == null ? undefined : json['market_id'],
80
+ 'type': json['type'],
81
+ };
82
+ }
83
+
84
+ export function ReqExportDataToJSON(value?: ReqExportData | null): any {
85
+ if (value == null) {
86
+ return value;
87
+ }
88
+ return {
89
+
90
+ 'auth': value['auth'],
91
+ 'account_index': value['account_index'],
92
+ 'market_id': value['market_id'],
93
+ 'type': value['type'],
94
+ };
95
+ }
96
+
@@ -31,6 +31,12 @@ export interface ReqGetLeaderboard {
31
31
  * @memberof ReqGetLeaderboard
32
32
  */
33
33
  l1_address?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetLeaderboard
38
+ */
39
+ auth?: string;
34
40
  }
35
41
 
36
42
 
@@ -64,6 +70,7 @@ export function ReqGetLeaderboardFromJSONTyped(json: any, ignoreDiscriminator: b
64
70
 
65
71
  'type': json['type'],
66
72
  'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
73
+ 'auth': json['auth'] == null ? undefined : json['auth'],
67
74
  };
68
75
  }
69
76
 
@@ -75,6 +82,7 @@ export function ReqGetLeaderboardToJSON(value?: ReqGetLeaderboard | null): any {
75
82
 
76
83
  'type': value['type'],
77
84
  'l1_address': value['l1_address'],
85
+ 'auth': value['auth'],
78
86
  };
79
87
  }
80
88
 
package/models/index.ts CHANGED
@@ -32,6 +32,7 @@ export * from './DetailedAccounts';
32
32
  export * from './DetailedCandlestick';
33
33
  export * from './EnrichedTx';
34
34
  export * from './ExchangeStats';
35
+ export * from './ExportData';
35
36
  export * from './Funding';
36
37
  export * from './FundingRate';
37
38
  export * from './FundingRates';
@@ -69,6 +70,7 @@ export * from './ReferralCode';
69
70
  export * from './ReferralPointEntry';
70
71
  export * from './ReferralPoints';
71
72
  export * from './ReqDoFaucet';
73
+ export * from './ReqExportData';
72
74
  export * from './ReqGetAccount';
73
75
  export * from './ReqGetAccountActiveOrders';
74
76
  export * from './ReqGetAccountApiKeys';
package/openapi.json CHANGED
@@ -1045,6 +1045,74 @@
1045
1045
  "description": "Get exchange stats"
1046
1046
  }
1047
1047
  },
1048
+ "/api/v1/export": {
1049
+ "get": {
1050
+ "summary": "export",
1051
+ "operationId": "export",
1052
+ "responses": {
1053
+ "200": {
1054
+ "description": "A successful response.",
1055
+ "schema": {
1056
+ "$ref": "#/definitions/ExportData"
1057
+ }
1058
+ },
1059
+ "400": {
1060
+ "description": "Bad request",
1061
+ "schema": {
1062
+ "$ref": "#/definitions/ResultCode"
1063
+ }
1064
+ }
1065
+ },
1066
+ "parameters": [
1067
+ {
1068
+ "name": "authorization",
1069
+ "in": "header",
1070
+ "required": false,
1071
+ "type": "string"
1072
+ },
1073
+ {
1074
+ "name": "auth",
1075
+ "in": "query",
1076
+ "required": false,
1077
+ "type": "string"
1078
+ },
1079
+ {
1080
+ "name": "account_index",
1081
+ "in": "query",
1082
+ "required": false,
1083
+ "type": "integer",
1084
+ "format": "int64",
1085
+ "default": "-1"
1086
+ },
1087
+ {
1088
+ "name": "market_id",
1089
+ "in": "query",
1090
+ "required": false,
1091
+ "type": "integer",
1092
+ "format": "uint8",
1093
+ "default": "255"
1094
+ },
1095
+ {
1096
+ "name": "type",
1097
+ "in": "query",
1098
+ "required": true,
1099
+ "type": "string",
1100
+ "enum": [
1101
+ "order",
1102
+ "trade"
1103
+ ],
1104
+ "default": "trade"
1105
+ }
1106
+ ],
1107
+ "tags": [
1108
+ "order"
1109
+ ],
1110
+ "consumes": [
1111
+ "multipart/form-data"
1112
+ ],
1113
+ "description": "Export data"
1114
+ }
1115
+ },
1048
1116
  "/api/v1/fastbridge/info": {
1049
1117
  "get": {
1050
1118
  "summary": "fastbridge_info",
@@ -1419,6 +1487,12 @@
1419
1487
  }
1420
1488
  },
1421
1489
  "parameters": [
1490
+ {
1491
+ "name": "authorization",
1492
+ "in": "header",
1493
+ "required": false,
1494
+ "type": "string"
1495
+ },
1422
1496
  {
1423
1497
  "name": "type",
1424
1498
  "in": "query",
@@ -1434,6 +1508,12 @@
1434
1508
  "in": "query",
1435
1509
  "required": false,
1436
1510
  "type": "string"
1511
+ },
1512
+ {
1513
+ "name": "auth",
1514
+ "in": "query",
1515
+ "required": false,
1516
+ "type": "string"
1437
1517
  }
1438
1518
  ],
1439
1519
  "tags": [
@@ -1490,7 +1570,8 @@
1490
1570
  "in": "query",
1491
1571
  "required": false,
1492
1572
  "type": "integer",
1493
- "format": "uint8"
1573
+ "format": "uint8",
1574
+ "default": "255"
1494
1575
  },
1495
1576
  {
1496
1577
  "name": "cursor",
@@ -4060,6 +4141,27 @@
4060
4141
  "daily_trades_count"
4061
4142
  ]
4062
4143
  },
4144
+ "ExportData": {
4145
+ "type": "object",
4146
+ "properties": {
4147
+ "code": {
4148
+ "type": "integer",
4149
+ "format": "int32",
4150
+ "example": "200"
4151
+ },
4152
+ "message": {
4153
+ "type": "string"
4154
+ },
4155
+ "data_url": {
4156
+ "type": "string"
4157
+ }
4158
+ },
4159
+ "title": "ExportData",
4160
+ "required": [
4161
+ "code",
4162
+ "data_url"
4163
+ ]
4164
+ },
4063
4165
  "Funding": {
4064
4166
  "type": "object",
4065
4167
  "properties": {
@@ -4369,12 +4471,10 @@
4369
4471
  "type": "string"
4370
4472
  },
4371
4473
  "taker_fee": {
4372
- "type": "integer",
4373
- "format": "int32"
4474
+ "type": "string"
4374
4475
  },
4375
4476
  "maker_fee": {
4376
- "type": "integer",
4377
- "format": "int32"
4477
+ "type": "string"
4378
4478
  }
4379
4479
  },
4380
4480
  "title": "LiqTrade",
@@ -4442,8 +4542,8 @@
4442
4542
  "mark_prices": {
4443
4543
  "type": "object",
4444
4544
  "additionalProperties": {
4445
- "type": "integer",
4446
- "format": "int64"
4545
+ "type": "number",
4546
+ "format": "double"
4447
4547
  }
4448
4548
  }
4449
4549
  },
@@ -5820,6 +5920,36 @@
5820
5920
  "l1_address"
5821
5921
  ]
5822
5922
  },
5923
+ "ReqExportData": {
5924
+ "type": "object",
5925
+ "properties": {
5926
+ "auth": {
5927
+ "type": "string"
5928
+ },
5929
+ "account_index": {
5930
+ "type": "integer",
5931
+ "format": "int64",
5932
+ "default": "-1"
5933
+ },
5934
+ "market_id": {
5935
+ "type": "integer",
5936
+ "format": "uint8",
5937
+ "default": "255"
5938
+ },
5939
+ "type": {
5940
+ "type": "string",
5941
+ "enum": [
5942
+ "order",
5943
+ "trade"
5944
+ ],
5945
+ "default": "trade"
5946
+ }
5947
+ },
5948
+ "title": "ReqExportData",
5949
+ "required": [
5950
+ "type"
5951
+ ]
5952
+ },
5823
5953
  "ReqFastwithdraw": {
5824
5954
  "type": "object",
5825
5955
  "properties": {
@@ -6350,6 +6480,9 @@
6350
6480
  },
6351
6481
  "l1_address": {
6352
6482
  "type": "string"
6483
+ },
6484
+ "auth": {
6485
+ "type": "string"
6353
6486
  }
6354
6487
  },
6355
6488
  "title": "ReqGetLeaderboard",
@@ -6370,7 +6503,8 @@
6370
6503
  },
6371
6504
  "market_id": {
6372
6505
  "type": "integer",
6373
- "format": "uint8"
6506
+ "format": "uint8",
6507
+ "default": "255"
6374
6508
  },
6375
6509
  "cursor": {
6376
6510
  "type": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.123",
3
+ "version": "1.0.125",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {