zklighter-perps 1.0.155 → 1.0.157
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 +3 -0
- package/apis/AccountApi.ts +88 -0
- package/models/PublicPoolMetadata.ts +165 -0
- package/models/ReqGetPublicPoolsMetadata.ts +107 -0
- package/models/RespPublicPoolsMetadata.ts +85 -0
- package/models/index.ts +3 -0
- package/openapi.json +205 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -78,6 +78,7 @@ models/PositionFundings.ts
|
|
|
78
78
|
models/PriceLevel.ts
|
|
79
79
|
models/PublicPool.ts
|
|
80
80
|
models/PublicPoolInfo.ts
|
|
81
|
+
models/PublicPoolMetadata.ts
|
|
81
82
|
models/PublicPoolShare.ts
|
|
82
83
|
models/PublicPools.ts
|
|
83
84
|
models/ReferralCode.ts
|
|
@@ -113,6 +114,7 @@ models/ReqGetOrderBookOrders.ts
|
|
|
113
114
|
models/ReqGetOrderBooks.ts
|
|
114
115
|
models/ReqGetPositionFunding.ts
|
|
115
116
|
models/ReqGetPublicPools.ts
|
|
117
|
+
models/ReqGetPublicPoolsMetadata.ts
|
|
116
118
|
models/ReqGetRangeWithCursor.ts
|
|
117
119
|
models/ReqGetRangeWithIndex.ts
|
|
118
120
|
models/ReqGetRangeWithIndexSortable.ts
|
|
@@ -129,6 +131,7 @@ models/ReqIsWhitelisted.ts
|
|
|
129
131
|
models/RespChangeAccountTier.ts
|
|
130
132
|
models/RespGetFastBridgeInfo.ts
|
|
131
133
|
models/RespGetFastwithdrawalInfo.ts
|
|
134
|
+
models/RespPublicPoolsMetadata.ts
|
|
132
135
|
models/RespSendTx.ts
|
|
133
136
|
models/RespSendTxBatch.ts
|
|
134
137
|
models/RespWithdrawalDelay.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
PositionFundings,
|
|
28
28
|
PublicPools,
|
|
29
29
|
RespChangeAccountTier,
|
|
30
|
+
RespPublicPoolsMetadata,
|
|
30
31
|
ResultCode,
|
|
31
32
|
SubAccounts,
|
|
32
33
|
} from '../models/index';
|
|
@@ -55,6 +56,8 @@ import {
|
|
|
55
56
|
PublicPoolsToJSON,
|
|
56
57
|
RespChangeAccountTierFromJSON,
|
|
57
58
|
RespChangeAccountTierToJSON,
|
|
59
|
+
RespPublicPoolsMetadataFromJSON,
|
|
60
|
+
RespPublicPoolsMetadataToJSON,
|
|
58
61
|
ResultCodeFromJSON,
|
|
59
62
|
ResultCodeToJSON,
|
|
60
63
|
SubAccountsFromJSON,
|
|
@@ -157,6 +160,15 @@ export interface PublicPoolsRequest {
|
|
|
157
160
|
account_index?: number;
|
|
158
161
|
}
|
|
159
162
|
|
|
163
|
+
export interface PublicPoolsMetadataRequest {
|
|
164
|
+
index: number;
|
|
165
|
+
limit: number;
|
|
166
|
+
authorization?: string;
|
|
167
|
+
auth?: string;
|
|
168
|
+
filter?: PublicPoolsMetadataFilterEnum;
|
|
169
|
+
account_index?: number;
|
|
170
|
+
}
|
|
171
|
+
|
|
160
172
|
/**
|
|
161
173
|
*
|
|
162
174
|
*/
|
|
@@ -960,6 +972,72 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
960
972
|
return await response.value();
|
|
961
973
|
}
|
|
962
974
|
|
|
975
|
+
/**
|
|
976
|
+
* Get public pools metadata
|
|
977
|
+
* publicPoolsMetadata
|
|
978
|
+
*/
|
|
979
|
+
async publicPoolsMetadataRaw(requestParameters: PublicPoolsMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespPublicPoolsMetadata>> {
|
|
980
|
+
if (requestParameters['index'] == null) {
|
|
981
|
+
throw new runtime.RequiredError(
|
|
982
|
+
'index',
|
|
983
|
+
'Required parameter "index" was null or undefined when calling publicPoolsMetadata().'
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
if (requestParameters['limit'] == null) {
|
|
988
|
+
throw new runtime.RequiredError(
|
|
989
|
+
'limit',
|
|
990
|
+
'Required parameter "limit" was null or undefined when calling publicPoolsMetadata().'
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
const queryParameters: any = {};
|
|
995
|
+
|
|
996
|
+
if (requestParameters['auth'] != null) {
|
|
997
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
if (requestParameters['filter'] != null) {
|
|
1001
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
if (requestParameters['index'] != null) {
|
|
1005
|
+
queryParameters['index'] = requestParameters['index'];
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
if (requestParameters['limit'] != null) {
|
|
1009
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
if (requestParameters['account_index'] != null) {
|
|
1013
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1017
|
+
|
|
1018
|
+
if (requestParameters['authorization'] != null) {
|
|
1019
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
const response = await this.request({
|
|
1023
|
+
path: `/api/v1/publicPoolsMetadata`,
|
|
1024
|
+
method: 'GET',
|
|
1025
|
+
headers: headerParameters,
|
|
1026
|
+
query: queryParameters,
|
|
1027
|
+
}, initOverrides);
|
|
1028
|
+
|
|
1029
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespPublicPoolsMetadataFromJSON(jsonValue));
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Get public pools metadata
|
|
1034
|
+
* publicPoolsMetadata
|
|
1035
|
+
*/
|
|
1036
|
+
async publicPoolsMetadata(requestParameters: PublicPoolsMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespPublicPoolsMetadata> {
|
|
1037
|
+
const response = await this.publicPoolsMetadataRaw(requestParameters, initOverrides);
|
|
1038
|
+
return await response.value();
|
|
1039
|
+
}
|
|
1040
|
+
|
|
963
1041
|
}
|
|
964
1042
|
|
|
965
1043
|
/**
|
|
@@ -1025,3 +1103,13 @@ export const PublicPoolsFilterEnum = {
|
|
|
1025
1103
|
AccountIndex: 'account_index'
|
|
1026
1104
|
} as const;
|
|
1027
1105
|
export type PublicPoolsFilterEnum = typeof PublicPoolsFilterEnum[keyof typeof PublicPoolsFilterEnum];
|
|
1106
|
+
/**
|
|
1107
|
+
* @export
|
|
1108
|
+
*/
|
|
1109
|
+
export const PublicPoolsMetadataFilterEnum = {
|
|
1110
|
+
All: 'all',
|
|
1111
|
+
User: 'user',
|
|
1112
|
+
Protocol: 'protocol',
|
|
1113
|
+
AccountIndex: 'account_index'
|
|
1114
|
+
} as const;
|
|
1115
|
+
export type PublicPoolsMetadataFilterEnum = typeof PublicPoolsMetadataFilterEnum[keyof typeof PublicPoolsMetadataFilterEnum];
|
|
@@ -0,0 +1,165 @@
|
|
|
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 { PublicPoolShare } from './PublicPoolShare';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolShareFromJSON,
|
|
19
|
+
PublicPoolShareFromJSONTyped,
|
|
20
|
+
PublicPoolShareToJSON,
|
|
21
|
+
} from './PublicPoolShare';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PublicPoolMetadata
|
|
27
|
+
*/
|
|
28
|
+
export interface PublicPoolMetadata {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof PublicPoolMetadata
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof PublicPoolMetadata
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof PublicPoolMetadata
|
|
45
|
+
*/
|
|
46
|
+
account_index: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PublicPoolMetadata
|
|
51
|
+
*/
|
|
52
|
+
account_type: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof PublicPoolMetadata
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof PublicPoolMetadata
|
|
63
|
+
*/
|
|
64
|
+
l1_address: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof PublicPoolMetadata
|
|
69
|
+
*/
|
|
70
|
+
annual_percentage_yield: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPoolMetadata
|
|
75
|
+
*/
|
|
76
|
+
status: number;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof PublicPoolMetadata
|
|
81
|
+
*/
|
|
82
|
+
operator_fee: string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof PublicPoolMetadata
|
|
87
|
+
*/
|
|
88
|
+
total_asset_value: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof PublicPoolMetadata
|
|
93
|
+
*/
|
|
94
|
+
total_shares: number;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {PublicPoolShare}
|
|
98
|
+
* @memberof PublicPoolMetadata
|
|
99
|
+
*/
|
|
100
|
+
account_share?: PublicPoolShare;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the PublicPoolMetadata interface.
|
|
105
|
+
*/
|
|
106
|
+
export function instanceOfPublicPoolMetadata(value: object): value is PublicPoolMetadata {
|
|
107
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
108
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
109
|
+
if (!('account_type' in value) || value['account_type'] === undefined) return false;
|
|
110
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
111
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
112
|
+
if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
|
|
113
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
114
|
+
if (!('operator_fee' in value) || value['operator_fee'] === undefined) return false;
|
|
115
|
+
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
116
|
+
if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function PublicPoolMetadataFromJSON(json: any): PublicPoolMetadata {
|
|
121
|
+
return PublicPoolMetadataFromJSONTyped(json, false);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function PublicPoolMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicPoolMetadata {
|
|
125
|
+
if (json == null) {
|
|
126
|
+
return json;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'code': json['code'],
|
|
131
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
132
|
+
'account_index': json['account_index'],
|
|
133
|
+
'account_type': json['account_type'],
|
|
134
|
+
'name': json['name'],
|
|
135
|
+
'l1_address': json['l1_address'],
|
|
136
|
+
'annual_percentage_yield': json['annual_percentage_yield'],
|
|
137
|
+
'status': json['status'],
|
|
138
|
+
'operator_fee': json['operator_fee'],
|
|
139
|
+
'total_asset_value': json['total_asset_value'],
|
|
140
|
+
'total_shares': json['total_shares'],
|
|
141
|
+
'account_share': json['account_share'] == null ? undefined : PublicPoolShareFromJSON(json['account_share']),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function PublicPoolMetadataToJSON(value?: PublicPoolMetadata | null): any {
|
|
146
|
+
if (value == null) {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
|
|
151
|
+
'code': value['code'],
|
|
152
|
+
'message': value['message'],
|
|
153
|
+
'account_index': value['account_index'],
|
|
154
|
+
'account_type': value['account_type'],
|
|
155
|
+
'name': value['name'],
|
|
156
|
+
'l1_address': value['l1_address'],
|
|
157
|
+
'annual_percentage_yield': value['annual_percentage_yield'],
|
|
158
|
+
'status': value['status'],
|
|
159
|
+
'operator_fee': value['operator_fee'],
|
|
160
|
+
'total_asset_value': value['total_asset_value'],
|
|
161
|
+
'total_shares': value['total_shares'],
|
|
162
|
+
'account_share': PublicPoolShareToJSON(value['account_share']),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
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 ReqGetPublicPoolsMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetPublicPoolsMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetPublicPoolsMetadata
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetPublicPoolsMetadata
|
|
32
|
+
*/
|
|
33
|
+
filter?: ReqGetPublicPoolsMetadataFilterEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqGetPublicPoolsMetadata
|
|
38
|
+
*/
|
|
39
|
+
index: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ReqGetPublicPoolsMetadata
|
|
44
|
+
*/
|
|
45
|
+
limit: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ReqGetPublicPoolsMetadata
|
|
50
|
+
*/
|
|
51
|
+
account_index?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const ReqGetPublicPoolsMetadataFilterEnum = {
|
|
59
|
+
All: 'all',
|
|
60
|
+
User: 'user',
|
|
61
|
+
Protocol: 'protocol',
|
|
62
|
+
AccountIndex: 'account_index'
|
|
63
|
+
} as const;
|
|
64
|
+
export type ReqGetPublicPoolsMetadataFilterEnum = typeof ReqGetPublicPoolsMetadataFilterEnum[keyof typeof ReqGetPublicPoolsMetadataFilterEnum];
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the ReqGetPublicPoolsMetadata interface.
|
|
69
|
+
*/
|
|
70
|
+
export function instanceOfReqGetPublicPoolsMetadata(value: object): value is ReqGetPublicPoolsMetadata {
|
|
71
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
72
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function ReqGetPublicPoolsMetadataFromJSON(json: any): ReqGetPublicPoolsMetadata {
|
|
77
|
+
return ReqGetPublicPoolsMetadataFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ReqGetPublicPoolsMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPublicPoolsMetadata {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
87
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
88
|
+
'index': json['index'],
|
|
89
|
+
'limit': json['limit'],
|
|
90
|
+
'account_index': json['account_index'] == null ? undefined : json['account_index'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function ReqGetPublicPoolsMetadataToJSON(value?: ReqGetPublicPoolsMetadata | null): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'auth': value['auth'],
|
|
101
|
+
'filter': value['filter'],
|
|
102
|
+
'index': value['index'],
|
|
103
|
+
'limit': value['limit'],
|
|
104
|
+
'account_index': value['account_index'],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
@@ -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 { PublicPoolMetadata } from './PublicPoolMetadata';
|
|
17
|
+
import {
|
|
18
|
+
PublicPoolMetadataFromJSON,
|
|
19
|
+
PublicPoolMetadataFromJSONTyped,
|
|
20
|
+
PublicPoolMetadataToJSON,
|
|
21
|
+
} from './PublicPoolMetadata';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespPublicPoolsMetadata
|
|
27
|
+
*/
|
|
28
|
+
export interface RespPublicPoolsMetadata {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespPublicPoolsMetadata
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespPublicPoolsMetadata
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<PublicPoolMetadata>}
|
|
44
|
+
* @memberof RespPublicPoolsMetadata
|
|
45
|
+
*/
|
|
46
|
+
public_pools: Array<PublicPoolMetadata>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the RespPublicPoolsMetadata interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfRespPublicPoolsMetadata(value: object): value is RespPublicPoolsMetadata {
|
|
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 RespPublicPoolsMetadataFromJSON(json: any): RespPublicPoolsMetadata {
|
|
59
|
+
return RespPublicPoolsMetadataFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RespPublicPoolsMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespPublicPoolsMetadata {
|
|
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(PublicPoolMetadataFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function RespPublicPoolsMetadataToJSON(value?: RespPublicPoolsMetadata | 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(PublicPoolMetadataToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
package/models/index.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from './PositionFundings';
|
|
|
66
66
|
export * from './PriceLevel';
|
|
67
67
|
export * from './PublicPool';
|
|
68
68
|
export * from './PublicPoolInfo';
|
|
69
|
+
export * from './PublicPoolMetadata';
|
|
69
70
|
export * from './PublicPoolShare';
|
|
70
71
|
export * from './PublicPools';
|
|
71
72
|
export * from './ReferralCode';
|
|
@@ -101,6 +102,7 @@ export * from './ReqGetOrderBookOrders';
|
|
|
101
102
|
export * from './ReqGetOrderBooks';
|
|
102
103
|
export * from './ReqGetPositionFunding';
|
|
103
104
|
export * from './ReqGetPublicPools';
|
|
105
|
+
export * from './ReqGetPublicPoolsMetadata';
|
|
104
106
|
export * from './ReqGetRangeWithCursor';
|
|
105
107
|
export * from './ReqGetRangeWithIndex';
|
|
106
108
|
export * from './ReqGetRangeWithIndexSortable';
|
|
@@ -117,6 +119,7 @@ export * from './ReqIsWhitelisted';
|
|
|
117
119
|
export * from './RespChangeAccountTier';
|
|
118
120
|
export * from './RespGetFastBridgeInfo';
|
|
119
121
|
export * from './RespGetFastwithdrawalInfo';
|
|
122
|
+
export * from './RespPublicPoolsMetadata';
|
|
120
123
|
export * from './RespSendTx';
|
|
121
124
|
export * from './RespSendTxBatch';
|
|
122
125
|
export * from './RespWithdrawalDelay';
|
package/openapi.json
CHANGED
|
@@ -2174,6 +2174,82 @@
|
|
|
2174
2174
|
"description": "Get public pools"
|
|
2175
2175
|
}
|
|
2176
2176
|
},
|
|
2177
|
+
"/api/v1/publicPoolsMetadata": {
|
|
2178
|
+
"get": {
|
|
2179
|
+
"summary": "publicPoolsMetadata",
|
|
2180
|
+
"operationId": "publicPoolsMetadata",
|
|
2181
|
+
"responses": {
|
|
2182
|
+
"200": {
|
|
2183
|
+
"description": "A successful response.",
|
|
2184
|
+
"schema": {
|
|
2185
|
+
"$ref": "#/definitions/RespPublicPoolsMetadata"
|
|
2186
|
+
}
|
|
2187
|
+
},
|
|
2188
|
+
"400": {
|
|
2189
|
+
"description": "Bad request",
|
|
2190
|
+
"schema": {
|
|
2191
|
+
"$ref": "#/definitions/ResultCode"
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
"parameters": [
|
|
2196
|
+
{
|
|
2197
|
+
"name": "authorization",
|
|
2198
|
+
"in": "header",
|
|
2199
|
+
"required": false,
|
|
2200
|
+
"type": "string"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"name": "auth",
|
|
2204
|
+
"in": "query",
|
|
2205
|
+
"required": false,
|
|
2206
|
+
"type": "string"
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"name": "filter",
|
|
2210
|
+
"in": "query",
|
|
2211
|
+
"required": false,
|
|
2212
|
+
"type": "string",
|
|
2213
|
+
"enum": [
|
|
2214
|
+
"all",
|
|
2215
|
+
"user",
|
|
2216
|
+
"protocol",
|
|
2217
|
+
"account_index"
|
|
2218
|
+
]
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"name": "index",
|
|
2222
|
+
"in": "query",
|
|
2223
|
+
"required": true,
|
|
2224
|
+
"type": "integer",
|
|
2225
|
+
"format": "int64"
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
"name": "limit",
|
|
2229
|
+
"in": "query",
|
|
2230
|
+
"required": true,
|
|
2231
|
+
"type": "integer",
|
|
2232
|
+
"format": "int64",
|
|
2233
|
+
"minimum": 1,
|
|
2234
|
+
"maximum": 100
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"name": "account_index",
|
|
2238
|
+
"in": "query",
|
|
2239
|
+
"required": false,
|
|
2240
|
+
"type": "integer",
|
|
2241
|
+
"format": "int64"
|
|
2242
|
+
}
|
|
2243
|
+
],
|
|
2244
|
+
"tags": [
|
|
2245
|
+
"account"
|
|
2246
|
+
],
|
|
2247
|
+
"consumes": [
|
|
2248
|
+
"multipart/form-data"
|
|
2249
|
+
],
|
|
2250
|
+
"description": "Get public pools metadata"
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2177
2253
|
"/api/v1/recentTrades": {
|
|
2178
2254
|
"get": {
|
|
2179
2255
|
"summary": "recentTrades",
|
|
@@ -6021,6 +6097,75 @@
|
|
|
6021
6097
|
"share_prices"
|
|
6022
6098
|
]
|
|
6023
6099
|
},
|
|
6100
|
+
"PublicPoolMetadata": {
|
|
6101
|
+
"type": "object",
|
|
6102
|
+
"properties": {
|
|
6103
|
+
"code": {
|
|
6104
|
+
"type": "integer",
|
|
6105
|
+
"format": "int32",
|
|
6106
|
+
"example": "200"
|
|
6107
|
+
},
|
|
6108
|
+
"message": {
|
|
6109
|
+
"type": "string"
|
|
6110
|
+
},
|
|
6111
|
+
"account_index": {
|
|
6112
|
+
"type": "integer",
|
|
6113
|
+
"format": "int64",
|
|
6114
|
+
"example": "3"
|
|
6115
|
+
},
|
|
6116
|
+
"account_type": {
|
|
6117
|
+
"type": "integer",
|
|
6118
|
+
"format": "uint8",
|
|
6119
|
+
"example": "1"
|
|
6120
|
+
},
|
|
6121
|
+
"name": {
|
|
6122
|
+
"type": "string"
|
|
6123
|
+
},
|
|
6124
|
+
"l1_address": {
|
|
6125
|
+
"type": "string",
|
|
6126
|
+
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
6127
|
+
},
|
|
6128
|
+
"annual_percentage_yield": {
|
|
6129
|
+
"type": "number",
|
|
6130
|
+
"format": "double",
|
|
6131
|
+
"example": "20.5000"
|
|
6132
|
+
},
|
|
6133
|
+
"status": {
|
|
6134
|
+
"type": "integer",
|
|
6135
|
+
"format": "uint8",
|
|
6136
|
+
"example": "0"
|
|
6137
|
+
},
|
|
6138
|
+
"operator_fee": {
|
|
6139
|
+
"type": "string",
|
|
6140
|
+
"example": "100"
|
|
6141
|
+
},
|
|
6142
|
+
"total_asset_value": {
|
|
6143
|
+
"type": "string",
|
|
6144
|
+
"example": "19995"
|
|
6145
|
+
},
|
|
6146
|
+
"total_shares": {
|
|
6147
|
+
"type": "integer",
|
|
6148
|
+
"format": "int64",
|
|
6149
|
+
"example": "100000"
|
|
6150
|
+
},
|
|
6151
|
+
"account_share": {
|
|
6152
|
+
"$ref": "#/definitions/PublicPoolShare"
|
|
6153
|
+
}
|
|
6154
|
+
},
|
|
6155
|
+
"title": "PublicPoolMetadata",
|
|
6156
|
+
"required": [
|
|
6157
|
+
"code",
|
|
6158
|
+
"account_index",
|
|
6159
|
+
"account_type",
|
|
6160
|
+
"name",
|
|
6161
|
+
"l1_address",
|
|
6162
|
+
"annual_percentage_yield",
|
|
6163
|
+
"status",
|
|
6164
|
+
"operator_fee",
|
|
6165
|
+
"total_asset_value",
|
|
6166
|
+
"total_shares"
|
|
6167
|
+
]
|
|
6168
|
+
},
|
|
6024
6169
|
"PublicPoolShare": {
|
|
6025
6170
|
"type": "object",
|
|
6026
6171
|
"properties": {
|
|
@@ -7045,6 +7190,42 @@
|
|
|
7045
7190
|
"limit"
|
|
7046
7191
|
]
|
|
7047
7192
|
},
|
|
7193
|
+
"ReqGetPublicPoolsMetadata": {
|
|
7194
|
+
"type": "object",
|
|
7195
|
+
"properties": {
|
|
7196
|
+
"auth": {
|
|
7197
|
+
"type": "string"
|
|
7198
|
+
},
|
|
7199
|
+
"filter": {
|
|
7200
|
+
"type": "string",
|
|
7201
|
+
"enum": [
|
|
7202
|
+
"all",
|
|
7203
|
+
"user",
|
|
7204
|
+
"protocol",
|
|
7205
|
+
"account_index"
|
|
7206
|
+
]
|
|
7207
|
+
},
|
|
7208
|
+
"index": {
|
|
7209
|
+
"type": "integer",
|
|
7210
|
+
"format": "int64"
|
|
7211
|
+
},
|
|
7212
|
+
"limit": {
|
|
7213
|
+
"type": "integer",
|
|
7214
|
+
"format": "int64",
|
|
7215
|
+
"maximum": 100,
|
|
7216
|
+
"minimum": 1
|
|
7217
|
+
},
|
|
7218
|
+
"account_index": {
|
|
7219
|
+
"type": "integer",
|
|
7220
|
+
"format": "int64"
|
|
7221
|
+
}
|
|
7222
|
+
},
|
|
7223
|
+
"title": "ReqGetPublicPoolsMetadata",
|
|
7224
|
+
"required": [
|
|
7225
|
+
"index",
|
|
7226
|
+
"limit"
|
|
7227
|
+
]
|
|
7228
|
+
},
|
|
7048
7229
|
"ReqGetRangeWithCursor": {
|
|
7049
7230
|
"type": "object",
|
|
7050
7231
|
"properties": {
|
|
@@ -7499,6 +7680,30 @@
|
|
|
7499
7680
|
"max_withdrawal_amount"
|
|
7500
7681
|
]
|
|
7501
7682
|
},
|
|
7683
|
+
"RespPublicPoolsMetadata": {
|
|
7684
|
+
"type": "object",
|
|
7685
|
+
"properties": {
|
|
7686
|
+
"code": {
|
|
7687
|
+
"type": "integer",
|
|
7688
|
+
"format": "int32",
|
|
7689
|
+
"example": "200"
|
|
7690
|
+
},
|
|
7691
|
+
"message": {
|
|
7692
|
+
"type": "string"
|
|
7693
|
+
},
|
|
7694
|
+
"public_pools": {
|
|
7695
|
+
"type": "array",
|
|
7696
|
+
"items": {
|
|
7697
|
+
"$ref": "#/definitions/PublicPoolMetadata"
|
|
7698
|
+
}
|
|
7699
|
+
}
|
|
7700
|
+
},
|
|
7701
|
+
"title": "RespPublicPoolsMetadata",
|
|
7702
|
+
"required": [
|
|
7703
|
+
"code",
|
|
7704
|
+
"public_pools"
|
|
7705
|
+
]
|
|
7706
|
+
},
|
|
7502
7707
|
"RespSendTx": {
|
|
7503
7708
|
"type": "object",
|
|
7504
7709
|
"properties": {
|