zklighter-perps 1.0.110 → 1.0.111
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 +0 -2
- package/apis/AccountApi.ts +0 -71
- package/apis/OrderApi.ts +12 -0
- package/models/ReqGetAccountInactiveOrders.ts +9 -0
- package/models/index.ts +0 -2
- package/openapi.json +10 -95
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -16,7 +16,6 @@ models/Account.ts
|
|
|
16
16
|
models/AccountApiKeys.ts
|
|
17
17
|
models/AccountMarketStats.ts
|
|
18
18
|
models/AccountMetadata.ts
|
|
19
|
-
models/AccountMetadatas.ts
|
|
20
19
|
models/AccountPnL.ts
|
|
21
20
|
models/AccountPosition.ts
|
|
22
21
|
models/AccountStats.ts
|
|
@@ -83,7 +82,6 @@ models/ReqGetAccountActiveOrders.ts
|
|
|
83
82
|
models/ReqGetAccountApiKeys.ts
|
|
84
83
|
models/ReqGetAccountByL1Address.ts
|
|
85
84
|
models/ReqGetAccountInactiveOrders.ts
|
|
86
|
-
models/ReqGetAccountMetadata.ts
|
|
87
85
|
models/ReqGetAccountOrders.ts
|
|
88
86
|
models/ReqGetAccountPendingTxs.ts
|
|
89
87
|
models/ReqGetAccountPnL.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AccountApiKeys,
|
|
19
|
-
AccountMetadatas,
|
|
20
19
|
AccountPnL,
|
|
21
20
|
Accounts,
|
|
22
21
|
DetailedAccounts,
|
|
@@ -31,8 +30,6 @@ import type {
|
|
|
31
30
|
import {
|
|
32
31
|
AccountApiKeysFromJSON,
|
|
33
32
|
AccountApiKeysToJSON,
|
|
34
|
-
AccountMetadatasFromJSON,
|
|
35
|
-
AccountMetadatasToJSON,
|
|
36
33
|
AccountPnLFromJSON,
|
|
37
34
|
AccountPnLToJSON,
|
|
38
35
|
AccountsFromJSON,
|
|
@@ -60,12 +57,6 @@ export interface AccountRequest {
|
|
|
60
57
|
value: string;
|
|
61
58
|
}
|
|
62
59
|
|
|
63
|
-
export interface AccountMetadataRequest {
|
|
64
|
-
by: AccountMetadataByEnum;
|
|
65
|
-
value: string;
|
|
66
|
-
auth?: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
60
|
export interface AccountsRequest {
|
|
70
61
|
limit: number;
|
|
71
62
|
index?: number;
|
|
@@ -178,60 +169,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
178
169
|
return await response.value();
|
|
179
170
|
}
|
|
180
171
|
|
|
181
|
-
/**
|
|
182
|
-
* Get account metadatas
|
|
183
|
-
* accountMetadata
|
|
184
|
-
*/
|
|
185
|
-
async accountMetadataRaw(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountMetadatas>> {
|
|
186
|
-
if (requestParameters['by'] == null) {
|
|
187
|
-
throw new runtime.RequiredError(
|
|
188
|
-
'by',
|
|
189
|
-
'Required parameter "by" was null or undefined when calling accountMetadata().'
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (requestParameters['value'] == null) {
|
|
194
|
-
throw new runtime.RequiredError(
|
|
195
|
-
'value',
|
|
196
|
-
'Required parameter "value" was null or undefined when calling accountMetadata().'
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const queryParameters: any = {};
|
|
201
|
-
|
|
202
|
-
if (requestParameters['by'] != null) {
|
|
203
|
-
queryParameters['by'] = requestParameters['by'];
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (requestParameters['value'] != null) {
|
|
207
|
-
queryParameters['value'] = requestParameters['value'];
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (requestParameters['auth'] != null) {
|
|
211
|
-
queryParameters['auth'] = requestParameters['auth'];
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
215
|
-
|
|
216
|
-
const response = await this.request({
|
|
217
|
-
path: `/api/v1/accountMetadata`,
|
|
218
|
-
method: 'GET',
|
|
219
|
-
headers: headerParameters,
|
|
220
|
-
query: queryParameters,
|
|
221
|
-
}, initOverrides);
|
|
222
|
-
|
|
223
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AccountMetadatasFromJSON(jsonValue));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Get account metadatas
|
|
228
|
-
* accountMetadata
|
|
229
|
-
*/
|
|
230
|
-
async accountMetadata(requestParameters: AccountMetadataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountMetadatas> {
|
|
231
|
-
const response = await this.accountMetadataRaw(requestParameters, initOverrides);
|
|
232
|
-
return await response.value();
|
|
233
|
-
}
|
|
234
|
-
|
|
235
172
|
/**
|
|
236
173
|
* Get accounts returns accounts by account index
|
|
237
174
|
* accounts
|
|
@@ -749,14 +686,6 @@ export const AccountByEnum = {
|
|
|
749
686
|
L1Address: 'l1_address'
|
|
750
687
|
} as const;
|
|
751
688
|
export type AccountByEnum = typeof AccountByEnum[keyof typeof AccountByEnum];
|
|
752
|
-
/**
|
|
753
|
-
* @export
|
|
754
|
-
*/
|
|
755
|
-
export const AccountMetadataByEnum = {
|
|
756
|
-
Index: 'index',
|
|
757
|
-
L1Address: 'l1_address'
|
|
758
|
-
} as const;
|
|
759
|
-
export type AccountMetadataByEnum = typeof AccountMetadataByEnum[keyof typeof AccountMetadataByEnum];
|
|
760
689
|
/**
|
|
761
690
|
* @export
|
|
762
691
|
*/
|
package/apis/OrderApi.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface AccountActiveOrdersRequest {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export interface AccountInactiveOrdersRequest {
|
|
50
|
+
auth: string;
|
|
50
51
|
account_index: number;
|
|
51
52
|
limit: number;
|
|
52
53
|
market_id?: number;
|
|
@@ -163,6 +164,13 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
163
164
|
* accountInactiveOrders
|
|
164
165
|
*/
|
|
165
166
|
async accountInactiveOrdersRaw(requestParameters: AccountInactiveOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Orders>> {
|
|
167
|
+
if (requestParameters['auth'] == null) {
|
|
168
|
+
throw new runtime.RequiredError(
|
|
169
|
+
'auth',
|
|
170
|
+
'Required parameter "auth" was null or undefined when calling accountInactiveOrders().'
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
166
174
|
if (requestParameters['account_index'] == null) {
|
|
167
175
|
throw new runtime.RequiredError(
|
|
168
176
|
'account_index',
|
|
@@ -179,6 +187,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
179
187
|
|
|
180
188
|
const queryParameters: any = {};
|
|
181
189
|
|
|
190
|
+
if (requestParameters['auth'] != null) {
|
|
191
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
192
|
+
}
|
|
193
|
+
|
|
182
194
|
if (requestParameters['account_index'] != null) {
|
|
183
195
|
queryParameters['account_index'] = requestParameters['account_index'];
|
|
184
196
|
}
|
|
@@ -19,6 +19,12 @@ import { mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ReqGetAccountInactiveOrders
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetAccountInactiveOrders {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetAccountInactiveOrders
|
|
26
|
+
*/
|
|
27
|
+
auth: string;
|
|
22
28
|
/**
|
|
23
29
|
*
|
|
24
30
|
* @type {number}
|
|
@@ -61,6 +67,7 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
61
67
|
* Check if a given object implements the ReqGetAccountInactiveOrders interface.
|
|
62
68
|
*/
|
|
63
69
|
export function instanceOfReqGetAccountInactiveOrders(value: object): value is ReqGetAccountInactiveOrders {
|
|
70
|
+
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
64
71
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
65
72
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
66
73
|
return true;
|
|
@@ -76,6 +83,7 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
|
|
|
76
83
|
}
|
|
77
84
|
return {
|
|
78
85
|
|
|
86
|
+
'auth': json['auth'],
|
|
79
87
|
'account_index': json['account_index'],
|
|
80
88
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
81
89
|
'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
|
|
@@ -91,6 +99,7 @@ export function ReqGetAccountInactiveOrdersToJSON(value?: ReqGetAccountInactiveO
|
|
|
91
99
|
}
|
|
92
100
|
return {
|
|
93
101
|
|
|
102
|
+
'auth': value['auth'],
|
|
94
103
|
'account_index': value['account_index'],
|
|
95
104
|
'market_id': value['market_id'],
|
|
96
105
|
'ask_filter': value['ask_filter'],
|
package/models/index.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from './Account';
|
|
|
4
4
|
export * from './AccountApiKeys';
|
|
5
5
|
export * from './AccountMarketStats';
|
|
6
6
|
export * from './AccountMetadata';
|
|
7
|
-
export * from './AccountMetadatas';
|
|
8
7
|
export * from './AccountPnL';
|
|
9
8
|
export * from './AccountPosition';
|
|
10
9
|
export * from './AccountStats';
|
|
@@ -71,7 +70,6 @@ export * from './ReqGetAccountActiveOrders';
|
|
|
71
70
|
export * from './ReqGetAccountApiKeys';
|
|
72
71
|
export * from './ReqGetAccountByL1Address';
|
|
73
72
|
export * from './ReqGetAccountInactiveOrders';
|
|
74
|
-
export * from './ReqGetAccountMetadata';
|
|
75
73
|
export * from './ReqGetAccountOrders';
|
|
76
74
|
export * from './ReqGetAccountPendingTxs';
|
|
77
75
|
export * from './ReqGetAccountPnL';
|
package/openapi.json
CHANGED
|
@@ -152,6 +152,12 @@
|
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
"parameters": [
|
|
155
|
+
{
|
|
156
|
+
"name": "auth",
|
|
157
|
+
"in": "query",
|
|
158
|
+
"required": true,
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
155
161
|
{
|
|
156
162
|
"name": "account_index",
|
|
157
163
|
"in": "query",
|
|
@@ -206,57 +212,6 @@
|
|
|
206
212
|
"description": "Get account inactive orders"
|
|
207
213
|
}
|
|
208
214
|
},
|
|
209
|
-
"/api/v1/accountMetadata": {
|
|
210
|
-
"get": {
|
|
211
|
-
"summary": "accountMetadata",
|
|
212
|
-
"operationId": "accountMetadata",
|
|
213
|
-
"responses": {
|
|
214
|
-
"200": {
|
|
215
|
-
"description": "A successful response.",
|
|
216
|
-
"schema": {
|
|
217
|
-
"$ref": "#/definitions/AccountMetadatas"
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
"400": {
|
|
221
|
-
"description": "Bad request",
|
|
222
|
-
"schema": {
|
|
223
|
-
"$ref": "#/definitions/ResultCode"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"parameters": [
|
|
228
|
-
{
|
|
229
|
-
"name": "by",
|
|
230
|
-
"in": "query",
|
|
231
|
-
"required": true,
|
|
232
|
-
"type": "string",
|
|
233
|
-
"enum": [
|
|
234
|
-
"index",
|
|
235
|
-
"l1_address"
|
|
236
|
-
]
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"name": "value",
|
|
240
|
-
"in": "query",
|
|
241
|
-
"required": true,
|
|
242
|
-
"type": "string"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
"name": "auth",
|
|
246
|
-
"in": "query",
|
|
247
|
-
"required": false,
|
|
248
|
-
"type": "string"
|
|
249
|
-
}
|
|
250
|
-
],
|
|
251
|
-
"tags": [
|
|
252
|
-
"account"
|
|
253
|
-
],
|
|
254
|
-
"consumes": [
|
|
255
|
-
"multipart/form-data"
|
|
256
|
-
],
|
|
257
|
-
"description": "Get account metadatas"
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
215
|
"/api/v1/accountOrders": {
|
|
261
216
|
"get": {
|
|
262
217
|
"summary": "accountOrders",
|
|
@@ -2734,27 +2689,6 @@
|
|
|
2734
2689
|
"max_referral_usage_limit"
|
|
2735
2690
|
]
|
|
2736
2691
|
},
|
|
2737
|
-
"AccountMetadatas": {
|
|
2738
|
-
"type": "object",
|
|
2739
|
-
"properties": {
|
|
2740
|
-
"code": {
|
|
2741
|
-
"type": "integer",
|
|
2742
|
-
"format": "int32",
|
|
2743
|
-
"example": "200"
|
|
2744
|
-
},
|
|
2745
|
-
"message": {
|
|
2746
|
-
"type": "string"
|
|
2747
|
-
},
|
|
2748
|
-
"account_metadatas": {
|
|
2749
|
-
"$ref": "#/definitions/mapint64AccountMetadata"
|
|
2750
|
-
}
|
|
2751
|
-
},
|
|
2752
|
-
"title": "AccountMetadatas",
|
|
2753
|
-
"required": [
|
|
2754
|
-
"code",
|
|
2755
|
-
"account_metadatas"
|
|
2756
|
-
]
|
|
2757
|
-
},
|
|
2758
2692
|
"AccountPnL": {
|
|
2759
2693
|
"type": "object",
|
|
2760
2694
|
"properties": {
|
|
@@ -5657,6 +5591,9 @@
|
|
|
5657
5591
|
"ReqGetAccountInactiveOrders": {
|
|
5658
5592
|
"type": "object",
|
|
5659
5593
|
"properties": {
|
|
5594
|
+
"auth": {
|
|
5595
|
+
"type": "string"
|
|
5596
|
+
},
|
|
5660
5597
|
"account_index": {
|
|
5661
5598
|
"type": "integer",
|
|
5662
5599
|
"format": "int64"
|
|
@@ -5686,33 +5623,11 @@
|
|
|
5686
5623
|
},
|
|
5687
5624
|
"title": "ReqGetAccountInactiveOrders",
|
|
5688
5625
|
"required": [
|
|
5626
|
+
"auth",
|
|
5689
5627
|
"account_index",
|
|
5690
5628
|
"limit"
|
|
5691
5629
|
]
|
|
5692
5630
|
},
|
|
5693
|
-
"ReqGetAccountMetadata": {
|
|
5694
|
-
"type": "object",
|
|
5695
|
-
"properties": {
|
|
5696
|
-
"by": {
|
|
5697
|
-
"type": "string",
|
|
5698
|
-
"enum": [
|
|
5699
|
-
"index",
|
|
5700
|
-
"l1_address"
|
|
5701
|
-
]
|
|
5702
|
-
},
|
|
5703
|
-
"value": {
|
|
5704
|
-
"type": "string"
|
|
5705
|
-
},
|
|
5706
|
-
"auth": {
|
|
5707
|
-
"type": "string"
|
|
5708
|
-
}
|
|
5709
|
-
},
|
|
5710
|
-
"title": "ReqGetAccountMetadata",
|
|
5711
|
-
"required": [
|
|
5712
|
-
"by",
|
|
5713
|
-
"value"
|
|
5714
|
-
]
|
|
5715
|
-
},
|
|
5716
5631
|
"ReqGetAccountOrders": {
|
|
5717
5632
|
"type": "object",
|
|
5718
5633
|
"properties": {
|