zklighter-perps 1.0.120 → 1.0.122
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 +10 -0
- package/apis/AccountApi.ts +231 -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/LiqTrade.ts +88 -0
- package/models/Liquidation.ts +56 -23
- package/models/LiquidationInfo.ts +107 -0
- package/models/LiquidationInfos.ts +93 -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/ReqGetLiquidationInfos.ts +94 -0
- package/models/ReqGetReferralCode.ts +3 -4
- package/models/ReqGetReferralPoints.ts +3 -4
- package/models/ReqGetWithdrawHistory.ts +3 -4
- package/models/RiskInfo.ts +97 -0
- package/models/index.ts +10 -0
- package/openapi.json +616 -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,10 +49,15 @@ 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
|
|
54
56
|
models/LeaderboardEntry.ts
|
|
57
|
+
models/LiqTrade.ts
|
|
58
|
+
models/Liquidation.ts
|
|
59
|
+
models/LiquidationInfo.ts
|
|
60
|
+
models/LiquidationInfos.ts
|
|
55
61
|
models/MarketInfo.ts
|
|
56
62
|
models/NextNonce.ts
|
|
57
63
|
models/Order.ts
|
|
@@ -81,6 +87,7 @@ models/ReqGetAccountApiKeys.ts
|
|
|
81
87
|
models/ReqGetAccountByL1Address.ts
|
|
82
88
|
models/ReqGetAccountInactiveOrders.ts
|
|
83
89
|
models/ReqGetAccountLimits.ts
|
|
90
|
+
models/ReqGetAccountMetadata.ts
|
|
84
91
|
models/ReqGetAccountPendingTxs.ts
|
|
85
92
|
models/ReqGetAccountPnL.ts
|
|
86
93
|
models/ReqGetAccountTxs.ts
|
|
@@ -91,9 +98,11 @@ models/ReqGetCandlesticks.ts
|
|
|
91
98
|
models/ReqGetDepositHistory.ts
|
|
92
99
|
models/ReqGetFastWithdrawInfo.ts
|
|
93
100
|
models/ReqGetFundings.ts
|
|
101
|
+
models/ReqGetL1Metadata.ts
|
|
94
102
|
models/ReqGetL1Tx.ts
|
|
95
103
|
models/ReqGetLatestDeposit.ts
|
|
96
104
|
models/ReqGetLeaderboard.ts
|
|
105
|
+
models/ReqGetLiquidationInfos.ts
|
|
97
106
|
models/ReqGetNextNonce.ts
|
|
98
107
|
models/ReqGetOrderBookDetails.ts
|
|
99
108
|
models/ReqGetOrderBookOrders.ts
|
|
@@ -113,6 +122,7 @@ models/ReqIsWhitelisted.ts
|
|
|
113
122
|
models/RespGetFastBridgeInfo.ts
|
|
114
123
|
models/RespGetFastwithdrawalInfo.ts
|
|
115
124
|
models/ResultCode.ts
|
|
125
|
+
models/RiskInfo.ts
|
|
116
126
|
models/SimpleOrder.ts
|
|
117
127
|
models/Status.ts
|
|
118
128
|
models/SubAccounts.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -17,10 +17,13 @@ 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,
|
|
26
|
+
LiquidationInfos,
|
|
24
27
|
PositionFundings,
|
|
25
28
|
PublicPools,
|
|
26
29
|
ResultCode,
|
|
@@ -31,14 +34,20 @@ import {
|
|
|
31
34
|
AccountApiKeysToJSON,
|
|
32
35
|
AccountLimitsFromJSON,
|
|
33
36
|
AccountLimitsToJSON,
|
|
37
|
+
AccountMetadatasFromJSON,
|
|
38
|
+
AccountMetadatasToJSON,
|
|
34
39
|
AccountPnLFromJSON,
|
|
35
40
|
AccountPnLToJSON,
|
|
36
41
|
DetailedAccountsFromJSON,
|
|
37
42
|
DetailedAccountsToJSON,
|
|
38
43
|
IsWhitelistedFromJSON,
|
|
39
44
|
IsWhitelistedToJSON,
|
|
45
|
+
L1MetadataFromJSON,
|
|
46
|
+
L1MetadataToJSON,
|
|
40
47
|
LeaderboardFromJSON,
|
|
41
48
|
LeaderboardToJSON,
|
|
49
|
+
LiquidationInfosFromJSON,
|
|
50
|
+
LiquidationInfosToJSON,
|
|
42
51
|
PositionFundingsFromJSON,
|
|
43
52
|
PositionFundingsToJSON,
|
|
44
53
|
PublicPoolsFromJSON,
|
|
@@ -56,7 +65,15 @@ export interface AccountRequest {
|
|
|
56
65
|
|
|
57
66
|
export interface AccountLimitsRequest {
|
|
58
67
|
account_index: number;
|
|
59
|
-
|
|
68
|
+
authorization?: string;
|
|
69
|
+
auth?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface AccountMetadataRequest {
|
|
73
|
+
by: AccountMetadataByEnum;
|
|
74
|
+
value: string;
|
|
75
|
+
authorization?: string;
|
|
76
|
+
auth?: string;
|
|
60
77
|
}
|
|
61
78
|
|
|
62
79
|
export interface AccountsByL1AddressRequest {
|
|
@@ -76,11 +93,26 @@ export interface IsWhitelistedRequest {
|
|
|
76
93
|
l1_address: string;
|
|
77
94
|
}
|
|
78
95
|
|
|
96
|
+
export interface L1MetadataRequest {
|
|
97
|
+
l1_address: string;
|
|
98
|
+
authorization?: string;
|
|
99
|
+
auth?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
79
102
|
export interface LeaderboardRequest {
|
|
80
103
|
type: LeaderboardTypeEnum;
|
|
81
104
|
l1_address?: string;
|
|
82
105
|
}
|
|
83
106
|
|
|
107
|
+
export interface LiquidationsRequest {
|
|
108
|
+
account_index: number;
|
|
109
|
+
limit: number;
|
|
110
|
+
authorization?: string;
|
|
111
|
+
auth?: string;
|
|
112
|
+
market_id?: number;
|
|
113
|
+
cursor?: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
84
116
|
export interface PnlRequest {
|
|
85
117
|
by: PnlByEnum;
|
|
86
118
|
value: string;
|
|
@@ -88,6 +120,7 @@ export interface PnlRequest {
|
|
|
88
120
|
start_timestamp: number;
|
|
89
121
|
end_timestamp: number;
|
|
90
122
|
count_back: number;
|
|
123
|
+
authorization?: string;
|
|
91
124
|
auth?: string;
|
|
92
125
|
ignore_transfers?: boolean;
|
|
93
126
|
}
|
|
@@ -95,6 +128,7 @@ export interface PnlRequest {
|
|
|
95
128
|
export interface PositionFundingRequest {
|
|
96
129
|
account_index: number;
|
|
97
130
|
limit: number;
|
|
131
|
+
authorization?: string;
|
|
98
132
|
auth?: string;
|
|
99
133
|
market_id?: number;
|
|
100
134
|
cursor?: string;
|
|
@@ -104,6 +138,7 @@ export interface PositionFundingRequest {
|
|
|
104
138
|
export interface PublicPoolsRequest {
|
|
105
139
|
index: number;
|
|
106
140
|
limit: number;
|
|
141
|
+
authorization?: string;
|
|
107
142
|
auth?: string;
|
|
108
143
|
filter?: PublicPoolsFilterEnum;
|
|
109
144
|
account_index?: number;
|
|
@@ -176,13 +211,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
176
211
|
);
|
|
177
212
|
}
|
|
178
213
|
|
|
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
214
|
const queryParameters: any = {};
|
|
187
215
|
|
|
188
216
|
if (requestParameters['account_index'] != null) {
|
|
@@ -195,6 +223,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
195
223
|
|
|
196
224
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
197
225
|
|
|
226
|
+
if (requestParameters['authorization'] != null) {
|
|
227
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
228
|
+
}
|
|
229
|
+
|
|
198
230
|
const response = await this.request({
|
|
199
231
|
path: `/api/v1/accountLimits`,
|
|
200
232
|
method: 'GET',
|
|
@@ -214,6 +246,64 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
214
246
|
return await response.value();
|
|
215
247
|
}
|
|
216
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Get account metadatas
|
|
251
|
+
* accountMetadata
|
|
252
|
+
*/
|
|
253
|
+
async accountMetadataRaw(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountMetadatas>> {
|
|
254
|
+
if (requestParameters['by'] == null) {
|
|
255
|
+
throw new runtime.RequiredError(
|
|
256
|
+
'by',
|
|
257
|
+
'Required parameter "by" was null or undefined when calling accountMetadata().'
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (requestParameters['value'] == null) {
|
|
262
|
+
throw new runtime.RequiredError(
|
|
263
|
+
'value',
|
|
264
|
+
'Required parameter "value" was null or undefined when calling accountMetadata().'
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const queryParameters: any = {};
|
|
269
|
+
|
|
270
|
+
if (requestParameters['by'] != null) {
|
|
271
|
+
queryParameters['by'] = requestParameters['by'];
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (requestParameters['value'] != null) {
|
|
275
|
+
queryParameters['value'] = requestParameters['value'];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (requestParameters['auth'] != null) {
|
|
279
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
283
|
+
|
|
284
|
+
if (requestParameters['authorization'] != null) {
|
|
285
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const response = await this.request({
|
|
289
|
+
path: `/api/v1/accountMetadata`,
|
|
290
|
+
method: 'GET',
|
|
291
|
+
headers: headerParameters,
|
|
292
|
+
query: queryParameters,
|
|
293
|
+
}, initOverrides);
|
|
294
|
+
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountMetadatasFromJSON(jsonValue));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Get account metadatas
|
|
300
|
+
* accountMetadata
|
|
301
|
+
*/
|
|
302
|
+
async accountMetadata(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountMetadatas> {
|
|
303
|
+
const response = await this.accountMetadataRaw(requestParameters, initOverrides);
|
|
304
|
+
return await response.value();
|
|
305
|
+
}
|
|
306
|
+
|
|
217
307
|
/**
|
|
218
308
|
* Get accounts by l1_address returns all accounts associated with the given L1 address
|
|
219
309
|
* accountsByL1Address
|
|
@@ -374,6 +464,53 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
374
464
|
return await response.value();
|
|
375
465
|
}
|
|
376
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Get L1 metadata
|
|
469
|
+
* l1Metadata
|
|
470
|
+
*/
|
|
471
|
+
async l1MetadataRaw(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<L1Metadata>> {
|
|
472
|
+
if (requestParameters['l1_address'] == null) {
|
|
473
|
+
throw new runtime.RequiredError(
|
|
474
|
+
'l1_address',
|
|
475
|
+
'Required parameter "l1_address" was null or undefined when calling l1Metadata().'
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
const queryParameters: any = {};
|
|
480
|
+
|
|
481
|
+
if (requestParameters['auth'] != null) {
|
|
482
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (requestParameters['l1_address'] != null) {
|
|
486
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
490
|
+
|
|
491
|
+
if (requestParameters['authorization'] != null) {
|
|
492
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const response = await this.request({
|
|
496
|
+
path: `/api/v1/l1Metadata`,
|
|
497
|
+
method: 'GET',
|
|
498
|
+
headers: headerParameters,
|
|
499
|
+
query: queryParameters,
|
|
500
|
+
}, initOverrides);
|
|
501
|
+
|
|
502
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => L1MetadataFromJSON(jsonValue));
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Get L1 metadata
|
|
507
|
+
* l1Metadata
|
|
508
|
+
*/
|
|
509
|
+
async l1Metadata(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<L1Metadata> {
|
|
510
|
+
const response = await this.l1MetadataRaw(requestParameters, initOverrides);
|
|
511
|
+
return await response.value();
|
|
512
|
+
}
|
|
513
|
+
|
|
377
514
|
/**
|
|
378
515
|
* Get points leaderboard
|
|
379
516
|
* leaderboard
|
|
@@ -417,6 +554,72 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
417
554
|
return await response.value();
|
|
418
555
|
}
|
|
419
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Get liquidation infos
|
|
559
|
+
* liquidations
|
|
560
|
+
*/
|
|
561
|
+
async liquidationsRaw(requestParameters: LiquidationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiquidationInfos>> {
|
|
562
|
+
if (requestParameters['account_index'] == null) {
|
|
563
|
+
throw new runtime.RequiredError(
|
|
564
|
+
'account_index',
|
|
565
|
+
'Required parameter "account_index" was null or undefined when calling liquidations().'
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
if (requestParameters['limit'] == null) {
|
|
570
|
+
throw new runtime.RequiredError(
|
|
571
|
+
'limit',
|
|
572
|
+
'Required parameter "limit" was null or undefined when calling liquidations().'
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
const queryParameters: any = {};
|
|
577
|
+
|
|
578
|
+
if (requestParameters['auth'] != null) {
|
|
579
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (requestParameters['account_index'] != null) {
|
|
583
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
if (requestParameters['market_id'] != null) {
|
|
587
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
if (requestParameters['cursor'] != null) {
|
|
591
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
if (requestParameters['limit'] != null) {
|
|
595
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
599
|
+
|
|
600
|
+
if (requestParameters['authorization'] != null) {
|
|
601
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
const response = await this.request({
|
|
605
|
+
path: `/api/v1/liquidations`,
|
|
606
|
+
method: 'GET',
|
|
607
|
+
headers: headerParameters,
|
|
608
|
+
query: queryParameters,
|
|
609
|
+
}, initOverrides);
|
|
610
|
+
|
|
611
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LiquidationInfosFromJSON(jsonValue));
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Get liquidation infos
|
|
616
|
+
* liquidations
|
|
617
|
+
*/
|
|
618
|
+
async liquidations(requestParameters: LiquidationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiquidationInfos> {
|
|
619
|
+
const response = await this.liquidationsRaw(requestParameters, initOverrides);
|
|
620
|
+
return await response.value();
|
|
621
|
+
}
|
|
622
|
+
|
|
420
623
|
/**
|
|
421
624
|
* Get account PnL chart
|
|
422
625
|
* pnl
|
|
@@ -500,6 +703,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
500
703
|
|
|
501
704
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
502
705
|
|
|
706
|
+
if (requestParameters['authorization'] != null) {
|
|
707
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
708
|
+
}
|
|
709
|
+
|
|
503
710
|
const response = await this.request({
|
|
504
711
|
path: `/api/v1/pnl`,
|
|
505
712
|
method: 'GET',
|
|
@@ -566,6 +773,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
566
773
|
|
|
567
774
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
568
775
|
|
|
776
|
+
if (requestParameters['authorization'] != null) {
|
|
777
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
778
|
+
}
|
|
779
|
+
|
|
569
780
|
const response = await this.request({
|
|
570
781
|
path: `/api/v1/positionFunding`,
|
|
571
782
|
method: 'GET',
|
|
@@ -628,6 +839,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
628
839
|
|
|
629
840
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
630
841
|
|
|
842
|
+
if (requestParameters['authorization'] != null) {
|
|
843
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
844
|
+
}
|
|
845
|
+
|
|
631
846
|
const response = await this.request({
|
|
632
847
|
path: `/api/v1/publicPools`,
|
|
633
848
|
method: 'GET',
|
|
@@ -657,6 +872,14 @@ export const AccountByEnum = {
|
|
|
657
872
|
L1Address: 'l1_address'
|
|
658
873
|
} as const;
|
|
659
874
|
export type AccountByEnum = typeof AccountByEnum[keyof typeof AccountByEnum];
|
|
875
|
+
/**
|
|
876
|
+
* @export
|
|
877
|
+
*/
|
|
878
|
+
export const AccountMetadataByEnum = {
|
|
879
|
+
Index: 'index',
|
|
880
|
+
L1Address: 'l1_address'
|
|
881
|
+
} as const;
|
|
882
|
+
export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof AccountMetadataByEnum];
|
|
660
883
|
/**
|
|
661
884
|
* @export
|
|
662
885
|
*/
|
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',
|