zklighter-perps 1.0.119 → 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 -3
- package/apis/AccountApi.ts +137 -38
- package/apis/BridgeApi.ts +12 -16
- package/apis/NotificationApi.ts +6 -8
- package/apis/OrderApi.ts +17 -101
- 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/ReqGetTrades.ts +0 -1
- package/models/ReqGetWithdrawHistory.ts +3 -4
- package/models/RespGetFastwithdrawalInfo.ts +9 -0
- package/models/Trade.ts +24 -6
- package/models/index.ts +4 -3
- package/openapi.json +340 -186
- 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
|
|
@@ -43,12 +44,12 @@ models/DetailedAccounts.ts
|
|
|
43
44
|
models/DetailedCandlestick.ts
|
|
44
45
|
models/EnrichedTx.ts
|
|
45
46
|
models/ExchangeStats.ts
|
|
46
|
-
models/FeeBucket.ts
|
|
47
47
|
models/Funding.ts
|
|
48
48
|
models/FundingRate.ts
|
|
49
49
|
models/FundingRates.ts
|
|
50
50
|
models/Fundings.ts
|
|
51
51
|
models/IsWhitelisted.ts
|
|
52
|
+
models/L1Metadata.ts
|
|
52
53
|
models/L1ProviderInfo.ts
|
|
53
54
|
models/Layer1BasicInfo.ts
|
|
54
55
|
models/Leaderboard.ts
|
|
@@ -82,7 +83,7 @@ models/ReqGetAccountApiKeys.ts
|
|
|
82
83
|
models/ReqGetAccountByL1Address.ts
|
|
83
84
|
models/ReqGetAccountInactiveOrders.ts
|
|
84
85
|
models/ReqGetAccountLimits.ts
|
|
85
|
-
models/
|
|
86
|
+
models/ReqGetAccountMetadata.ts
|
|
86
87
|
models/ReqGetAccountPendingTxs.ts
|
|
87
88
|
models/ReqGetAccountPnL.ts
|
|
88
89
|
models/ReqGetAccountTxs.ts
|
|
@@ -92,8 +93,8 @@ models/ReqGetByAccount.ts
|
|
|
92
93
|
models/ReqGetCandlesticks.ts
|
|
93
94
|
models/ReqGetDepositHistory.ts
|
|
94
95
|
models/ReqGetFastWithdrawInfo.ts
|
|
95
|
-
models/ReqGetFeeBucket.ts
|
|
96
96
|
models/ReqGetFundings.ts
|
|
97
|
+
models/ReqGetL1Metadata.ts
|
|
97
98
|
models/ReqGetL1Tx.ts
|
|
98
99
|
models/ReqGetLatestDeposit.ts
|
|
99
100
|
models/ReqGetLeaderboard.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -17,10 +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
|
-
FeeBucket,
|
|
23
23
|
IsWhitelisted,
|
|
24
|
+
L1Metadata,
|
|
24
25
|
Leaderboard,
|
|
25
26
|
PositionFundings,
|
|
26
27
|
PublicPools,
|
|
@@ -32,14 +33,16 @@ import {
|
|
|
32
33
|
AccountApiKeysToJSON,
|
|
33
34
|
AccountLimitsFromJSON,
|
|
34
35
|
AccountLimitsToJSON,
|
|
36
|
+
AccountMetadatasFromJSON,
|
|
37
|
+
AccountMetadatasToJSON,
|
|
35
38
|
AccountPnLFromJSON,
|
|
36
39
|
AccountPnLToJSON,
|
|
37
40
|
DetailedAccountsFromJSON,
|
|
38
41
|
DetailedAccountsToJSON,
|
|
39
|
-
FeeBucketFromJSON,
|
|
40
|
-
FeeBucketToJSON,
|
|
41
42
|
IsWhitelistedFromJSON,
|
|
42
43
|
IsWhitelistedToJSON,
|
|
44
|
+
L1MetadataFromJSON,
|
|
45
|
+
L1MetadataToJSON,
|
|
43
46
|
LeaderboardFromJSON,
|
|
44
47
|
LeaderboardToJSON,
|
|
45
48
|
PositionFundingsFromJSON,
|
|
@@ -59,7 +62,15 @@ export interface AccountRequest {
|
|
|
59
62
|
|
|
60
63
|
export interface AccountLimitsRequest {
|
|
61
64
|
account_index: number;
|
|
62
|
-
|
|
65
|
+
authorization?: string;
|
|
66
|
+
auth?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface AccountMetadataRequest {
|
|
70
|
+
by: AccountMetadataByEnum;
|
|
71
|
+
value: string;
|
|
72
|
+
authorization?: string;
|
|
73
|
+
auth?: string;
|
|
63
74
|
}
|
|
64
75
|
|
|
65
76
|
export interface AccountsByL1AddressRequest {
|
|
@@ -75,12 +86,14 @@ export interface FaucetRequest {
|
|
|
75
86
|
l1_address: string;
|
|
76
87
|
}
|
|
77
88
|
|
|
78
|
-
export interface
|
|
79
|
-
|
|
89
|
+
export interface IsWhitelistedRequest {
|
|
90
|
+
l1_address: string;
|
|
80
91
|
}
|
|
81
92
|
|
|
82
|
-
export interface
|
|
93
|
+
export interface L1MetadataRequest {
|
|
83
94
|
l1_address: string;
|
|
95
|
+
authorization?: string;
|
|
96
|
+
auth?: string;
|
|
84
97
|
}
|
|
85
98
|
|
|
86
99
|
export interface LeaderboardRequest {
|
|
@@ -95,6 +108,7 @@ export interface PnlRequest {
|
|
|
95
108
|
start_timestamp: number;
|
|
96
109
|
end_timestamp: number;
|
|
97
110
|
count_back: number;
|
|
111
|
+
authorization?: string;
|
|
98
112
|
auth?: string;
|
|
99
113
|
ignore_transfers?: boolean;
|
|
100
114
|
}
|
|
@@ -102,6 +116,7 @@ export interface PnlRequest {
|
|
|
102
116
|
export interface PositionFundingRequest {
|
|
103
117
|
account_index: number;
|
|
104
118
|
limit: number;
|
|
119
|
+
authorization?: string;
|
|
105
120
|
auth?: string;
|
|
106
121
|
market_id?: number;
|
|
107
122
|
cursor?: string;
|
|
@@ -111,6 +126,7 @@ export interface PositionFundingRequest {
|
|
|
111
126
|
export interface PublicPoolsRequest {
|
|
112
127
|
index: number;
|
|
113
128
|
limit: number;
|
|
129
|
+
authorization?: string;
|
|
114
130
|
auth?: string;
|
|
115
131
|
filter?: PublicPoolsFilterEnum;
|
|
116
132
|
account_index?: number;
|
|
@@ -183,13 +199,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
183
199
|
);
|
|
184
200
|
}
|
|
185
201
|
|
|
186
|
-
if (requestParameters['auth'] == null) {
|
|
187
|
-
throw new runtime.RequiredError(
|
|
188
|
-
'auth',
|
|
189
|
-
'Required parameter "auth" was null or undefined when calling accountLimits().'
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
202
|
const queryParameters: any = {};
|
|
194
203
|
|
|
195
204
|
if (requestParameters['account_index'] != null) {
|
|
@@ -202,6 +211,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
202
211
|
|
|
203
212
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
213
|
|
|
214
|
+
if (requestParameters['authorization'] != null) {
|
|
215
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
216
|
+
}
|
|
217
|
+
|
|
205
218
|
const response = await this.request({
|
|
206
219
|
path: `/api/v1/accountLimits`,
|
|
207
220
|
method: 'GET',
|
|
@@ -221,6 +234,64 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
221
234
|
return await response.value();
|
|
222
235
|
}
|
|
223
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
|
+
|
|
224
295
|
/**
|
|
225
296
|
* Get accounts by l1_address returns all accounts associated with the given L1 address
|
|
226
297
|
* accountsByL1Address
|
|
@@ -343,80 +414,88 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
343
414
|
}
|
|
344
415
|
|
|
345
416
|
/**
|
|
346
|
-
* Get account
|
|
347
|
-
*
|
|
417
|
+
* Get is account whitelisted
|
|
418
|
+
* isWhitelisted
|
|
348
419
|
*/
|
|
349
|
-
async
|
|
350
|
-
if (requestParameters['
|
|
420
|
+
async isWhitelistedRaw(requestParameters: IsWhitelistedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IsWhitelisted>> {
|
|
421
|
+
if (requestParameters['l1_address'] == null) {
|
|
351
422
|
throw new runtime.RequiredError(
|
|
352
|
-
'
|
|
353
|
-
'Required parameter "
|
|
423
|
+
'l1_address',
|
|
424
|
+
'Required parameter "l1_address" was null or undefined when calling isWhitelisted().'
|
|
354
425
|
);
|
|
355
426
|
}
|
|
356
427
|
|
|
357
428
|
const queryParameters: any = {};
|
|
358
429
|
|
|
359
|
-
if (requestParameters['
|
|
360
|
-
queryParameters['
|
|
430
|
+
if (requestParameters['l1_address'] != null) {
|
|
431
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
361
432
|
}
|
|
362
433
|
|
|
363
434
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
364
435
|
|
|
365
436
|
const response = await this.request({
|
|
366
|
-
path: `/api/v1/
|
|
437
|
+
path: `/api/v1/isWhitelisted`,
|
|
367
438
|
method: 'GET',
|
|
368
439
|
headers: headerParameters,
|
|
369
440
|
query: queryParameters,
|
|
370
441
|
}, initOverrides);
|
|
371
442
|
|
|
372
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IsWhitelistedFromJSON(jsonValue));
|
|
373
444
|
}
|
|
374
445
|
|
|
375
446
|
/**
|
|
376
|
-
* Get account
|
|
377
|
-
*
|
|
447
|
+
* Get is account whitelisted
|
|
448
|
+
* isWhitelisted
|
|
378
449
|
*/
|
|
379
|
-
async
|
|
380
|
-
const response = await this.
|
|
450
|
+
async isWhitelisted(requestParameters: IsWhitelistedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IsWhitelisted> {
|
|
451
|
+
const response = await this.isWhitelistedRaw(requestParameters, initOverrides);
|
|
381
452
|
return await response.value();
|
|
382
453
|
}
|
|
383
454
|
|
|
384
455
|
/**
|
|
385
|
-
* Get
|
|
386
|
-
*
|
|
456
|
+
* Get L1 metadata
|
|
457
|
+
* l1Metadata
|
|
387
458
|
*/
|
|
388
|
-
async
|
|
459
|
+
async l1MetadataRaw(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<L1Metadata>> {
|
|
389
460
|
if (requestParameters['l1_address'] == null) {
|
|
390
461
|
throw new runtime.RequiredError(
|
|
391
462
|
'l1_address',
|
|
392
|
-
'Required parameter "l1_address" was null or undefined when calling
|
|
463
|
+
'Required parameter "l1_address" was null or undefined when calling l1Metadata().'
|
|
393
464
|
);
|
|
394
465
|
}
|
|
395
466
|
|
|
396
467
|
const queryParameters: any = {};
|
|
397
468
|
|
|
469
|
+
if (requestParameters['auth'] != null) {
|
|
470
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
471
|
+
}
|
|
472
|
+
|
|
398
473
|
if (requestParameters['l1_address'] != null) {
|
|
399
474
|
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
400
475
|
}
|
|
401
476
|
|
|
402
477
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
403
478
|
|
|
479
|
+
if (requestParameters['authorization'] != null) {
|
|
480
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
481
|
+
}
|
|
482
|
+
|
|
404
483
|
const response = await this.request({
|
|
405
|
-
path: `/api/v1/
|
|
484
|
+
path: `/api/v1/l1Metadata`,
|
|
406
485
|
method: 'GET',
|
|
407
486
|
headers: headerParameters,
|
|
408
487
|
query: queryParameters,
|
|
409
488
|
}, initOverrides);
|
|
410
489
|
|
|
411
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
490
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => L1MetadataFromJSON(jsonValue));
|
|
412
491
|
}
|
|
413
492
|
|
|
414
493
|
/**
|
|
415
|
-
* Get
|
|
416
|
-
*
|
|
494
|
+
* Get L1 metadata
|
|
495
|
+
* l1Metadata
|
|
417
496
|
*/
|
|
418
|
-
async
|
|
419
|
-
const response = await this.
|
|
497
|
+
async l1Metadata(requestParameters: L1MetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<L1Metadata> {
|
|
498
|
+
const response = await this.l1MetadataRaw(requestParameters, initOverrides);
|
|
420
499
|
return await response.value();
|
|
421
500
|
}
|
|
422
501
|
|
|
@@ -546,6 +625,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
546
625
|
|
|
547
626
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
548
627
|
|
|
628
|
+
if (requestParameters['authorization'] != null) {
|
|
629
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
630
|
+
}
|
|
631
|
+
|
|
549
632
|
const response = await this.request({
|
|
550
633
|
path: `/api/v1/pnl`,
|
|
551
634
|
method: 'GET',
|
|
@@ -612,6 +695,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
612
695
|
|
|
613
696
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
614
697
|
|
|
698
|
+
if (requestParameters['authorization'] != null) {
|
|
699
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
700
|
+
}
|
|
701
|
+
|
|
615
702
|
const response = await this.request({
|
|
616
703
|
path: `/api/v1/positionFunding`,
|
|
617
704
|
method: 'GET',
|
|
@@ -674,6 +761,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
674
761
|
|
|
675
762
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
676
763
|
|
|
764
|
+
if (requestParameters['authorization'] != null) {
|
|
765
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
766
|
+
}
|
|
767
|
+
|
|
677
768
|
const response = await this.request({
|
|
678
769
|
path: `/api/v1/publicPools`,
|
|
679
770
|
method: 'GET',
|
|
@@ -703,6 +794,14 @@ export const AccountByEnum = {
|
|
|
703
794
|
L1Address: 'l1_address'
|
|
704
795
|
} as const;
|
|
705
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];
|
|
706
805
|
/**
|
|
707
806
|
* @export
|
|
708
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,27 +43,21 @@ 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;
|
|
56
58
|
cursor?: string;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
export interface AccountOrdersRequest {
|
|
60
|
-
auth: string;
|
|
61
|
-
account_index: number;
|
|
62
|
-
market_id: number;
|
|
63
|
-
limit: number;
|
|
64
|
-
cursor?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
61
|
export interface OrderBookDetailsRequest {
|
|
68
62
|
market_id?: number;
|
|
69
63
|
}
|
|
@@ -85,6 +79,7 @@ export interface RecentTradesRequest {
|
|
|
85
79
|
export interface TradesRequest {
|
|
86
80
|
sort_by: TradesSortByEnum;
|
|
87
81
|
limit: number;
|
|
82
|
+
authorization?: string;
|
|
88
83
|
auth?: string;
|
|
89
84
|
market_id?: number;
|
|
90
85
|
account_index?: number;
|
|
@@ -119,13 +114,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
119
114
|
);
|
|
120
115
|
}
|
|
121
116
|
|
|
122
|
-
if (requestParameters['auth'] == null) {
|
|
123
|
-
throw new runtime.RequiredError(
|
|
124
|
-
'auth',
|
|
125
|
-
'Required parameter "auth" was null or undefined when calling accountActiveOrders().'
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
117
|
const queryParameters: any = {};
|
|
130
118
|
|
|
131
119
|
if (requestParameters['account_index'] != null) {
|
|
@@ -142,6 +130,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
142
130
|
|
|
143
131
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
144
132
|
|
|
133
|
+
if (requestParameters['authorization'] != null) {
|
|
134
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
135
|
+
}
|
|
136
|
+
|
|
145
137
|
const response = await this.request({
|
|
146
138
|
path: `/api/v1/accountActiveOrders`,
|
|
147
139
|
method: 'GET',
|
|
@@ -166,13 +158,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
166
158
|
* accountInactiveOrders
|
|
167
159
|
*/
|
|
168
160
|
async accountInactiveOrdersRaw(requestParameters: AccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
169
|
-
if (requestParameters['auth'] == null) {
|
|
170
|
-
throw new runtime.RequiredError(
|
|
171
|
-
'auth',
|
|
172
|
-
'Required parameter "auth" was null or undefined when calling accountInactiveOrders().'
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
161
|
if (requestParameters['account_index'] == null) {
|
|
177
162
|
throw new runtime.RequiredError(
|
|
178
163
|
'account_index',
|
|
@@ -219,6 +204,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
219
204
|
|
|
220
205
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
221
206
|
|
|
207
|
+
if (requestParameters['authorization'] != null) {
|
|
208
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
209
|
+
}
|
|
210
|
+
|
|
222
211
|
const response = await this.request({
|
|
223
212
|
path: `/api/v1/accountInactiveOrders`,
|
|
224
213
|
method: 'GET',
|
|
@@ -238,82 +227,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
238
227
|
return await response.value();
|
|
239
228
|
}
|
|
240
229
|
|
|
241
|
-
/**
|
|
242
|
-
* Get account orders
|
|
243
|
-
* accountOrders
|
|
244
|
-
*/
|
|
245
|
-
async accountOrdersRaw(requestParameters: AccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
246
|
-
if (requestParameters['auth'] == null) {
|
|
247
|
-
throw new runtime.RequiredError(
|
|
248
|
-
'auth',
|
|
249
|
-
'Required parameter "auth" was null or undefined when calling accountOrders().'
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (requestParameters['account_index'] == null) {
|
|
254
|
-
throw new runtime.RequiredError(
|
|
255
|
-
'account_index',
|
|
256
|
-
'Required parameter "account_index" was null or undefined when calling accountOrders().'
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
if (requestParameters['market_id'] == null) {
|
|
261
|
-
throw new runtime.RequiredError(
|
|
262
|
-
'market_id',
|
|
263
|
-
'Required parameter "market_id" was null or undefined when calling accountOrders().'
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
if (requestParameters['limit'] == null) {
|
|
268
|
-
throw new runtime.RequiredError(
|
|
269
|
-
'limit',
|
|
270
|
-
'Required parameter "limit" was null or undefined when calling accountOrders().'
|
|
271
|
-
);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const queryParameters: any = {};
|
|
275
|
-
|
|
276
|
-
if (requestParameters['auth'] != null) {
|
|
277
|
-
queryParameters['auth'] = requestParameters['auth'];
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
if (requestParameters['account_index'] != null) {
|
|
281
|
-
queryParameters['account_index'] = requestParameters['account_index'];
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
if (requestParameters['market_id'] != null) {
|
|
285
|
-
queryParameters['market_id'] = requestParameters['market_id'];
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (requestParameters['cursor'] != null) {
|
|
289
|
-
queryParameters['cursor'] = requestParameters['cursor'];
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (requestParameters['limit'] != null) {
|
|
293
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
297
|
-
|
|
298
|
-
const response = await this.request({
|
|
299
|
-
path: `/api/v1/accountOrders`,
|
|
300
|
-
method: 'GET',
|
|
301
|
-
headers: headerParameters,
|
|
302
|
-
query: queryParameters,
|
|
303
|
-
}, initOverrides);
|
|
304
|
-
|
|
305
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => OrdersFromJSON(jsonValue));
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Get account orders
|
|
310
|
-
* accountOrders
|
|
311
|
-
*/
|
|
312
|
-
async accountOrders(requestParameters: AccountOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Orders> {
|
|
313
|
-
const response = await this.accountOrdersRaw(requestParameters, initOverrides);
|
|
314
|
-
return await response.value();
|
|
315
|
-
}
|
|
316
|
-
|
|
317
230
|
/**
|
|
318
231
|
* Get exchange stats
|
|
319
232
|
* exchangeStats
|
|
@@ -569,6 +482,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
569
482
|
|
|
570
483
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
571
484
|
|
|
485
|
+
if (requestParameters['authorization'] != null) {
|
|
486
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
487
|
+
}
|
|
488
|
+
|
|
572
489
|
const response = await this.request({
|
|
573
490
|
path: `/api/v1/trades`,
|
|
574
491
|
method: 'GET',
|
|
@@ -603,7 +520,6 @@ export type TradesSortByEnum = typeof TradesSortByEnum[keyof typeof TradesSortBy
|
|
|
603
520
|
* @export
|
|
604
521
|
*/
|
|
605
522
|
export const TradesSortDirEnum = {
|
|
606
|
-
Asc: 'asc',
|
|
607
523
|
Desc: 'desc'
|
|
608
524
|
} as const;
|
|
609
525
|
export type TradesSortDirEnum = typeof TradesSortDirEnum[keyof typeof TradesSortDirEnum];
|