zklighter-perps 1.0.145 → 1.0.147
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 +2 -0
- package/apis/InfoApi.ts +61 -0
- package/models/Account.ts +0 -9
- package/models/DetailedAccount.ts +0 -9
- package/models/PublicPool.ts +0 -9
- package/models/ReqGetTransferFeeInfo.ts +3 -2
- package/models/index.ts +2 -0
- package/openapi.json +100 -16
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -119,6 +119,7 @@ models/ReqGetRecentTrades.ts
|
|
|
119
119
|
models/ReqGetReferralCode.ts
|
|
120
120
|
models/ReqGetReferralPoints.ts
|
|
121
121
|
models/ReqGetTrades.ts
|
|
122
|
+
models/ReqGetTransferFeeInfo.ts
|
|
122
123
|
models/ReqGetTransferHistory.ts
|
|
123
124
|
models/ReqGetTx.ts
|
|
124
125
|
models/ReqGetWithdrawHistory.ts
|
|
@@ -138,6 +139,7 @@ models/SubAccounts.ts
|
|
|
138
139
|
models/Ticker.ts
|
|
139
140
|
models/Trade.ts
|
|
140
141
|
models/Trades.ts
|
|
142
|
+
models/TransferFeeInfo.ts
|
|
141
143
|
models/TransferHistory.ts
|
|
142
144
|
models/TransferHistoryItem.ts
|
|
143
145
|
models/Tx.ts
|
package/apis/InfoApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
Layer1BasicInfo,
|
|
19
19
|
RespWithdrawalDelay,
|
|
20
20
|
ResultCode,
|
|
21
|
+
TransferFeeInfo,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
23
24
|
Layer1BasicInfoFromJSON,
|
|
@@ -26,8 +27,17 @@ import {
|
|
|
26
27
|
RespWithdrawalDelayToJSON,
|
|
27
28
|
ResultCodeFromJSON,
|
|
28
29
|
ResultCodeToJSON,
|
|
30
|
+
TransferFeeInfoFromJSON,
|
|
31
|
+
TransferFeeInfoToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
34
|
+
export interface TransferFeeInfoRequest {
|
|
35
|
+
account_index: number;
|
|
36
|
+
authorization?: string;
|
|
37
|
+
auth?: string;
|
|
38
|
+
to_account_index?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
31
41
|
/**
|
|
32
42
|
*
|
|
33
43
|
*/
|
|
@@ -61,6 +71,57 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
61
71
|
return await response.value();
|
|
62
72
|
}
|
|
63
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Transfer fee info
|
|
76
|
+
* transferFeeInfo
|
|
77
|
+
*/
|
|
78
|
+
async transferFeeInfoRaw(requestParameters: TransferFeeInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransferFeeInfo>> {
|
|
79
|
+
if (requestParameters['account_index'] == null) {
|
|
80
|
+
throw new runtime.RequiredError(
|
|
81
|
+
'account_index',
|
|
82
|
+
'Required parameter "account_index" was null or undefined when calling transferFeeInfo().'
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const queryParameters: any = {};
|
|
87
|
+
|
|
88
|
+
if (requestParameters['auth'] != null) {
|
|
89
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (requestParameters['account_index'] != null) {
|
|
93
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (requestParameters['to_account_index'] != null) {
|
|
97
|
+
queryParameters['to_account_index'] = requestParameters['to_account_index'];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
101
|
+
|
|
102
|
+
if (requestParameters['authorization'] != null) {
|
|
103
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const response = await this.request({
|
|
107
|
+
path: `/api/v1/transferFeeInfo`,
|
|
108
|
+
method: 'GET',
|
|
109
|
+
headers: headerParameters,
|
|
110
|
+
query: queryParameters,
|
|
111
|
+
}, initOverrides);
|
|
112
|
+
|
|
113
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TransferFeeInfoFromJSON(jsonValue));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Transfer fee info
|
|
118
|
+
* transferFeeInfo
|
|
119
|
+
*/
|
|
120
|
+
async transferFeeInfo(requestParameters: TransferFeeInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransferFeeInfo> {
|
|
121
|
+
const response = await this.transferFeeInfoRaw(requestParameters, initOverrides);
|
|
122
|
+
return await response.value();
|
|
123
|
+
}
|
|
124
|
+
|
|
64
125
|
/**
|
|
65
126
|
* Withdrawal delay in seconds
|
|
66
127
|
* withdrawalDelay
|
package/models/Account.ts
CHANGED
|
@@ -85,12 +85,6 @@ export interface Account {
|
|
|
85
85
|
* @memberof Account
|
|
86
86
|
*/
|
|
87
87
|
collateral: string;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @memberof Account
|
|
92
|
-
*/
|
|
93
|
-
referral_code: string;
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
/**
|
|
@@ -107,7 +101,6 @@ export function instanceOfAccount(value: object): value is Account {
|
|
|
107
101
|
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
108
102
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
109
103
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
110
|
-
if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
|
|
111
104
|
return true;
|
|
112
105
|
}
|
|
113
106
|
|
|
@@ -132,7 +125,6 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
|
|
|
132
125
|
'pending_order_count': json['pending_order_count'],
|
|
133
126
|
'status': json['status'],
|
|
134
127
|
'collateral': json['collateral'],
|
|
135
|
-
'referral_code': json['referral_code'],
|
|
136
128
|
};
|
|
137
129
|
}
|
|
138
130
|
|
|
@@ -153,7 +145,6 @@ export function AccountToJSON(value?: Account | null): any {
|
|
|
153
145
|
'pending_order_count': value['pending_order_count'],
|
|
154
146
|
'status': value['status'],
|
|
155
147
|
'collateral': value['collateral'],
|
|
156
|
-
'referral_code': value['referral_code'],
|
|
157
148
|
};
|
|
158
149
|
}
|
|
159
150
|
|
|
@@ -104,12 +104,6 @@ export interface DetailedAccount {
|
|
|
104
104
|
* @memberof DetailedAccount
|
|
105
105
|
*/
|
|
106
106
|
collateral: string;
|
|
107
|
-
/**
|
|
108
|
-
*
|
|
109
|
-
* @type {string}
|
|
110
|
-
* @memberof DetailedAccount
|
|
111
|
-
*/
|
|
112
|
-
referral_code: string;
|
|
113
107
|
/**
|
|
114
108
|
*
|
|
115
109
|
* @type {number}
|
|
@@ -186,7 +180,6 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
186
180
|
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
187
181
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
188
182
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
189
|
-
if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
|
|
190
183
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
191
184
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
192
185
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
@@ -221,7 +214,6 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
221
214
|
'pending_order_count': json['pending_order_count'],
|
|
222
215
|
'status': json['status'],
|
|
223
216
|
'collateral': json['collateral'],
|
|
224
|
-
'referral_code': json['referral_code'],
|
|
225
217
|
'account_index': json['account_index'],
|
|
226
218
|
'name': json['name'],
|
|
227
219
|
'description': json['description'],
|
|
@@ -252,7 +244,6 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
252
244
|
'pending_order_count': value['pending_order_count'],
|
|
253
245
|
'status': value['status'],
|
|
254
246
|
'collateral': value['collateral'],
|
|
255
|
-
'referral_code': value['referral_code'],
|
|
256
247
|
'account_index': value['account_index'],
|
|
257
248
|
'name': value['name'],
|
|
258
249
|
'description': value['description'],
|
package/models/PublicPool.ts
CHANGED
|
@@ -98,12 +98,6 @@ export interface PublicPool {
|
|
|
98
98
|
* @memberof PublicPool
|
|
99
99
|
*/
|
|
100
100
|
collateral: string;
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @type {string}
|
|
104
|
-
* @memberof PublicPool
|
|
105
|
-
*/
|
|
106
|
-
referral_code: string;
|
|
107
101
|
/**
|
|
108
102
|
*
|
|
109
103
|
* @type {number}
|
|
@@ -174,7 +168,6 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
|
|
|
174
168
|
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
175
169
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
176
170
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
177
|
-
if (!('referral_code' in value) || value['referral_code'] === undefined) return false;
|
|
178
171
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
179
172
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
180
173
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
@@ -207,7 +200,6 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
207
200
|
'pending_order_count': json['pending_order_count'],
|
|
208
201
|
'status': json['status'],
|
|
209
202
|
'collateral': json['collateral'],
|
|
210
|
-
'referral_code': json['referral_code'],
|
|
211
203
|
'account_index': json['account_index'],
|
|
212
204
|
'name': json['name'],
|
|
213
205
|
'description': json['description'],
|
|
@@ -237,7 +229,6 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
|
|
|
237
229
|
'pending_order_count': value['pending_order_count'],
|
|
238
230
|
'status': value['status'],
|
|
239
231
|
'collateral': value['collateral'],
|
|
240
|
-
'referral_code': value['referral_code'],
|
|
241
232
|
'account_index': value['account_index'],
|
|
242
233
|
'name': value['name'],
|
|
243
234
|
'description': value['description'],
|
|
@@ -30,7 +30,7 @@ export interface ReqGetTransferFeeInfo {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof ReqGetTransferFeeInfo
|
|
32
32
|
*/
|
|
33
|
-
account_index
|
|
33
|
+
account_index: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
@@ -43,6 +43,7 @@ export interface ReqGetTransferFeeInfo {
|
|
|
43
43
|
* Check if a given object implements the ReqGetTransferFeeInfo interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfReqGetTransferFeeInfo(value: object): value is ReqGetTransferFeeInfo {
|
|
46
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
46
47
|
return true;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -57,7 +58,7 @@ export function ReqGetTransferFeeInfoFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
57
58
|
return {
|
|
58
59
|
|
|
59
60
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
60
|
-
'account_index': json['account_index']
|
|
61
|
+
'account_index': json['account_index'],
|
|
61
62
|
'to_account_index': json['to_account_index'] == null ? undefined : json['to_account_index'],
|
|
62
63
|
};
|
|
63
64
|
}
|
package/models/index.ts
CHANGED
|
@@ -107,6 +107,7 @@ export * from './ReqGetRecentTrades';
|
|
|
107
107
|
export * from './ReqGetReferralCode';
|
|
108
108
|
export * from './ReqGetReferralPoints';
|
|
109
109
|
export * from './ReqGetTrades';
|
|
110
|
+
export * from './ReqGetTransferFeeInfo';
|
|
110
111
|
export * from './ReqGetTransferHistory';
|
|
111
112
|
export * from './ReqGetTx';
|
|
112
113
|
export * from './ReqGetWithdrawHistory';
|
|
@@ -126,6 +127,7 @@ export * from './SubAccounts';
|
|
|
126
127
|
export * from './Ticker';
|
|
127
128
|
export * from './Trade';
|
|
128
129
|
export * from './Trades';
|
|
130
|
+
export * from './TransferFeeInfo';
|
|
129
131
|
export * from './TransferHistory';
|
|
130
132
|
export * from './TransferHistoryItem';
|
|
131
133
|
export * from './Tx';
|
package/openapi.json
CHANGED
|
@@ -2678,6 +2678,62 @@
|
|
|
2678
2678
|
"description": "Get transfer history"
|
|
2679
2679
|
}
|
|
2680
2680
|
},
|
|
2681
|
+
"/api/v1/transferFeeInfo": {
|
|
2682
|
+
"get": {
|
|
2683
|
+
"summary": "transferFeeInfo",
|
|
2684
|
+
"operationId": "transferFeeInfo",
|
|
2685
|
+
"responses": {
|
|
2686
|
+
"200": {
|
|
2687
|
+
"description": "A successful response.",
|
|
2688
|
+
"schema": {
|
|
2689
|
+
"$ref": "#/definitions/TransferFeeInfo"
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
"400": {
|
|
2693
|
+
"description": "Bad request",
|
|
2694
|
+
"schema": {
|
|
2695
|
+
"$ref": "#/definitions/ResultCode"
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
"parameters": [
|
|
2700
|
+
{
|
|
2701
|
+
"name": "authorization",
|
|
2702
|
+
"in": "header",
|
|
2703
|
+
"required": false,
|
|
2704
|
+
"type": "string"
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"name": "auth",
|
|
2708
|
+
"in": "query",
|
|
2709
|
+
"required": false,
|
|
2710
|
+
"type": "string"
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"name": "account_index",
|
|
2714
|
+
"in": "query",
|
|
2715
|
+
"required": true,
|
|
2716
|
+
"type": "integer",
|
|
2717
|
+
"format": "int64"
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"name": "to_account_index",
|
|
2721
|
+
"in": "query",
|
|
2722
|
+
"required": false,
|
|
2723
|
+
"type": "integer",
|
|
2724
|
+
"format": "int64",
|
|
2725
|
+
"default": "-1"
|
|
2726
|
+
}
|
|
2727
|
+
],
|
|
2728
|
+
"tags": [
|
|
2729
|
+
"info"
|
|
2730
|
+
],
|
|
2731
|
+
"consumes": [
|
|
2732
|
+
"multipart/form-data"
|
|
2733
|
+
],
|
|
2734
|
+
"description": "Transfer fee info"
|
|
2735
|
+
}
|
|
2736
|
+
},
|
|
2681
2737
|
"/api/v1/tx": {
|
|
2682
2738
|
"get": {
|
|
2683
2739
|
"summary": "tx",
|
|
@@ -2973,10 +3029,6 @@
|
|
|
2973
3029
|
"collateral": {
|
|
2974
3030
|
"type": "string",
|
|
2975
3031
|
"example": "46342"
|
|
2976
|
-
},
|
|
2977
|
-
"referral_code": {
|
|
2978
|
-
"type": "string",
|
|
2979
|
-
"example": "ABC123"
|
|
2980
3032
|
}
|
|
2981
3033
|
},
|
|
2982
3034
|
"title": "Account",
|
|
@@ -2990,8 +3042,7 @@
|
|
|
2990
3042
|
"total_isolated_order_count",
|
|
2991
3043
|
"pending_order_count",
|
|
2992
3044
|
"status",
|
|
2993
|
-
"collateral"
|
|
2994
|
-
"referral_code"
|
|
3045
|
+
"collateral"
|
|
2995
3046
|
]
|
|
2996
3047
|
},
|
|
2997
3048
|
"AccountApiKeys": {
|
|
@@ -4043,10 +4094,6 @@
|
|
|
4043
4094
|
"type": "string",
|
|
4044
4095
|
"example": "46342"
|
|
4045
4096
|
},
|
|
4046
|
-
"referral_code": {
|
|
4047
|
-
"type": "string",
|
|
4048
|
-
"example": "ABC123"
|
|
4049
|
-
},
|
|
4050
4097
|
"account_index": {
|
|
4051
4098
|
"type": "integer",
|
|
4052
4099
|
"format": "int64"
|
|
@@ -4102,7 +4149,6 @@
|
|
|
4102
4149
|
"pending_order_count",
|
|
4103
4150
|
"status",
|
|
4104
4151
|
"collateral",
|
|
4105
|
-
"referral_code",
|
|
4106
4152
|
"account_index",
|
|
4107
4153
|
"name",
|
|
4108
4154
|
"description",
|
|
@@ -5768,10 +5814,6 @@
|
|
|
5768
5814
|
"type": "string",
|
|
5769
5815
|
"example": "46342"
|
|
5770
5816
|
},
|
|
5771
|
-
"referral_code": {
|
|
5772
|
-
"type": "string",
|
|
5773
|
-
"example": "ABC123"
|
|
5774
|
-
},
|
|
5775
5817
|
"account_index": {
|
|
5776
5818
|
"type": "integer",
|
|
5777
5819
|
"format": "int64"
|
|
@@ -5818,7 +5860,6 @@
|
|
|
5818
5860
|
"pending_order_count",
|
|
5819
5861
|
"status",
|
|
5820
5862
|
"collateral",
|
|
5821
|
-
"referral_code",
|
|
5822
5863
|
"account_index",
|
|
5823
5864
|
"name",
|
|
5824
5865
|
"description",
|
|
@@ -7093,6 +7134,27 @@
|
|
|
7093
7134
|
"limit"
|
|
7094
7135
|
]
|
|
7095
7136
|
},
|
|
7137
|
+
"ReqGetTransferFeeInfo": {
|
|
7138
|
+
"type": "object",
|
|
7139
|
+
"properties": {
|
|
7140
|
+
"auth": {
|
|
7141
|
+
"type": "string"
|
|
7142
|
+
},
|
|
7143
|
+
"account_index": {
|
|
7144
|
+
"type": "integer",
|
|
7145
|
+
"format": "int64"
|
|
7146
|
+
},
|
|
7147
|
+
"to_account_index": {
|
|
7148
|
+
"type": "integer",
|
|
7149
|
+
"format": "int64",
|
|
7150
|
+
"default": "-1"
|
|
7151
|
+
}
|
|
7152
|
+
},
|
|
7153
|
+
"title": "ReqGetTransferFeeInfo",
|
|
7154
|
+
"required": [
|
|
7155
|
+
"account_index"
|
|
7156
|
+
]
|
|
7157
|
+
},
|
|
7096
7158
|
"ReqGetTransferHistory": {
|
|
7097
7159
|
"type": "object",
|
|
7098
7160
|
"properties": {
|
|
@@ -7772,6 +7834,28 @@
|
|
|
7772
7834
|
"trades"
|
|
7773
7835
|
]
|
|
7774
7836
|
},
|
|
7837
|
+
"TransferFeeInfo": {
|
|
7838
|
+
"type": "object",
|
|
7839
|
+
"properties": {
|
|
7840
|
+
"code": {
|
|
7841
|
+
"type": "integer",
|
|
7842
|
+
"format": "int32",
|
|
7843
|
+
"example": "200"
|
|
7844
|
+
},
|
|
7845
|
+
"message": {
|
|
7846
|
+
"type": "string"
|
|
7847
|
+
},
|
|
7848
|
+
"transfer_fee_usdc": {
|
|
7849
|
+
"type": "integer",
|
|
7850
|
+
"format": "int64"
|
|
7851
|
+
}
|
|
7852
|
+
},
|
|
7853
|
+
"title": "TransferFeeInfo",
|
|
7854
|
+
"required": [
|
|
7855
|
+
"code",
|
|
7856
|
+
"transfer_fee_usdc"
|
|
7857
|
+
]
|
|
7858
|
+
},
|
|
7775
7859
|
"TransferHistory": {
|
|
7776
7860
|
"type": "object",
|
|
7777
7861
|
"properties": {
|