zklighter-perps 1.0.120 → 1.0.121
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.
- package/.openapi-generator/FILES +4 -0
- package/apis/AccountApi.ts +153 -8
- package/apis/BridgeApi.ts +12 -16
- package/apis/NotificationApi.ts +6 -8
- package/apis/OrderApi.ts +17 -16
- package/apis/ReferralApi.ts +18 -24
- package/apis/TransactionApi.ts +17 -16
- package/models/AccountMetadata.ts +11 -11
- package/models/AccountMetadatas.ts +9 -9
- package/models/DetailedAccount.ts +11 -11
- package/models/L1Metadata.ts +79 -0
- package/models/PublicPool.ts +11 -11
- package/models/ReqGetAccountActiveOrders.ts +3 -4
- package/models/ReqGetAccountInactiveOrders.ts +3 -4
- package/models/ReqGetAccountLimits.ts +3 -4
- package/models/ReqGetDepositHistory.ts +3 -4
- package/models/ReqGetFastWithdrawInfo.ts +3 -4
- package/models/ReqGetL1Metadata.ts +69 -0
- package/models/ReqGetReferralCode.ts +3 -4
- package/models/ReqGetReferralPoints.ts +3 -4
- package/models/ReqGetWithdrawHistory.ts +3 -4
- package/models/index.ts +4 -0
- package/openapi.json +369 -57
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -17,6 +17,7 @@ models/AccountApiKeys.ts
|
|
|
17
17
|
models/AccountLimits.ts
|
|
18
18
|
models/AccountMarketStats.ts
|
|
19
19
|
models/AccountMetadata.ts
|
|
20
|
+
models/AccountMetadatas.ts
|
|
20
21
|
models/AccountPnL.ts
|
|
21
22
|
models/AccountPosition.ts
|
|
22
23
|
models/AccountStats.ts
|
|
@@ -48,6 +49,7 @@ models/FundingRate.ts
|
|
|
48
49
|
models/FundingRates.ts
|
|
49
50
|
models/Fundings.ts
|
|
50
51
|
models/IsWhitelisted.ts
|
|
52
|
+
models/L1Metadata.ts
|
|
51
53
|
models/L1ProviderInfo.ts
|
|
52
54
|
models/Layer1BasicInfo.ts
|
|
53
55
|
models/Leaderboard.ts
|
|
@@ -81,6 +83,7 @@ models/ReqGetAccountApiKeys.ts
|
|
|
81
83
|
models/ReqGetAccountByL1Address.ts
|
|
82
84
|
models/ReqGetAccountInactiveOrders.ts
|
|
83
85
|
models/ReqGetAccountLimits.ts
|
|
86
|
+
models/ReqGetAccountMetadata.ts
|
|
84
87
|
models/ReqGetAccountPendingTxs.ts
|
|
85
88
|
models/ReqGetAccountPnL.ts
|
|
86
89
|
models/ReqGetAccountTxs.ts
|
|
@@ -91,6 +94,7 @@ models/ReqGetCandlesticks.ts
|
|
|
91
94
|
models/ReqGetDepositHistory.ts
|
|
92
95
|
models/ReqGetFastWithdrawInfo.ts
|
|
93
96
|
models/ReqGetFundings.ts
|
|
97
|
+
models/ReqGetL1Metadata.ts
|
|
94
98
|
models/ReqGetL1Tx.ts
|
|
95
99
|
models/ReqGetLatestDeposit.ts
|
|
96
100
|
models/ReqGetLeaderboard.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -17,9 +17,11 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
AccountApiKeys,
|
|
19
19
|
AccountLimits,
|
|
20
|
+
AccountMetadatas,
|
|
20
21
|
AccountPnL,
|
|
21
22
|
DetailedAccounts,
|
|
22
23
|
IsWhitelisted,
|
|
24
|
+
L1Metadata,
|
|
23
25
|
Leaderboard,
|
|
24
26
|
PositionFundings,
|
|
25
27
|
PublicPools,
|
|
@@ -31,12 +33,16 @@ import {
|
|
|
31
33
|
AccountApiKeysToJSON,
|
|
32
34
|
AccountLimitsFromJSON,
|
|
33
35
|
AccountLimitsToJSON,
|
|
36
|
+
AccountMetadatasFromJSON,
|
|
37
|
+
AccountMetadatasToJSON,
|
|
34
38
|
AccountPnLFromJSON,
|
|
35
39
|
AccountPnLToJSON,
|
|
36
40
|
DetailedAccountsFromJSON,
|
|
37
41
|
DetailedAccountsToJSON,
|
|
38
42
|
IsWhitelistedFromJSON,
|
|
39
43
|
IsWhitelistedToJSON,
|
|
44
|
+
L1MetadataFromJSON,
|
|
45
|
+
L1MetadataToJSON,
|
|
40
46
|
LeaderboardFromJSON,
|
|
41
47
|
LeaderboardToJSON,
|
|
42
48
|
PositionFundingsFromJSON,
|
|
@@ -56,7 +62,15 @@ export interface AccountRequest {
|
|
|
56
62
|
|
|
57
63
|
export interface AccountLimitsRequest {
|
|
58
64
|
account_index: number;
|
|
59
|
-
|
|
65
|
+
authorization?: string;
|
|
66
|
+
auth?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface AccountMetadataRequest {
|
|
70
|
+
by: AccountMetadataByEnum;
|
|
71
|
+
value: string;
|
|
72
|
+
authorization?: string;
|
|
73
|
+
auth?: string;
|
|
60
74
|
}
|
|
61
75
|
|
|
62
76
|
export interface AccountsByL1AddressRequest {
|
|
@@ -76,6 +90,12 @@ export interface IsWhitelistedRequest {
|
|
|
76
90
|
l1_address: string;
|
|
77
91
|
}
|
|
78
92
|
|
|
93
|
+
export interface L1MetadataRequest {
|
|
94
|
+
l1_address: string;
|
|
95
|
+
authorization?: string;
|
|
96
|
+
auth?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
79
99
|
export interface LeaderboardRequest {
|
|
80
100
|
type: LeaderboardTypeEnum;
|
|
81
101
|
l1_address?: string;
|
|
@@ -88,6 +108,7 @@ export interface PnlRequest {
|
|
|
88
108
|
start_timestamp: number;
|
|
89
109
|
end_timestamp: number;
|
|
90
110
|
count_back: number;
|
|
111
|
+
authorization?: string;
|
|
91
112
|
auth?: string;
|
|
92
113
|
ignore_transfers?: boolean;
|
|
93
114
|
}
|
|
@@ -95,6 +116,7 @@ export interface PnlRequest {
|
|
|
95
116
|
export interface PositionFundingRequest {
|
|
96
117
|
account_index: number;
|
|
97
118
|
limit: number;
|
|
119
|
+
authorization?: string;
|
|
98
120
|
auth?: string;
|
|
99
121
|
market_id?: number;
|
|
100
122
|
cursor?: string;
|
|
@@ -104,6 +126,7 @@ export interface PositionFundingRequest {
|
|
|
104
126
|
export interface PublicPoolsRequest {
|
|
105
127
|
index: number;
|
|
106
128
|
limit: number;
|
|
129
|
+
authorization?: string;
|
|
107
130
|
auth?: string;
|
|
108
131
|
filter?: PublicPoolsFilterEnum;
|
|
109
132
|
account_index?: number;
|
|
@@ -176,13 +199,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
176
199
|
);
|
|
177
200
|
}
|
|
178
201
|
|
|
179
|
-
if (requestParameters['auth'] == null) {
|
|
180
|
-
throw new runtime.RequiredError(
|
|
181
|
-
'auth',
|
|
182
|
-
'Required parameter "auth" was null or undefined when calling accountLimits().'
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
202
|
const queryParameters: any = {};
|
|
187
203
|
|
|
188
204
|
if (requestParameters['account_index'] != null) {
|
|
@@ -195,6 +211,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
195
211
|
|
|
196
212
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
197
213
|
|
|
214
|
+
if (requestParameters['authorization'] != null) {
|
|
215
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
216
|
+
}
|
|
217
|
+
|
|
198
218
|
const response = await this.request({
|
|
199
219
|
path: `/api/v1/accountLimits`,
|
|
200
220
|
method: 'GET',
|
|
@@ -214,6 +234,64 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
214
234
|
return await response.value();
|
|
215
235
|
}
|
|
216
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Get account metadatas
|
|
239
|
+
* accountMetadata
|
|
240
|
+
*/
|
|
241
|
+
async accountMetadataRaw(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountMetadatas>> {
|
|
242
|
+
if (requestParameters['by'] == null) {
|
|
243
|
+
throw new runtime.RequiredError(
|
|
244
|
+
'by',
|
|
245
|
+
'Required parameter "by" was null or undefined when calling accountMetadata().'
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (requestParameters['value'] == null) {
|
|
250
|
+
throw new runtime.RequiredError(
|
|
251
|
+
'value',
|
|
252
|
+
'Required parameter "value" was null or undefined when calling accountMetadata().'
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const queryParameters: any = {};
|
|
257
|
+
|
|
258
|
+
if (requestParameters['by'] != null) {
|
|
259
|
+
queryParameters['by'] = requestParameters['by'];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (requestParameters['value'] != null) {
|
|
263
|
+
queryParameters['value'] = requestParameters['value'];
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (requestParameters['auth'] != null) {
|
|
267
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
271
|
+
|
|
272
|
+
if (requestParameters['authorization'] != null) {
|
|
273
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const response = await this.request({
|
|
277
|
+
path: `/api/v1/accountMetadata`,
|
|
278
|
+
method: 'GET',
|
|
279
|
+
headers: headerParameters,
|
|
280
|
+
query: queryParameters,
|
|
281
|
+
}, initOverrides);
|
|
282
|
+
|
|
283
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountMetadatasFromJSON(jsonValue));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Get account metadatas
|
|
288
|
+
* accountMetadata
|
|
289
|
+
*/
|
|
290
|
+
async accountMetadata(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountMetadatas> {
|
|
291
|
+
const response = await this.accountMetadataRaw(requestParameters, initOverrides);
|
|
292
|
+
return await response.value();
|
|
293
|
+
}
|
|
294
|
+
|
|
217
295
|
/**
|
|
218
296
|
* Get accounts by l1_address returns all accounts associated with the given L1 address
|
|
219
297
|
* accountsByL1Address
|
|
@@ -374,6 +452,53 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
374
452
|
return await response.value();
|
|
375
453
|
}
|
|
376
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Get L1 metadata
|
|
457
|
+
* l1Metadata
|
|
458
|
+
*/
|
|
459
|
+
async l1MetadataRaw(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<L1Metadata>> {
|
|
460
|
+
if (requestParameters['l1_address'] == null) {
|
|
461
|
+
throw new runtime.RequiredError(
|
|
462
|
+
'l1_address',
|
|
463
|
+
'Required parameter "l1_address" was null or undefined when calling l1Metadata().'
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const queryParameters: any = {};
|
|
468
|
+
|
|
469
|
+
if (requestParameters['auth'] != null) {
|
|
470
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if (requestParameters['l1_address'] != null) {
|
|
474
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
478
|
+
|
|
479
|
+
if (requestParameters['authorization'] != null) {
|
|
480
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const response = await this.request({
|
|
484
|
+
path: `/api/v1/l1Metadata`,
|
|
485
|
+
method: 'GET',
|
|
486
|
+
headers: headerParameters,
|
|
487
|
+
query: queryParameters,
|
|
488
|
+
}, initOverrides);
|
|
489
|
+
|
|
490
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => L1MetadataFromJSON(jsonValue));
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Get L1 metadata
|
|
495
|
+
* l1Metadata
|
|
496
|
+
*/
|
|
497
|
+
async l1Metadata(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<L1Metadata> {
|
|
498
|
+
const response = await this.l1MetadataRaw(requestParameters, initOverrides);
|
|
499
|
+
return await response.value();
|
|
500
|
+
}
|
|
501
|
+
|
|
377
502
|
/**
|
|
378
503
|
* Get points leaderboard
|
|
379
504
|
* leaderboard
|
|
@@ -500,6 +625,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
500
625
|
|
|
501
626
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
502
627
|
|
|
628
|
+
if (requestParameters['authorization'] != null) {
|
|
629
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
630
|
+
}
|
|
631
|
+
|
|
503
632
|
const response = await this.request({
|
|
504
633
|
path: `/api/v1/pnl`,
|
|
505
634
|
method: 'GET',
|
|
@@ -566,6 +695,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
566
695
|
|
|
567
696
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
568
697
|
|
|
698
|
+
if (requestParameters['authorization'] != null) {
|
|
699
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
700
|
+
}
|
|
701
|
+
|
|
569
702
|
const response = await this.request({
|
|
570
703
|
path: `/api/v1/positionFunding`,
|
|
571
704
|
method: 'GET',
|
|
@@ -628,6 +761,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
628
761
|
|
|
629
762
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
630
763
|
|
|
764
|
+
if (requestParameters['authorization'] != null) {
|
|
765
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
766
|
+
}
|
|
767
|
+
|
|
631
768
|
const response = await this.request({
|
|
632
769
|
path: `/api/v1/publicPools`,
|
|
633
770
|
method: 'GET',
|
|
@@ -657,6 +794,14 @@ export const AccountByEnum = {
|
|
|
657
794
|
L1Address: 'l1_address'
|
|
658
795
|
} as const;
|
|
659
796
|
export type AccountByEnum = typeof AccountByEnum[keyof typeof AccountByEnum];
|
|
797
|
+
/**
|
|
798
|
+
* @export
|
|
799
|
+
*/
|
|
800
|
+
export const AccountMetadataByEnum = {
|
|
801
|
+
Index: 'index',
|
|
802
|
+
L1Address: 'l1_address'
|
|
803
|
+
} as const;
|
|
804
|
+
export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof AccountMetadataByEnum];
|
|
660
805
|
/**
|
|
661
806
|
* @export
|
|
662
807
|
*/
|
package/apis/BridgeApi.ts
CHANGED
|
@@ -56,12 +56,14 @@ export interface DepositLatestRequest {
|
|
|
56
56
|
export interface FastwithdrawRequest {
|
|
57
57
|
tx_info: string;
|
|
58
58
|
to_address: string;
|
|
59
|
-
|
|
59
|
+
authorization?: string;
|
|
60
|
+
auth?: string;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface FastwithdrawInfoRequest {
|
|
63
64
|
account_index: number;
|
|
64
|
-
|
|
65
|
+
authorization?: string;
|
|
66
|
+
auth?: string;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
/**
|
|
@@ -328,17 +330,14 @@ export class BridgeApi extends runtime.BaseAPI {
|
|
|
328
330
|
);
|
|
329
331
|
}
|
|
330
332
|
|
|
331
|
-
if (requestParameters['auth'] == null) {
|
|
332
|
-
throw new runtime.RequiredError(
|
|
333
|
-
'auth',
|
|
334
|
-
'Required parameter "auth" was null or undefined when calling fastwithdraw().'
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
333
|
const queryParameters: any = {};
|
|
339
334
|
|
|
340
335
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
341
336
|
|
|
337
|
+
if (requestParameters['authorization'] != null) {
|
|
338
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
339
|
+
}
|
|
340
|
+
|
|
342
341
|
const consumes: runtime.Consume[] = [
|
|
343
342
|
{ contentType: 'multipart/form-data' },
|
|
344
343
|
];
|
|
@@ -397,13 +396,6 @@ export class BridgeApi extends runtime.BaseAPI {
|
|
|
397
396
|
);
|
|
398
397
|
}
|
|
399
398
|
|
|
400
|
-
if (requestParameters['auth'] == null) {
|
|
401
|
-
throw new runtime.RequiredError(
|
|
402
|
-
'auth',
|
|
403
|
-
'Required parameter "auth" was null or undefined when calling fastwithdrawInfo().'
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
399
|
const queryParameters: any = {};
|
|
408
400
|
|
|
409
401
|
if (requestParameters['account_index'] != null) {
|
|
@@ -416,6 +408,10 @@ export class BridgeApi extends runtime.BaseAPI {
|
|
|
416
408
|
|
|
417
409
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
418
410
|
|
|
411
|
+
if (requestParameters['authorization'] != null) {
|
|
412
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
413
|
+
}
|
|
414
|
+
|
|
419
415
|
const response = await this.request({
|
|
420
416
|
path: `/api/v1/fastwithdraw/info`,
|
|
421
417
|
method: 'GET',
|
package/apis/NotificationApi.ts
CHANGED
|
@@ -24,8 +24,9 @@ import {
|
|
|
24
24
|
|
|
25
25
|
export interface NotificationAckRequest {
|
|
26
26
|
notif_id: string;
|
|
27
|
-
auth: string;
|
|
28
27
|
account_index: number;
|
|
28
|
+
authorization?: string;
|
|
29
|
+
auth?: string;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
@@ -45,13 +46,6 @@ export class NotificationApi extends runtime.BaseAPI {
|
|
|
45
46
|
);
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
if (requestParameters['auth'] == null) {
|
|
49
|
-
throw new runtime.RequiredError(
|
|
50
|
-
'auth',
|
|
51
|
-
'Required parameter "auth" was null or undefined when calling notificationAck().'
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
49
|
if (requestParameters['account_index'] == null) {
|
|
56
50
|
throw new runtime.RequiredError(
|
|
57
51
|
'account_index',
|
|
@@ -63,6 +57,10 @@ export class NotificationApi extends runtime.BaseAPI {
|
|
|
63
57
|
|
|
64
58
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
65
59
|
|
|
60
|
+
if (requestParameters['authorization'] != null) {
|
|
61
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
62
|
+
}
|
|
63
|
+
|
|
66
64
|
const consumes: runtime.Consume[] = [
|
|
67
65
|
{ contentType: 'multipart/form-data' },
|
|
68
66
|
];
|
package/apis/OrderApi.ts
CHANGED
|
@@ -43,13 +43,15 @@ import {
|
|
|
43
43
|
export interface AccountActiveOrdersRequest {
|
|
44
44
|
account_index: number;
|
|
45
45
|
market_id: number;
|
|
46
|
-
|
|
46
|
+
authorization?: string;
|
|
47
|
+
auth?: string;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export interface AccountInactiveOrdersRequest {
|
|
50
|
-
auth: string;
|
|
51
51
|
account_index: number;
|
|
52
52
|
limit: number;
|
|
53
|
+
authorization?: string;
|
|
54
|
+
auth?: string;
|
|
53
55
|
market_id?: number;
|
|
54
56
|
ask_filter?: number;
|
|
55
57
|
between_timestamps?: string;
|
|
@@ -77,6 +79,7 @@ export interface RecentTradesRequest {
|
|
|
77
79
|
export interface TradesRequest {
|
|
78
80
|
sort_by: TradesSortByEnum;
|
|
79
81
|
limit: number;
|
|
82
|
+
authorization?: string;
|
|
80
83
|
auth?: string;
|
|
81
84
|
market_id?: number;
|
|
82
85
|
account_index?: number;
|
|
@@ -111,13 +114,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
111
114
|
);
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
if (requestParameters['auth'] == null) {
|
|
115
|
-
throw new runtime.RequiredError(
|
|
116
|
-
'auth',
|
|
117
|
-
'Required parameter "auth" was null or undefined when calling accountActiveOrders().'
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
117
|
const queryParameters: any = {};
|
|
122
118
|
|
|
123
119
|
if (requestParameters['account_index'] != null) {
|
|
@@ -134,6 +130,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
134
130
|
|
|
135
131
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
136
132
|
|
|
133
|
+
if (requestParameters['authorization'] != null) {
|
|
134
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
137
|
const response = await this.request({
|
|
138
138
|
path: `/api/v1/accountActiveOrders`,
|
|
139
139
|
method: 'GET',
|
|
@@ -158,13 +158,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
158
158
|
* accountInactiveOrders
|
|
159
159
|
*/
|
|
160
160
|
async accountInactiveOrdersRaw(requestParameters: AccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
161
|
-
if (requestParameters['auth'] == null) {
|
|
162
|
-
throw new runtime.RequiredError(
|
|
163
|
-
'auth',
|
|
164
|
-
'Required parameter "auth" was null or undefined when calling accountInactiveOrders().'
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
161
|
if (requestParameters['account_index'] == null) {
|
|
169
162
|
throw new runtime.RequiredError(
|
|
170
163
|
'account_index',
|
|
@@ -211,6 +204,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
211
204
|
|
|
212
205
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
213
206
|
|
|
207
|
+
if (requestParameters['authorization'] != null) {
|
|
208
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
209
|
+
}
|
|
210
|
+
|
|
214
211
|
const response = await this.request({
|
|
215
212
|
path: `/api/v1/accountInactiveOrders`,
|
|
216
213
|
method: 'GET',
|
|
@@ -485,6 +482,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
485
482
|
|
|
486
483
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
487
484
|
|
|
485
|
+
if (requestParameters['authorization'] != null) {
|
|
486
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
487
|
+
}
|
|
488
|
+
|
|
488
489
|
const response = await this.request({
|
|
489
490
|
path: `/api/v1/trades`,
|
|
490
491
|
method: 'GET',
|
package/apis/ReferralApi.ts
CHANGED
|
@@ -29,18 +29,21 @@ import {
|
|
|
29
29
|
} from '../models/index';
|
|
30
30
|
|
|
31
31
|
export interface ReferralCreateRequest {
|
|
32
|
-
auth: string;
|
|
33
32
|
account_index: number;
|
|
33
|
+
authorization?: string;
|
|
34
|
+
auth?: string;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export interface ReferralGetRequest {
|
|
37
|
-
auth: string;
|
|
38
38
|
account_index: number;
|
|
39
|
+
authorization?: string;
|
|
40
|
+
auth?: string;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export interface ReferralPointsRequest {
|
|
42
|
-
auth: string;
|
|
43
44
|
account_index: number;
|
|
45
|
+
authorization?: string;
|
|
46
|
+
auth?: string;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
export interface ReferralUseRequest {
|
|
@@ -61,13 +64,6 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
61
64
|
* referral_create
|
|
62
65
|
*/
|
|
63
66
|
async referralCreateRaw(requestParameters: ReferralCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReferralCode>> {
|
|
64
|
-
if (requestParameters['auth'] == null) {
|
|
65
|
-
throw new runtime.RequiredError(
|
|
66
|
-
'auth',
|
|
67
|
-
'Required parameter "auth" was null or undefined when calling referralCreate().'
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
67
|
if (requestParameters['account_index'] == null) {
|
|
72
68
|
throw new runtime.RequiredError(
|
|
73
69
|
'account_index',
|
|
@@ -79,6 +75,10 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
79
75
|
|
|
80
76
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
77
|
|
|
78
|
+
if (requestParameters['authorization'] != null) {
|
|
79
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
82
|
const consumes: runtime.Consume[] = [
|
|
83
83
|
{ contentType: 'multipart/form-data' },
|
|
84
84
|
];
|
|
@@ -126,13 +126,6 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
126
126
|
* referral_get
|
|
127
127
|
*/
|
|
128
128
|
async referralGetRaw(requestParameters: ReferralGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReferralCode>> {
|
|
129
|
-
if (requestParameters['auth'] == null) {
|
|
130
|
-
throw new runtime.RequiredError(
|
|
131
|
-
'auth',
|
|
132
|
-
'Required parameter "auth" was null or undefined when calling referralGet().'
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
129
|
if (requestParameters['account_index'] == null) {
|
|
137
130
|
throw new runtime.RequiredError(
|
|
138
131
|
'account_index',
|
|
@@ -152,6 +145,10 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
152
145
|
|
|
153
146
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
154
147
|
|
|
148
|
+
if (requestParameters['authorization'] != null) {
|
|
149
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
150
|
+
}
|
|
151
|
+
|
|
155
152
|
const response = await this.request({
|
|
156
153
|
path: `/api/v1/referral/get`,
|
|
157
154
|
method: 'GET',
|
|
@@ -176,13 +173,6 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
176
173
|
* referral_points
|
|
177
174
|
*/
|
|
178
175
|
async referralPointsRaw(requestParameters: ReferralPointsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReferralPoints>> {
|
|
179
|
-
if (requestParameters['auth'] == null) {
|
|
180
|
-
throw new runtime.RequiredError(
|
|
181
|
-
'auth',
|
|
182
|
-
'Required parameter "auth" was null or undefined when calling referralPoints().'
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
176
|
if (requestParameters['account_index'] == null) {
|
|
187
177
|
throw new runtime.RequiredError(
|
|
188
178
|
'account_index',
|
|
@@ -202,6 +192,10 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
202
192
|
|
|
203
193
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
194
|
|
|
195
|
+
if (requestParameters['authorization'] != null) {
|
|
196
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
197
|
+
}
|
|
198
|
+
|
|
205
199
|
const response = await this.request({
|
|
206
200
|
path: `/api/v1/referral/points`,
|
|
207
201
|
method: 'GET',
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -64,8 +64,9 @@ export interface BlockTxsRequest {
|
|
|
64
64
|
|
|
65
65
|
export interface DepositHistoryRequest {
|
|
66
66
|
account_index: number;
|
|
67
|
-
auth: string;
|
|
68
67
|
l1_address: string;
|
|
68
|
+
authorization?: string;
|
|
69
|
+
auth?: string;
|
|
69
70
|
cursor?: string;
|
|
70
71
|
filter?: DepositHistoryFilterEnum;
|
|
71
72
|
}
|
|
@@ -97,6 +98,7 @@ export interface SetAccountMetadataRequest {
|
|
|
97
98
|
api_key_index: number;
|
|
98
99
|
metadata: string;
|
|
99
100
|
auth: string;
|
|
101
|
+
authorization?: string;
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
export interface TxRequest {
|
|
@@ -115,7 +117,8 @@ export interface TxsRequest {
|
|
|
115
117
|
|
|
116
118
|
export interface WithdrawHistoryRequest {
|
|
117
119
|
account_index: number;
|
|
118
|
-
|
|
120
|
+
authorizatio?: string;
|
|
121
|
+
auth?: string;
|
|
119
122
|
cursor?: string;
|
|
120
123
|
filter?: WithdrawHistoryFilterEnum;
|
|
121
124
|
}
|
|
@@ -310,13 +313,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
310
313
|
);
|
|
311
314
|
}
|
|
312
315
|
|
|
313
|
-
if (requestParameters['auth'] == null) {
|
|
314
|
-
throw new runtime.RequiredError(
|
|
315
|
-
'auth',
|
|
316
|
-
'Required parameter "auth" was null or undefined when calling depositHistory().'
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
316
|
if (requestParameters['l1_address'] == null) {
|
|
321
317
|
throw new runtime.RequiredError(
|
|
322
318
|
'l1_address',
|
|
@@ -348,6 +344,10 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
348
344
|
|
|
349
345
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
350
346
|
|
|
347
|
+
if (requestParameters['authorization'] != null) {
|
|
348
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
351
|
const response = await this.request({
|
|
352
352
|
path: `/api/v1/deposit/history`,
|
|
353
353
|
method: 'GET',
|
|
@@ -638,6 +638,10 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
638
638
|
|
|
639
639
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
640
640
|
|
|
641
|
+
if (requestParameters['authorization'] != null) {
|
|
642
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
643
|
+
}
|
|
644
|
+
|
|
641
645
|
const consumes: runtime.Consume[] = [
|
|
642
646
|
{ contentType: 'multipart/form-data' },
|
|
643
647
|
];
|
|
@@ -836,13 +840,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
836
840
|
);
|
|
837
841
|
}
|
|
838
842
|
|
|
839
|
-
if (requestParameters['auth'] == null) {
|
|
840
|
-
throw new runtime.RequiredError(
|
|
841
|
-
'auth',
|
|
842
|
-
'Required parameter "auth" was null or undefined when calling withdrawHistory().'
|
|
843
|
-
);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
843
|
const queryParameters: any = {};
|
|
847
844
|
|
|
848
845
|
if (requestParameters['account_index'] != null) {
|
|
@@ -863,6 +860,10 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
863
860
|
|
|
864
861
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
865
862
|
|
|
863
|
+
if (requestParameters['authorizatio'] != null) {
|
|
864
|
+
headerParameters['authorizatio'] = String(requestParameters['authorizatio']);
|
|
865
|
+
}
|
|
866
|
+
|
|
866
867
|
const response = await this.request({
|
|
867
868
|
path: `/api/v1/withdraw/history`,
|
|
868
869
|
method: 'GET',
|