zklighter-perps 1.0.33 → 1.0.34
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 +5 -1
- package/apis/AccountApi.ts +58 -0
- package/apis/TransactionApi.ts +94 -73
- package/models/AccountMetadata.ts +70 -0
- package/models/DetailedAccount.ts +33 -0
- package/models/PublicPool.ts +166 -0
- package/models/PublicPoolInfo.ts +97 -0
- package/models/PublicPools.ts +85 -0
- package/models/ReqGetPublicPools.ts +70 -0
- package/models/index.ts +5 -1
- package/openapi.json +287 -59
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -11,6 +11,7 @@ index.ts
|
|
|
11
11
|
models/Account.ts
|
|
12
12
|
models/AccountApiKeys.ts
|
|
13
13
|
models/AccountMarketStats.ts
|
|
14
|
+
models/AccountMetadata.ts
|
|
14
15
|
models/AccountPnL.ts
|
|
15
16
|
models/AccountPosition.ts
|
|
16
17
|
models/AccountStats.ts
|
|
@@ -47,7 +48,10 @@ models/Orders.ts
|
|
|
47
48
|
models/Permission.ts
|
|
48
49
|
models/PnLEntry.ts
|
|
49
50
|
models/PriceLevel.ts
|
|
51
|
+
models/PublicPool.ts
|
|
52
|
+
models/PublicPoolInfo.ts
|
|
50
53
|
models/PublicPoolShare.ts
|
|
54
|
+
models/PublicPools.ts
|
|
51
55
|
models/ReqDoFaucet.ts
|
|
52
56
|
models/ReqGetAccount.ts
|
|
53
57
|
models/ReqGetAccountActiveOrders.ts
|
|
@@ -69,6 +73,7 @@ models/ReqGetOrderBookDetails.ts
|
|
|
69
73
|
models/ReqGetOrderBookOrders.ts
|
|
70
74
|
models/ReqGetOrderBooks.ts
|
|
71
75
|
models/ReqGetPermission.ts
|
|
76
|
+
models/ReqGetPublicPools.ts
|
|
72
77
|
models/ReqGetRangeWithCursor.ts
|
|
73
78
|
models/ReqGetRangeWithIndex.ts
|
|
74
79
|
models/ReqGetRangeWithIndexSortable.ts
|
|
@@ -80,7 +85,6 @@ models/ReqMarkNotifRead.ts
|
|
|
80
85
|
models/ResultCode.ts
|
|
81
86
|
models/Rollback.ts
|
|
82
87
|
models/Rollbacks.ts
|
|
83
|
-
models/SignBody.ts
|
|
84
88
|
models/SimpleOrder.ts
|
|
85
89
|
models/Status.ts
|
|
86
90
|
models/SubAccounts.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
AccountPnL,
|
|
20
20
|
Accounts,
|
|
21
21
|
DetailedAccounts,
|
|
22
|
+
PublicPools,
|
|
22
23
|
ResultCode,
|
|
23
24
|
SubAccounts,
|
|
24
25
|
} from '../models/index';
|
|
@@ -31,6 +32,8 @@ import {
|
|
|
31
32
|
AccountsToJSON,
|
|
32
33
|
DetailedAccountsFromJSON,
|
|
33
34
|
DetailedAccountsToJSON,
|
|
35
|
+
PublicPoolsFromJSON,
|
|
36
|
+
PublicPoolsToJSON,
|
|
34
37
|
ResultCodeFromJSON,
|
|
35
38
|
ResultCodeToJSON,
|
|
36
39
|
SubAccountsFromJSON,
|
|
@@ -70,6 +73,11 @@ export interface PnlRequest {
|
|
|
70
73
|
count_back: number;
|
|
71
74
|
}
|
|
72
75
|
|
|
76
|
+
export interface PublicPoolsRequest {
|
|
77
|
+
index: number;
|
|
78
|
+
limit: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
/**
|
|
74
82
|
*
|
|
75
83
|
*/
|
|
@@ -394,6 +402,56 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
394
402
|
return await response.value();
|
|
395
403
|
}
|
|
396
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Get public pools
|
|
407
|
+
* publicPools
|
|
408
|
+
*/
|
|
409
|
+
async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
|
|
410
|
+
if (requestParameters['index'] == null) {
|
|
411
|
+
throw new runtime.RequiredError(
|
|
412
|
+
'index',
|
|
413
|
+
'Required parameter "index" was null or undefined when calling publicPools().'
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (requestParameters['limit'] == null) {
|
|
418
|
+
throw new runtime.RequiredError(
|
|
419
|
+
'limit',
|
|
420
|
+
'Required parameter "limit" was null or undefined when calling publicPools().'
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const queryParameters: any = {};
|
|
425
|
+
|
|
426
|
+
if (requestParameters['index'] != null) {
|
|
427
|
+
queryParameters['index'] = requestParameters['index'];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (requestParameters['limit'] != null) {
|
|
431
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
435
|
+
|
|
436
|
+
const response = await this.request({
|
|
437
|
+
path: `/api/v1/publicPools`,
|
|
438
|
+
method: 'GET',
|
|
439
|
+
headers: headerParameters,
|
|
440
|
+
query: queryParameters,
|
|
441
|
+
}, initOverrides);
|
|
442
|
+
|
|
443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicPoolsFromJSON(jsonValue));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Get public pools
|
|
448
|
+
* publicPools
|
|
449
|
+
*/
|
|
450
|
+
async publicPools(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicPools> {
|
|
451
|
+
const response = await this.publicPoolsRaw(requestParameters, initOverrides);
|
|
452
|
+
return await response.value();
|
|
453
|
+
}
|
|
454
|
+
|
|
397
455
|
}
|
|
398
456
|
|
|
399
457
|
/**
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -18,7 +18,6 @@ import type {
|
|
|
18
18
|
EnrichedTx,
|
|
19
19
|
NextNonce,
|
|
20
20
|
ResultCode,
|
|
21
|
-
SignBody,
|
|
22
21
|
TxHash,
|
|
23
22
|
TxHashes,
|
|
24
23
|
Txs,
|
|
@@ -30,8 +29,6 @@ import {
|
|
|
30
29
|
NextNonceToJSON,
|
|
31
30
|
ResultCodeFromJSON,
|
|
32
31
|
ResultCodeToJSON,
|
|
33
|
-
SignBodyFromJSON,
|
|
34
|
-
SignBodyToJSON,
|
|
35
32
|
TxHashFromJSON,
|
|
36
33
|
TxHashToJSON,
|
|
37
34
|
TxHashesFromJSON,
|
|
@@ -59,11 +56,6 @@ export interface BlockTxsRequest {
|
|
|
59
56
|
value: string;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
export interface L2SignatureRequest {
|
|
63
|
-
tx_type: number;
|
|
64
|
-
tx_info: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
59
|
export interface NextNonceRequest {
|
|
68
60
|
account_index: number;
|
|
69
61
|
api_key_index: number;
|
|
@@ -84,6 +76,13 @@ export interface SendTxBatchRequest {
|
|
|
84
76
|
tx_infos: string;
|
|
85
77
|
}
|
|
86
78
|
|
|
79
|
+
export interface SetAccountMetadataRequest {
|
|
80
|
+
account_index: number;
|
|
81
|
+
api_key_index: number;
|
|
82
|
+
metadata: string;
|
|
83
|
+
signature: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
87
86
|
export interface TxRequest {
|
|
88
87
|
by: TxByEnum;
|
|
89
88
|
value: string;
|
|
@@ -276,71 +275,6 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
276
275
|
return await response.value();
|
|
277
276
|
}
|
|
278
277
|
|
|
279
|
-
/**
|
|
280
|
-
* Get transaction signature body
|
|
281
|
-
* l2Signature
|
|
282
|
-
*/
|
|
283
|
-
async l2SignatureRaw(requestParameters: L2SignatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignBody>> {
|
|
284
|
-
if (requestParameters['tx_type'] == null) {
|
|
285
|
-
throw new runtime.RequiredError(
|
|
286
|
-
'tx_type',
|
|
287
|
-
'Required parameter "tx_type" was null or undefined when calling l2Signature().'
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (requestParameters['tx_info'] == null) {
|
|
292
|
-
throw new runtime.RequiredError(
|
|
293
|
-
'tx_info',
|
|
294
|
-
'Required parameter "tx_info" was null or undefined when calling l2Signature().'
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
const queryParameters: any = {};
|
|
299
|
-
|
|
300
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
301
|
-
|
|
302
|
-
const consumes: runtime.Consume[] = [
|
|
303
|
-
{ contentType: 'multipart/form-data' },
|
|
304
|
-
];
|
|
305
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
306
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
307
|
-
|
|
308
|
-
let formParams: { append(param: string, value: any): any };
|
|
309
|
-
let useForm = false;
|
|
310
|
-
if (useForm) {
|
|
311
|
-
formParams = new FormData();
|
|
312
|
-
} else {
|
|
313
|
-
formParams = new URLSearchParams();
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
if (requestParameters['tx_type'] != null) {
|
|
317
|
-
formParams.append('tx_type', requestParameters['tx_type'] as any);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
if (requestParameters['tx_info'] != null) {
|
|
321
|
-
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
const response = await this.request({
|
|
325
|
-
path: `/api/v1/l2Signature`,
|
|
326
|
-
method: 'POST',
|
|
327
|
-
headers: headerParameters,
|
|
328
|
-
query: queryParameters,
|
|
329
|
-
body: formParams,
|
|
330
|
-
}, initOverrides);
|
|
331
|
-
|
|
332
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => SignBodyFromJSON(jsonValue));
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Get transaction signature body
|
|
337
|
-
* l2Signature
|
|
338
|
-
*/
|
|
339
|
-
async l2Signature(requestParameters: L2SignatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignBody> {
|
|
340
|
-
const response = await this.l2SignatureRaw(requestParameters, initOverrides);
|
|
341
|
-
return await response.value();
|
|
342
|
-
}
|
|
343
|
-
|
|
344
278
|
/**
|
|
345
279
|
* Get next nonce for a specific account
|
|
346
280
|
* nextNonce
|
|
@@ -564,6 +498,93 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
564
498
|
return await response.value();
|
|
565
499
|
}
|
|
566
500
|
|
|
501
|
+
/**
|
|
502
|
+
* Set account metadata
|
|
503
|
+
* setAccountMetadata
|
|
504
|
+
*/
|
|
505
|
+
async setAccountMetadataRaw(requestParameters: SetAccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
506
|
+
if (requestParameters['account_index'] == null) {
|
|
507
|
+
throw new runtime.RequiredError(
|
|
508
|
+
'account_index',
|
|
509
|
+
'Required parameter "account_index" was null or undefined when calling setAccountMetadata().'
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (requestParameters['api_key_index'] == null) {
|
|
514
|
+
throw new runtime.RequiredError(
|
|
515
|
+
'api_key_index',
|
|
516
|
+
'Required parameter "api_key_index" was null or undefined when calling setAccountMetadata().'
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
if (requestParameters['metadata'] == null) {
|
|
521
|
+
throw new runtime.RequiredError(
|
|
522
|
+
'metadata',
|
|
523
|
+
'Required parameter "metadata" was null or undefined when calling setAccountMetadata().'
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (requestParameters['signature'] == null) {
|
|
528
|
+
throw new runtime.RequiredError(
|
|
529
|
+
'signature',
|
|
530
|
+
'Required parameter "signature" was null or undefined when calling setAccountMetadata().'
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const queryParameters: any = {};
|
|
535
|
+
|
|
536
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
537
|
+
|
|
538
|
+
const consumes: runtime.Consume[] = [
|
|
539
|
+
{ contentType: 'multipart/form-data' },
|
|
540
|
+
];
|
|
541
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
542
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
543
|
+
|
|
544
|
+
let formParams: { append(param: string, value: any): any };
|
|
545
|
+
let useForm = false;
|
|
546
|
+
if (useForm) {
|
|
547
|
+
formParams = new FormData();
|
|
548
|
+
} else {
|
|
549
|
+
formParams = new URLSearchParams();
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (requestParameters['account_index'] != null) {
|
|
553
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
if (requestParameters['api_key_index'] != null) {
|
|
557
|
+
formParams.append('api_key_index', requestParameters['api_key_index'] as any);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
if (requestParameters['metadata'] != null) {
|
|
561
|
+
formParams.append('metadata', requestParameters['metadata'] as any);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if (requestParameters['signature'] != null) {
|
|
565
|
+
formParams.append('signature', requestParameters['signature'] as any);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const response = await this.request({
|
|
569
|
+
path: `/api/v1/setAccountMetadata`,
|
|
570
|
+
method: 'POST',
|
|
571
|
+
headers: headerParameters,
|
|
572
|
+
query: queryParameters,
|
|
573
|
+
body: formParams,
|
|
574
|
+
}, initOverrides);
|
|
575
|
+
|
|
576
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Set account metadata
|
|
581
|
+
* setAccountMetadata
|
|
582
|
+
*/
|
|
583
|
+
async setAccountMetadata(requestParameters: SetAccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
584
|
+
const response = await this.setAccountMetadataRaw(requestParameters, initOverrides);
|
|
585
|
+
return await response.value();
|
|
586
|
+
}
|
|
587
|
+
|
|
567
588
|
/**
|
|
568
589
|
* Get transaction by hash or sequence index
|
|
569
590
|
* tx
|
|
@@ -0,0 +1,70 @@
|
|
|
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 AccountMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountMetadata
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AccountMetadata
|
|
32
|
+
*/
|
|
33
|
+
description: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AccountMetadata interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAccountMetadata(value: object): value is AccountMetadata {
|
|
40
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
41
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AccountMetadataFromJSON(json: any): AccountMetadata {
|
|
46
|
+
return AccountMetadataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function AccountMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountMetadata {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'description': json['description'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AccountMetadataToJSON(value?: AccountMetadata | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'name': value['name'],
|
|
67
|
+
'description': value['description'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -25,6 +25,12 @@ import {
|
|
|
25
25
|
AccountPositionFromJSONTyped,
|
|
26
26
|
AccountPositionToJSON,
|
|
27
27
|
} from './AccountPosition';
|
|
28
|
+
import type { PublicPoolInfo } from './PublicPoolInfo';
|
|
29
|
+
import {
|
|
30
|
+
PublicPoolInfoFromJSON,
|
|
31
|
+
PublicPoolInfoFromJSONTyped,
|
|
32
|
+
PublicPoolInfoToJSON,
|
|
33
|
+
} from './PublicPoolInfo';
|
|
28
34
|
import type { PublicPoolShare } from './PublicPoolShare';
|
|
29
35
|
import {
|
|
30
36
|
PublicPoolShareFromJSON,
|
|
@@ -92,6 +98,18 @@ export interface DetailedAccount {
|
|
|
92
98
|
* @memberof DetailedAccount
|
|
93
99
|
*/
|
|
94
100
|
collateral: string;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof DetailedAccount
|
|
105
|
+
*/
|
|
106
|
+
name: string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof DetailedAccount
|
|
111
|
+
*/
|
|
112
|
+
description: string;
|
|
95
113
|
/**
|
|
96
114
|
*
|
|
97
115
|
* @type {Array<AccountPosition>}
|
|
@@ -110,6 +128,12 @@ export interface DetailedAccount {
|
|
|
110
128
|
* @memberof DetailedAccount
|
|
111
129
|
*/
|
|
112
130
|
market_stats: Array<AccountMarketStats>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @type {PublicPoolInfo}
|
|
134
|
+
* @memberof DetailedAccount
|
|
135
|
+
*/
|
|
136
|
+
pool_info: PublicPoolInfo;
|
|
113
137
|
/**
|
|
114
138
|
*
|
|
115
139
|
* @type {Array<PublicPoolShare>}
|
|
@@ -130,9 +154,12 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
130
154
|
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
131
155
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
132
156
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
157
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
158
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
133
159
|
if (!('positions' in value) || value['positions'] === undefined) return false;
|
|
134
160
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
135
161
|
if (!('market_stats' in value) || value['market_stats'] === undefined) return false;
|
|
162
|
+
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
136
163
|
if (!('shares' in value) || value['shares'] === undefined) return false;
|
|
137
164
|
return true;
|
|
138
165
|
}
|
|
@@ -156,9 +183,12 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
156
183
|
'open_order_count': json['open_order_count'],
|
|
157
184
|
'status': json['status'],
|
|
158
185
|
'collateral': json['collateral'],
|
|
186
|
+
'name': json['name'],
|
|
187
|
+
'description': json['description'],
|
|
159
188
|
'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
|
|
160
189
|
'total_asset_value': json['total_asset_value'],
|
|
161
190
|
'market_stats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
|
|
191
|
+
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
162
192
|
'shares': ((json['shares'] as Array<any>).map(PublicPoolShareFromJSON)),
|
|
163
193
|
};
|
|
164
194
|
}
|
|
@@ -178,9 +208,12 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
178
208
|
'open_order_count': value['open_order_count'],
|
|
179
209
|
'status': value['status'],
|
|
180
210
|
'collateral': value['collateral'],
|
|
211
|
+
'name': value['name'],
|
|
212
|
+
'description': value['description'],
|
|
181
213
|
'positions': ((value['positions'] as Array<any>).map(AccountPositionToJSON)),
|
|
182
214
|
'total_asset_value': value['total_asset_value'],
|
|
183
215
|
'market_stats': ((value['market_stats'] as Array<any>).map(AccountMarketStatsToJSON)),
|
|
216
|
+
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
184
217
|
'shares': ((value['shares'] as Array<any>).map(PublicPoolShareToJSON)),
|
|
185
218
|
};
|
|
186
219
|
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PublicPoolInfo } from './PublicPoolInfo';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolInfoFromJSON,
|
|
19
|
+
PublicPoolInfoFromJSONTyped,
|
|
20
|
+
PublicPoolInfoToJSON,
|
|
21
|
+
} from './PublicPoolInfo';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PublicPool
|
|
27
|
+
*/
|
|
28
|
+
export interface PublicPool {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof PublicPool
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicPool
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof PublicPool
|
|
45
|
+
*/
|
|
46
|
+
account_type: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PublicPool
|
|
51
|
+
*/
|
|
52
|
+
index: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof PublicPool
|
|
57
|
+
*/
|
|
58
|
+
l1_address: string;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof PublicPool
|
|
63
|
+
*/
|
|
64
|
+
cancel_all_time: number;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof PublicPool
|
|
69
|
+
*/
|
|
70
|
+
open_order_count: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPool
|
|
75
|
+
*/
|
|
76
|
+
status: number;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof PublicPool
|
|
81
|
+
*/
|
|
82
|
+
collateral: string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof PublicPool
|
|
87
|
+
*/
|
|
88
|
+
name: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof PublicPool
|
|
93
|
+
*/
|
|
94
|
+
description: string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {PublicPoolInfo}
|
|
98
|
+
* @memberof PublicPool
|
|
99
|
+
*/
|
|
100
|
+
pool_info: PublicPoolInfo;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the PublicPool interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfPublicPool(value: object): value is PublicPool {
|
|
107
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
108
|
+
if (!('account_type' in value) || value['account_type'] === undefined) return false;
|
|
109
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
110
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
111
|
+
if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
|
|
112
|
+
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
113
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
114
|
+
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
115
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
116
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
117
|
+
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function PublicPoolFromJSON(json: any): PublicPool {
|
|
122
|
+
return PublicPoolFromJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPool {
|
|
126
|
+
if (json == null) {
|
|
127
|
+
return json;
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
|
|
131
|
+
'code': json['code'],
|
|
132
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
133
|
+
'account_type': json['account_type'],
|
|
134
|
+
'index': json['index'],
|
|
135
|
+
'l1_address': json['l1_address'],
|
|
136
|
+
'cancel_all_time': json['cancel_all_time'],
|
|
137
|
+
'open_order_count': json['open_order_count'],
|
|
138
|
+
'status': json['status'],
|
|
139
|
+
'collateral': json['collateral'],
|
|
140
|
+
'name': json['name'],
|
|
141
|
+
'description': json['description'],
|
|
142
|
+
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function PublicPoolToJSON(value?: PublicPool | null): any {
|
|
147
|
+
if (value == null) {
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
|
|
152
|
+
'code': value['code'],
|
|
153
|
+
'message': value['message'],
|
|
154
|
+
'account_type': value['account_type'],
|
|
155
|
+
'index': value['index'],
|
|
156
|
+
'l1_address': value['l1_address'],
|
|
157
|
+
'cancel_all_time': value['cancel_all_time'],
|
|
158
|
+
'open_order_count': value['open_order_count'],
|
|
159
|
+
'status': value['status'],
|
|
160
|
+
'collateral': value['collateral'],
|
|
161
|
+
'name': value['name'],
|
|
162
|
+
'description': value['description'],
|
|
163
|
+
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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 PublicPoolInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface PublicPoolInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PublicPoolInfo
|
|
26
|
+
*/
|
|
27
|
+
ppi_s: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PublicPoolInfo
|
|
32
|
+
*/
|
|
33
|
+
ppi_of: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PublicPoolInfo
|
|
38
|
+
*/
|
|
39
|
+
ppi_mosr: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof PublicPoolInfo
|
|
44
|
+
*/
|
|
45
|
+
ppi_tsa: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PublicPoolInfo
|
|
50
|
+
*/
|
|
51
|
+
ppi_os: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the PublicPoolInfo interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo {
|
|
58
|
+
if (!('ppi_s' in value) || value['ppi_s'] === undefined) return false;
|
|
59
|
+
if (!('ppi_of' in value) || value['ppi_of'] === undefined) return false;
|
|
60
|
+
if (!('ppi_mosr' in value) || value['ppi_mosr'] === undefined) return false;
|
|
61
|
+
if (!('ppi_tsa' in value) || value['ppi_tsa'] === undefined) return false;
|
|
62
|
+
if (!('ppi_os' in value) || value['ppi_os'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function PublicPoolInfoFromJSON(json: any): PublicPoolInfo {
|
|
67
|
+
return PublicPoolInfoFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPoolInfo {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'ppi_s': json['ppi_s'],
|
|
77
|
+
'ppi_of': json['ppi_of'],
|
|
78
|
+
'ppi_mosr': json['ppi_mosr'],
|
|
79
|
+
'ppi_tsa': json['ppi_tsa'],
|
|
80
|
+
'ppi_os': json['ppi_os'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'ppi_s': value['ppi_s'],
|
|
91
|
+
'ppi_of': value['ppi_of'],
|
|
92
|
+
'ppi_mosr': value['ppi_mosr'],
|
|
93
|
+
'ppi_tsa': value['ppi_tsa'],
|
|
94
|
+
'ppi_os': value['ppi_os'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PublicPool } from './PublicPool';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolFromJSON,
|
|
19
|
+
PublicPoolFromJSONTyped,
|
|
20
|
+
PublicPoolToJSON,
|
|
21
|
+
} from './PublicPool';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PublicPools
|
|
27
|
+
*/
|
|
28
|
+
export interface PublicPools {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof PublicPools
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicPools
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<PublicPool>}
|
|
44
|
+
* @memberof PublicPools
|
|
45
|
+
*/
|
|
46
|
+
public_pools: Array<PublicPool>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the PublicPools interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfPublicPools(value: object): value is PublicPools {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('public_pools' in value) || value['public_pools'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function PublicPoolsFromJSON(json: any): PublicPools {
|
|
59
|
+
return PublicPoolsFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function PublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPools {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'public_pools': ((json['public_pools'] as Array<any>).map(PublicPoolFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function PublicPoolsToJSON(value?: PublicPools | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'public_pools': ((value['public_pools'] as Array<any>).map(PublicPoolToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
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 ReqGetPublicPools
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetPublicPools {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ReqGetPublicPools
|
|
26
|
+
*/
|
|
27
|
+
index: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetPublicPools
|
|
32
|
+
*/
|
|
33
|
+
limit: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ReqGetPublicPools interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfReqGetPublicPools(value: object): value is ReqGetPublicPools {
|
|
40
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
41
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ReqGetPublicPoolsFromJSON(json: any): ReqGetPublicPools {
|
|
46
|
+
return ReqGetPublicPoolsFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ReqGetPublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPublicPools {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'index': json['index'],
|
|
56
|
+
'limit': json['limit'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ReqGetPublicPoolsToJSON(value?: ReqGetPublicPools | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'index': value['index'],
|
|
67
|
+
'limit': value['limit'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/models/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export * from './Account';
|
|
4
4
|
export * from './AccountApiKeys';
|
|
5
5
|
export * from './AccountMarketStats';
|
|
6
|
+
export * from './AccountMetadata';
|
|
6
7
|
export * from './AccountPnL';
|
|
7
8
|
export * from './AccountPosition';
|
|
8
9
|
export * from './AccountStats';
|
|
@@ -39,7 +40,10 @@ export * from './Orders';
|
|
|
39
40
|
export * from './Permission';
|
|
40
41
|
export * from './PnLEntry';
|
|
41
42
|
export * from './PriceLevel';
|
|
43
|
+
export * from './PublicPool';
|
|
44
|
+
export * from './PublicPoolInfo';
|
|
42
45
|
export * from './PublicPoolShare';
|
|
46
|
+
export * from './PublicPools';
|
|
43
47
|
export * from './ReqDoFaucet';
|
|
44
48
|
export * from './ReqGetAccount';
|
|
45
49
|
export * from './ReqGetAccountActiveOrders';
|
|
@@ -61,6 +65,7 @@ export * from './ReqGetOrderBookDetails';
|
|
|
61
65
|
export * from './ReqGetOrderBookOrders';
|
|
62
66
|
export * from './ReqGetOrderBooks';
|
|
63
67
|
export * from './ReqGetPermission';
|
|
68
|
+
export * from './ReqGetPublicPools';
|
|
64
69
|
export * from './ReqGetRangeWithCursor';
|
|
65
70
|
export * from './ReqGetRangeWithIndex';
|
|
66
71
|
export * from './ReqGetRangeWithIndexSortable';
|
|
@@ -72,7 +77,6 @@ export * from './ReqMarkNotifRead';
|
|
|
72
77
|
export * from './ResultCode';
|
|
73
78
|
export * from './Rollback';
|
|
74
79
|
export * from './Rollbacks';
|
|
75
|
-
export * from './SignBody';
|
|
76
80
|
export * from './SimpleOrder';
|
|
77
81
|
export * from './Status';
|
|
78
82
|
export * from './SubAccounts';
|
package/openapi.json
CHANGED
|
@@ -871,43 +871,6 @@
|
|
|
871
871
|
"description": "Get fundings"
|
|
872
872
|
}
|
|
873
873
|
},
|
|
874
|
-
"/api/v1/l2Signature": {
|
|
875
|
-
"post": {
|
|
876
|
-
"summary": "l2Signature",
|
|
877
|
-
"operationId": "l2Signature",
|
|
878
|
-
"responses": {
|
|
879
|
-
"200": {
|
|
880
|
-
"description": "A successful response.",
|
|
881
|
-
"schema": {
|
|
882
|
-
"$ref": "#/definitions/SignBody"
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
"400": {
|
|
886
|
-
"description": "Bad request",
|
|
887
|
-
"schema": {
|
|
888
|
-
"$ref": "#/definitions/ResultCode"
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
|
-
"parameters": [
|
|
893
|
-
{
|
|
894
|
-
"name": "body",
|
|
895
|
-
"in": "body",
|
|
896
|
-
"required": true,
|
|
897
|
-
"schema": {
|
|
898
|
-
"$ref": "#/definitions/ReqSendTx"
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
],
|
|
902
|
-
"tags": [
|
|
903
|
-
"transaction"
|
|
904
|
-
],
|
|
905
|
-
"consumes": [
|
|
906
|
-
"multipart/form-data"
|
|
907
|
-
],
|
|
908
|
-
"description": "Get transaction signature body"
|
|
909
|
-
}
|
|
910
|
-
},
|
|
911
874
|
"/api/v1/layer1BasicInfo": {
|
|
912
875
|
"get": {
|
|
913
876
|
"summary": "layer1BasicInfo",
|
|
@@ -1321,6 +1284,51 @@
|
|
|
1321
1284
|
"description": "Get account PnL chart"
|
|
1322
1285
|
}
|
|
1323
1286
|
},
|
|
1287
|
+
"/api/v1/publicPools": {
|
|
1288
|
+
"get": {
|
|
1289
|
+
"summary": "publicPools",
|
|
1290
|
+
"operationId": "publicPools",
|
|
1291
|
+
"responses": {
|
|
1292
|
+
"200": {
|
|
1293
|
+
"description": "A successful response.",
|
|
1294
|
+
"schema": {
|
|
1295
|
+
"$ref": "#/definitions/PublicPools"
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
"400": {
|
|
1299
|
+
"description": "Bad request",
|
|
1300
|
+
"schema": {
|
|
1301
|
+
"$ref": "#/definitions/ResultCode"
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
"parameters": [
|
|
1306
|
+
{
|
|
1307
|
+
"name": "index",
|
|
1308
|
+
"in": "query",
|
|
1309
|
+
"required": true,
|
|
1310
|
+
"type": "integer",
|
|
1311
|
+
"format": "int64"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"name": "limit",
|
|
1315
|
+
"in": "query",
|
|
1316
|
+
"required": true,
|
|
1317
|
+
"type": "integer",
|
|
1318
|
+
"format": "int64",
|
|
1319
|
+
"minimum": 1,
|
|
1320
|
+
"maximum": 100
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"tags": [
|
|
1324
|
+
"account"
|
|
1325
|
+
],
|
|
1326
|
+
"consumes": [
|
|
1327
|
+
"multipart/form-data"
|
|
1328
|
+
],
|
|
1329
|
+
"description": "Get public pools"
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1324
1332
|
"/api/v1/recentTrades": {
|
|
1325
1333
|
"get": {
|
|
1326
1334
|
"summary": "recentTrades",
|
|
@@ -1494,6 +1502,43 @@
|
|
|
1494
1502
|
"description": "You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)"
|
|
1495
1503
|
}
|
|
1496
1504
|
},
|
|
1505
|
+
"/api/v1/setAccountMetadata": {
|
|
1506
|
+
"post": {
|
|
1507
|
+
"summary": "setAccountMetadata",
|
|
1508
|
+
"operationId": "setAccountMetadata",
|
|
1509
|
+
"responses": {
|
|
1510
|
+
"200": {
|
|
1511
|
+
"description": "A successful response.",
|
|
1512
|
+
"schema": {
|
|
1513
|
+
"$ref": "#/definitions/ResultCode"
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"400": {
|
|
1517
|
+
"description": "Bad request",
|
|
1518
|
+
"schema": {
|
|
1519
|
+
"$ref": "#/definitions/ResultCode"
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
"parameters": [
|
|
1524
|
+
{
|
|
1525
|
+
"name": "body",
|
|
1526
|
+
"in": "body",
|
|
1527
|
+
"required": true,
|
|
1528
|
+
"schema": {
|
|
1529
|
+
"$ref": "#/definitions/ReqSetAccountMetadata"
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
"tags": [
|
|
1534
|
+
"transaction"
|
|
1535
|
+
],
|
|
1536
|
+
"consumes": [
|
|
1537
|
+
"multipart/form-data"
|
|
1538
|
+
],
|
|
1539
|
+
"description": "Set account metadata"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1497
1542
|
"/api/v1/trades": {
|
|
1498
1543
|
"get": {
|
|
1499
1544
|
"summary": "trades",
|
|
@@ -1816,6 +1861,22 @@
|
|
|
1816
1861
|
"open_position_quote"
|
|
1817
1862
|
]
|
|
1818
1863
|
},
|
|
1864
|
+
"AccountMetadata": {
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"properties": {
|
|
1867
|
+
"name": {
|
|
1868
|
+
"type": "string"
|
|
1869
|
+
},
|
|
1870
|
+
"description": {
|
|
1871
|
+
"type": "string"
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1874
|
+
"title": "AccountMetadata",
|
|
1875
|
+
"required": [
|
|
1876
|
+
"name",
|
|
1877
|
+
"description"
|
|
1878
|
+
]
|
|
1879
|
+
},
|
|
1819
1880
|
"AccountPnL": {
|
|
1820
1881
|
"type": "object",
|
|
1821
1882
|
"properties": {
|
|
@@ -2265,6 +2326,12 @@
|
|
|
2265
2326
|
"type": "string",
|
|
2266
2327
|
"example": "46342"
|
|
2267
2328
|
},
|
|
2329
|
+
"name": {
|
|
2330
|
+
"type": "string"
|
|
2331
|
+
},
|
|
2332
|
+
"description": {
|
|
2333
|
+
"type": "string"
|
|
2334
|
+
},
|
|
2268
2335
|
"positions": {
|
|
2269
2336
|
"type": "array",
|
|
2270
2337
|
"items": {
|
|
@@ -2281,6 +2348,9 @@
|
|
|
2281
2348
|
"$ref": "#/definitions/AccountMarketStats"
|
|
2282
2349
|
}
|
|
2283
2350
|
},
|
|
2351
|
+
"pool_info": {
|
|
2352
|
+
"$ref": "#/definitions/PublicPoolInfo"
|
|
2353
|
+
},
|
|
2284
2354
|
"shares": {
|
|
2285
2355
|
"type": "array",
|
|
2286
2356
|
"items": {
|
|
@@ -2298,9 +2368,12 @@
|
|
|
2298
2368
|
"open_order_count",
|
|
2299
2369
|
"status",
|
|
2300
2370
|
"collateral",
|
|
2371
|
+
"name",
|
|
2372
|
+
"description",
|
|
2301
2373
|
"positions",
|
|
2302
2374
|
"total_asset_value",
|
|
2303
2375
|
"market_stats",
|
|
2376
|
+
"pool_info",
|
|
2304
2377
|
"shares"
|
|
2305
2378
|
]
|
|
2306
2379
|
},
|
|
@@ -3433,6 +3506,113 @@
|
|
|
3433
3506
|
"size"
|
|
3434
3507
|
]
|
|
3435
3508
|
},
|
|
3509
|
+
"PublicPool": {
|
|
3510
|
+
"type": "object",
|
|
3511
|
+
"properties": {
|
|
3512
|
+
"code": {
|
|
3513
|
+
"type": "integer",
|
|
3514
|
+
"format": "int32",
|
|
3515
|
+
"example": "100"
|
|
3516
|
+
},
|
|
3517
|
+
"message": {
|
|
3518
|
+
"type": "string"
|
|
3519
|
+
},
|
|
3520
|
+
"account_type": {
|
|
3521
|
+
"type": "integer",
|
|
3522
|
+
"format": "uint8",
|
|
3523
|
+
"example": "1"
|
|
3524
|
+
},
|
|
3525
|
+
"index": {
|
|
3526
|
+
"type": "integer",
|
|
3527
|
+
"format": "int64",
|
|
3528
|
+
"example": "1"
|
|
3529
|
+
},
|
|
3530
|
+
"l1_address": {
|
|
3531
|
+
"type": "string",
|
|
3532
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
3533
|
+
},
|
|
3534
|
+
"cancel_all_time": {
|
|
3535
|
+
"type": "integer",
|
|
3536
|
+
"format": "int64",
|
|
3537
|
+
"example": "1640995200"
|
|
3538
|
+
},
|
|
3539
|
+
"open_order_count": {
|
|
3540
|
+
"type": "integer",
|
|
3541
|
+
"format": "int64",
|
|
3542
|
+
"example": "100"
|
|
3543
|
+
},
|
|
3544
|
+
"status": {
|
|
3545
|
+
"type": "integer",
|
|
3546
|
+
"format": "int32",
|
|
3547
|
+
"example": "1"
|
|
3548
|
+
},
|
|
3549
|
+
"collateral": {
|
|
3550
|
+
"type": "string",
|
|
3551
|
+
"example": "46342"
|
|
3552
|
+
},
|
|
3553
|
+
"name": {
|
|
3554
|
+
"type": "string"
|
|
3555
|
+
},
|
|
3556
|
+
"description": {
|
|
3557
|
+
"type": "string"
|
|
3558
|
+
},
|
|
3559
|
+
"pool_info": {
|
|
3560
|
+
"$ref": "#/definitions/PublicPoolInfo"
|
|
3561
|
+
}
|
|
3562
|
+
},
|
|
3563
|
+
"title": "PublicPool",
|
|
3564
|
+
"required": [
|
|
3565
|
+
"code",
|
|
3566
|
+
"account_type",
|
|
3567
|
+
"index",
|
|
3568
|
+
"l1_address",
|
|
3569
|
+
"cancel_all_time",
|
|
3570
|
+
"open_order_count",
|
|
3571
|
+
"status",
|
|
3572
|
+
"collateral",
|
|
3573
|
+
"name",
|
|
3574
|
+
"description",
|
|
3575
|
+
"pool_info"
|
|
3576
|
+
]
|
|
3577
|
+
},
|
|
3578
|
+
"PublicPoolInfo": {
|
|
3579
|
+
"type": "object",
|
|
3580
|
+
"properties": {
|
|
3581
|
+
"ppi_s": {
|
|
3582
|
+
"type": "integer",
|
|
3583
|
+
"format": "uint8",
|
|
3584
|
+
"example": "0"
|
|
3585
|
+
},
|
|
3586
|
+
"ppi_of": {
|
|
3587
|
+
"type": "integer",
|
|
3588
|
+
"format": "int64",
|
|
3589
|
+
"example": "100"
|
|
3590
|
+
},
|
|
3591
|
+
"ppi_mosr": {
|
|
3592
|
+
"type": "integer",
|
|
3593
|
+
"format": "int64",
|
|
3594
|
+
"example": "200"
|
|
3595
|
+
},
|
|
3596
|
+
"ppi_tsa": {
|
|
3597
|
+
"type": "integer",
|
|
3598
|
+
"format": "int64",
|
|
3599
|
+
"example": "100000"
|
|
3600
|
+
},
|
|
3601
|
+
"ppi_os": {
|
|
3602
|
+
"type": "integer",
|
|
3603
|
+
"format": "int64",
|
|
3604
|
+
"example": "20000"
|
|
3605
|
+
}
|
|
3606
|
+
},
|
|
3607
|
+
"title": "PublicPoolInfo",
|
|
3608
|
+
"required": [
|
|
3609
|
+
"ppi_s",
|
|
3610
|
+
"ppi_of",
|
|
3611
|
+
"ppi_mosr",
|
|
3612
|
+
"ppi_tsa",
|
|
3613
|
+
"ppi_os"
|
|
3614
|
+
]
|
|
3615
|
+
},
|
|
3436
3616
|
"PublicPoolShare": {
|
|
3437
3617
|
"type": "object",
|
|
3438
3618
|
"properties": {
|
|
@@ -3458,6 +3638,30 @@
|
|
|
3458
3638
|
"entry_usdc"
|
|
3459
3639
|
]
|
|
3460
3640
|
},
|
|
3641
|
+
"PublicPools": {
|
|
3642
|
+
"type": "object",
|
|
3643
|
+
"properties": {
|
|
3644
|
+
"code": {
|
|
3645
|
+
"type": "integer",
|
|
3646
|
+
"format": "int32",
|
|
3647
|
+
"example": "100"
|
|
3648
|
+
},
|
|
3649
|
+
"message": {
|
|
3650
|
+
"type": "string"
|
|
3651
|
+
},
|
|
3652
|
+
"public_pools": {
|
|
3653
|
+
"type": "array",
|
|
3654
|
+
"items": {
|
|
3655
|
+
"$ref": "#/definitions/PublicPool"
|
|
3656
|
+
}
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
"title": "PublicPools",
|
|
3660
|
+
"required": [
|
|
3661
|
+
"code",
|
|
3662
|
+
"public_pools"
|
|
3663
|
+
]
|
|
3664
|
+
},
|
|
3461
3665
|
"ReqDoFaucet": {
|
|
3462
3666
|
"type": "object",
|
|
3463
3667
|
"properties": {
|
|
@@ -3954,6 +4158,26 @@
|
|
|
3954
4158
|
"tx_type"
|
|
3955
4159
|
]
|
|
3956
4160
|
},
|
|
4161
|
+
"ReqGetPublicPools": {
|
|
4162
|
+
"type": "object",
|
|
4163
|
+
"properties": {
|
|
4164
|
+
"index": {
|
|
4165
|
+
"type": "integer",
|
|
4166
|
+
"format": "int64"
|
|
4167
|
+
},
|
|
4168
|
+
"limit": {
|
|
4169
|
+
"type": "integer",
|
|
4170
|
+
"format": "int64",
|
|
4171
|
+
"maximum": 100,
|
|
4172
|
+
"minimum": 1
|
|
4173
|
+
}
|
|
4174
|
+
},
|
|
4175
|
+
"title": "ReqGetPublicPools",
|
|
4176
|
+
"required": [
|
|
4177
|
+
"index",
|
|
4178
|
+
"limit"
|
|
4179
|
+
]
|
|
4180
|
+
},
|
|
3957
4181
|
"ReqGetRangeWithCursor": {
|
|
3958
4182
|
"type": "object",
|
|
3959
4183
|
"properties": {
|
|
@@ -4182,6 +4406,32 @@
|
|
|
4182
4406
|
"tx_infos"
|
|
4183
4407
|
]
|
|
4184
4408
|
},
|
|
4409
|
+
"ReqSetAccountMetadata": {
|
|
4410
|
+
"type": "object",
|
|
4411
|
+
"properties": {
|
|
4412
|
+
"account_index": {
|
|
4413
|
+
"type": "integer",
|
|
4414
|
+
"format": "int64"
|
|
4415
|
+
},
|
|
4416
|
+
"api_key_index": {
|
|
4417
|
+
"type": "integer",
|
|
4418
|
+
"format": "uint8"
|
|
4419
|
+
},
|
|
4420
|
+
"metadata": {
|
|
4421
|
+
"type": "string"
|
|
4422
|
+
},
|
|
4423
|
+
"signature": {
|
|
4424
|
+
"type": "string"
|
|
4425
|
+
}
|
|
4426
|
+
},
|
|
4427
|
+
"title": "ReqSetAccountMetadata",
|
|
4428
|
+
"required": [
|
|
4429
|
+
"account_index",
|
|
4430
|
+
"api_key_index",
|
|
4431
|
+
"metadata",
|
|
4432
|
+
"signature"
|
|
4433
|
+
]
|
|
4434
|
+
},
|
|
4185
4435
|
"ResultCode": {
|
|
4186
4436
|
"type": "object",
|
|
4187
4437
|
"properties": {
|
|
@@ -4261,28 +4511,6 @@
|
|
|
4261
4511
|
"rollbacks"
|
|
4262
4512
|
]
|
|
4263
4513
|
},
|
|
4264
|
-
"SignBody": {
|
|
4265
|
-
"type": "object",
|
|
4266
|
-
"properties": {
|
|
4267
|
-
"code": {
|
|
4268
|
-
"type": "integer",
|
|
4269
|
-
"format": "int32",
|
|
4270
|
-
"example": "100"
|
|
4271
|
-
},
|
|
4272
|
-
"message": {
|
|
4273
|
-
"type": "string"
|
|
4274
|
-
},
|
|
4275
|
-
"sign_body": {
|
|
4276
|
-
"type": "string",
|
|
4277
|
-
"example": "success"
|
|
4278
|
-
}
|
|
4279
|
-
},
|
|
4280
|
-
"title": "SignBody",
|
|
4281
|
-
"required": [
|
|
4282
|
-
"code",
|
|
4283
|
-
"sign_body"
|
|
4284
|
-
]
|
|
4285
|
-
},
|
|
4286
4514
|
"SimpleOrder": {
|
|
4287
4515
|
"type": "object",
|
|
4288
4516
|
"properties": {
|