zklighter-perps 1.0.216 → 1.0.217
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 +1 -0
- package/apis/OrderApi.ts +1 -8
- package/models/ApprovedIntegrator.ts +115 -0
- package/models/DetailedAccount.ts +15 -0
- package/models/Order.ts +27 -0
- package/models/ReqGetAccountActiveOrders.ts +2 -3
- package/models/SystemConfig.ts +36 -0
- package/models/Trade.ts +45 -0
- package/models/index.ts +1 -0
- package/openapi.json +129 -7
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/OrderApi.ts
CHANGED
|
@@ -67,9 +67,9 @@ export interface ExportRequest {
|
|
|
67
67
|
|
|
68
68
|
export interface AccountActiveOrdersRequest {
|
|
69
69
|
account_index: number;
|
|
70
|
-
market_id: number;
|
|
71
70
|
authorization?: string;
|
|
72
71
|
auth?: string;
|
|
72
|
+
market_id?: number;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface AccountInactiveOrdersRequest {
|
|
@@ -227,13 +227,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
227
227
|
);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
if (requestParameters['market_id'] == null) {
|
|
231
|
-
throw new runtime.RequiredError(
|
|
232
|
-
'market_id',
|
|
233
|
-
'Required parameter "market_id" was null or undefined when calling accountActiveOrders().'
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
230
|
const queryParameters: any = {};
|
|
238
231
|
|
|
239
232
|
if (requestParameters['authorization'] != null) {
|
|
@@ -0,0 +1,115 @@
|
|
|
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 ApprovedIntegrator
|
|
20
|
+
*/
|
|
21
|
+
export interface ApprovedIntegrator {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ApprovedIntegrator
|
|
26
|
+
*/
|
|
27
|
+
account_index: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApprovedIntegrator
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ApprovedIntegrator
|
|
38
|
+
*/
|
|
39
|
+
max_perps_taker_fee: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ApprovedIntegrator
|
|
44
|
+
*/
|
|
45
|
+
max_perps_maker_fee: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ApprovedIntegrator
|
|
50
|
+
*/
|
|
51
|
+
max_spot_taker_fee: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ApprovedIntegrator
|
|
56
|
+
*/
|
|
57
|
+
max_spot_maker_fee: number;
|
|
58
|
+
/**
|
|
59
|
+
* Timestamp in milliseconds, after which the integrator is no longer approved
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof ApprovedIntegrator
|
|
62
|
+
*/
|
|
63
|
+
approval_expiry: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the ApprovedIntegrator interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfApprovedIntegrator(value: object): value is ApprovedIntegrator {
|
|
70
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
71
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
72
|
+
if (!('max_perps_taker_fee' in value) || value['max_perps_taker_fee'] === undefined) return false;
|
|
73
|
+
if (!('max_perps_maker_fee' in value) || value['max_perps_maker_fee'] === undefined) return false;
|
|
74
|
+
if (!('max_spot_taker_fee' in value) || value['max_spot_taker_fee'] === undefined) return false;
|
|
75
|
+
if (!('max_spot_maker_fee' in value) || value['max_spot_maker_fee'] === undefined) return false;
|
|
76
|
+
if (!('approval_expiry' in value) || value['approval_expiry'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ApprovedIntegratorFromJSON(json: any): ApprovedIntegrator {
|
|
81
|
+
return ApprovedIntegratorFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ApprovedIntegratorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApprovedIntegrator {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'account_index': json['account_index'],
|
|
91
|
+
'name': json['name'],
|
|
92
|
+
'max_perps_taker_fee': json['max_perps_taker_fee'],
|
|
93
|
+
'max_perps_maker_fee': json['max_perps_maker_fee'],
|
|
94
|
+
'max_spot_taker_fee': json['max_spot_taker_fee'],
|
|
95
|
+
'max_spot_maker_fee': json['max_spot_maker_fee'],
|
|
96
|
+
'approval_expiry': json['approval_expiry'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function ApprovedIntegratorToJSON(value?: ApprovedIntegrator | null): any {
|
|
101
|
+
if (value == null) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'account_index': value['account_index'],
|
|
107
|
+
'name': value['name'],
|
|
108
|
+
'max_perps_taker_fee': value['max_perps_taker_fee'],
|
|
109
|
+
'max_perps_maker_fee': value['max_perps_maker_fee'],
|
|
110
|
+
'max_spot_taker_fee': value['max_spot_taker_fee'],
|
|
111
|
+
'max_spot_maker_fee': value['max_spot_maker_fee'],
|
|
112
|
+
'approval_expiry': value['approval_expiry'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
AccountAssetFromJSONTyped,
|
|
20
20
|
AccountAssetToJSON,
|
|
21
21
|
} from './AccountAsset';
|
|
22
|
+
import type { ApprovedIntegrator } from './ApprovedIntegrator';
|
|
23
|
+
import {
|
|
24
|
+
ApprovedIntegratorFromJSON,
|
|
25
|
+
ApprovedIntegratorFromJSONTyped,
|
|
26
|
+
ApprovedIntegratorToJSON,
|
|
27
|
+
} from './ApprovedIntegrator';
|
|
22
28
|
import type { PendingUnlock } from './PendingUnlock';
|
|
23
29
|
import {
|
|
24
30
|
PendingUnlockFromJSON,
|
|
@@ -212,6 +218,12 @@ export interface DetailedAccount {
|
|
|
212
218
|
* @memberof DetailedAccount
|
|
213
219
|
*/
|
|
214
220
|
pending_unlocks?: Array<PendingUnlock>;
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* @type {Array<ApprovedIntegrator>}
|
|
224
|
+
* @memberof DetailedAccount
|
|
225
|
+
*/
|
|
226
|
+
approved_integrators: Array<ApprovedIntegrator>;
|
|
215
227
|
}
|
|
216
228
|
|
|
217
229
|
/**
|
|
@@ -242,6 +254,7 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
242
254
|
if (!('cross_asset_value' in value) || value['cross_asset_value'] === undefined) return false;
|
|
243
255
|
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
244
256
|
if (!('shares' in value) || value['shares'] === undefined) return false;
|
|
257
|
+
if (!('approved_integrators' in value) || value['approved_integrators'] === undefined) return false;
|
|
245
258
|
return true;
|
|
246
259
|
}
|
|
247
260
|
|
|
@@ -282,6 +295,7 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
282
295
|
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
283
296
|
'shares': ((json['shares'] as Array<any>).map(PublicPoolShareFromJSON)),
|
|
284
297
|
'pending_unlocks': json['pending_unlocks'] == null ? undefined : ((json['pending_unlocks'] as Array<any>).map(PendingUnlockFromJSON)),
|
|
298
|
+
'approved_integrators': ((json['approved_integrators'] as Array<any>).map(ApprovedIntegratorFromJSON)),
|
|
285
299
|
};
|
|
286
300
|
}
|
|
287
301
|
|
|
@@ -318,6 +332,7 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
318
332
|
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
319
333
|
'shares': ((value['shares'] as Array<any>).map(PublicPoolShareToJSON)),
|
|
320
334
|
'pending_unlocks': value['pending_unlocks'] == null ? undefined : ((value['pending_unlocks'] as Array<any>).map(PendingUnlockToJSON)),
|
|
335
|
+
'approved_integrators': ((value['approved_integrators'] as Array<any>).map(ApprovedIntegratorToJSON)),
|
|
321
336
|
};
|
|
322
337
|
}
|
|
323
338
|
|
package/models/Order.ts
CHANGED
|
@@ -193,6 +193,24 @@ export interface Order {
|
|
|
193
193
|
* @memberof Order
|
|
194
194
|
*/
|
|
195
195
|
to_cancel_order_id_0: string;
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @type {string}
|
|
199
|
+
* @memberof Order
|
|
200
|
+
*/
|
|
201
|
+
integrator_fee_collector_index: string;
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @type {string}
|
|
205
|
+
* @memberof Order
|
|
206
|
+
*/
|
|
207
|
+
integrator_taker_fee: string;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @type {string}
|
|
211
|
+
* @memberof Order
|
|
212
|
+
*/
|
|
213
|
+
integrator_maker_fee: string;
|
|
196
214
|
/**
|
|
197
215
|
*
|
|
198
216
|
* @type {number}
|
|
@@ -323,6 +341,9 @@ export function instanceOfOrder(value: object): value is Order {
|
|
|
323
341
|
if (!('to_trigger_order_id_0' in value) || value['to_trigger_order_id_0'] === undefined) return false;
|
|
324
342
|
if (!('to_trigger_order_id_1' in value) || value['to_trigger_order_id_1'] === undefined) return false;
|
|
325
343
|
if (!('to_cancel_order_id_0' in value) || value['to_cancel_order_id_0'] === undefined) return false;
|
|
344
|
+
if (!('integrator_fee_collector_index' in value) || value['integrator_fee_collector_index'] === undefined) return false;
|
|
345
|
+
if (!('integrator_taker_fee' in value) || value['integrator_taker_fee'] === undefined) return false;
|
|
346
|
+
if (!('integrator_maker_fee' in value) || value['integrator_maker_fee'] === undefined) return false;
|
|
326
347
|
if (!('block_height' in value) || value['block_height'] === undefined) return false;
|
|
327
348
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
328
349
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
@@ -370,6 +391,9 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
370
391
|
'to_trigger_order_id_0': json['to_trigger_order_id_0'],
|
|
371
392
|
'to_trigger_order_id_1': json['to_trigger_order_id_1'],
|
|
372
393
|
'to_cancel_order_id_0': json['to_cancel_order_id_0'],
|
|
394
|
+
'integrator_fee_collector_index': json['integrator_fee_collector_index'],
|
|
395
|
+
'integrator_taker_fee': json['integrator_taker_fee'],
|
|
396
|
+
'integrator_maker_fee': json['integrator_maker_fee'],
|
|
373
397
|
'block_height': json['block_height'],
|
|
374
398
|
'timestamp': json['timestamp'],
|
|
375
399
|
'created_at': json['created_at'],
|
|
@@ -413,6 +437,9 @@ export function OrderToJSON(value?: Order | null): any {
|
|
|
413
437
|
'to_trigger_order_id_0': value['to_trigger_order_id_0'],
|
|
414
438
|
'to_trigger_order_id_1': value['to_trigger_order_id_1'],
|
|
415
439
|
'to_cancel_order_id_0': value['to_cancel_order_id_0'],
|
|
440
|
+
'integrator_fee_collector_index': value['integrator_fee_collector_index'],
|
|
441
|
+
'integrator_taker_fee': value['integrator_taker_fee'],
|
|
442
|
+
'integrator_maker_fee': value['integrator_maker_fee'],
|
|
416
443
|
'block_height': value['block_height'],
|
|
417
444
|
'timestamp': value['timestamp'],
|
|
418
445
|
'created_at': value['created_at'],
|
|
@@ -36,7 +36,7 @@ export interface ReqGetAccountActiveOrders {
|
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof ReqGetAccountActiveOrders
|
|
38
38
|
*/
|
|
39
|
-
market_id
|
|
39
|
+
market_id?: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -44,7 +44,6 @@ export interface ReqGetAccountActiveOrders {
|
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfReqGetAccountActiveOrders(value: object): value is ReqGetAccountActiveOrders {
|
|
46
46
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
47
|
-
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
48
47
|
return true;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -60,7 +59,7 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
60
59
|
|
|
61
60
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
62
61
|
'account_index': json['account_index'],
|
|
63
|
-
'market_id': json['market_id'],
|
|
62
|
+
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
64
63
|
};
|
|
65
64
|
}
|
|
66
65
|
|
package/models/SystemConfig.ts
CHANGED
|
@@ -61,6 +61,30 @@ export interface SystemConfig {
|
|
|
61
61
|
* @memberof SystemConfig
|
|
62
62
|
*/
|
|
63
63
|
staking_pool_lockup_period: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof SystemConfig
|
|
68
|
+
*/
|
|
69
|
+
max_integrator_spot_taker_fee: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof SystemConfig
|
|
74
|
+
*/
|
|
75
|
+
max_integrator_spot_maker_fee: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof SystemConfig
|
|
80
|
+
*/
|
|
81
|
+
max_integrator_perps_taker_fee: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof SystemConfig
|
|
86
|
+
*/
|
|
87
|
+
max_integrator_perps_maker_fee: number;
|
|
64
88
|
}
|
|
65
89
|
|
|
66
90
|
/**
|
|
@@ -73,6 +97,10 @@ export function instanceOfSystemConfig(value: object): value is SystemConfig {
|
|
|
73
97
|
if (!('funding_fee_rebate_account_index' in value) || value['funding_fee_rebate_account_index'] === undefined) return false;
|
|
74
98
|
if (!('liquidity_pool_cooldown_period' in value) || value['liquidity_pool_cooldown_period'] === undefined) return false;
|
|
75
99
|
if (!('staking_pool_lockup_period' in value) || value['staking_pool_lockup_period'] === undefined) return false;
|
|
100
|
+
if (!('max_integrator_spot_taker_fee' in value) || value['max_integrator_spot_taker_fee'] === undefined) return false;
|
|
101
|
+
if (!('max_integrator_spot_maker_fee' in value) || value['max_integrator_spot_maker_fee'] === undefined) return false;
|
|
102
|
+
if (!('max_integrator_perps_taker_fee' in value) || value['max_integrator_perps_taker_fee'] === undefined) return false;
|
|
103
|
+
if (!('max_integrator_perps_maker_fee' in value) || value['max_integrator_perps_maker_fee'] === undefined) return false;
|
|
76
104
|
return true;
|
|
77
105
|
}
|
|
78
106
|
|
|
@@ -93,6 +121,10 @@ export function SystemConfigFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
93
121
|
'funding_fee_rebate_account_index': json['funding_fee_rebate_account_index'],
|
|
94
122
|
'liquidity_pool_cooldown_period': json['liquidity_pool_cooldown_period'],
|
|
95
123
|
'staking_pool_lockup_period': json['staking_pool_lockup_period'],
|
|
124
|
+
'max_integrator_spot_taker_fee': json['max_integrator_spot_taker_fee'],
|
|
125
|
+
'max_integrator_spot_maker_fee': json['max_integrator_spot_maker_fee'],
|
|
126
|
+
'max_integrator_perps_taker_fee': json['max_integrator_perps_taker_fee'],
|
|
127
|
+
'max_integrator_perps_maker_fee': json['max_integrator_perps_maker_fee'],
|
|
96
128
|
};
|
|
97
129
|
}
|
|
98
130
|
|
|
@@ -109,6 +141,10 @@ export function SystemConfigToJSON(value?: SystemConfig | null): any {
|
|
|
109
141
|
'funding_fee_rebate_account_index': value['funding_fee_rebate_account_index'],
|
|
110
142
|
'liquidity_pool_cooldown_period': value['liquidity_pool_cooldown_period'],
|
|
111
143
|
'staking_pool_lockup_period': value['staking_pool_lockup_period'],
|
|
144
|
+
'max_integrator_spot_taker_fee': value['max_integrator_spot_taker_fee'],
|
|
145
|
+
'max_integrator_spot_maker_fee': value['max_integrator_spot_maker_fee'],
|
|
146
|
+
'max_integrator_perps_taker_fee': value['max_integrator_perps_taker_fee'],
|
|
147
|
+
'max_integrator_perps_maker_fee': value['max_integrator_perps_maker_fee'],
|
|
112
148
|
};
|
|
113
149
|
}
|
|
114
150
|
|
package/models/Trade.ts
CHANGED
|
@@ -25,6 +25,12 @@ export interface Trade {
|
|
|
25
25
|
* @memberof Trade
|
|
26
26
|
*/
|
|
27
27
|
trade_id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Trade
|
|
32
|
+
*/
|
|
33
|
+
trade_id_str: string;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {string}
|
|
@@ -67,24 +73,48 @@ export interface Trade {
|
|
|
67
73
|
* @memberof Trade
|
|
68
74
|
*/
|
|
69
75
|
ask_id: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof Trade
|
|
80
|
+
*/
|
|
81
|
+
ask_id_str: string;
|
|
70
82
|
/**
|
|
71
83
|
*
|
|
72
84
|
* @type {number}
|
|
73
85
|
* @memberof Trade
|
|
74
86
|
*/
|
|
75
87
|
bid_id: number;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Trade
|
|
92
|
+
*/
|
|
93
|
+
bid_id_str: string;
|
|
76
94
|
/**
|
|
77
95
|
*
|
|
78
96
|
* @type {number}
|
|
79
97
|
* @memberof Trade
|
|
80
98
|
*/
|
|
81
99
|
ask_client_id: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof Trade
|
|
104
|
+
*/
|
|
105
|
+
ask_client_id_str: string;
|
|
82
106
|
/**
|
|
83
107
|
*
|
|
84
108
|
* @type {number}
|
|
85
109
|
* @memberof Trade
|
|
86
110
|
*/
|
|
87
111
|
bid_client_id: number;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Trade
|
|
116
|
+
*/
|
|
117
|
+
bid_client_id_str: string;
|
|
88
118
|
/**
|
|
89
119
|
*
|
|
90
120
|
* @type {number}
|
|
@@ -213,6 +243,7 @@ export type TradeTypeEnum = typeof TradeTypeEnum[keyof typeof TradeTypeEnum];
|
|
|
213
243
|
*/
|
|
214
244
|
export function instanceOfTrade(value: object): value is Trade {
|
|
215
245
|
if (!('trade_id' in value) || value['trade_id'] === undefined) return false;
|
|
246
|
+
if (!('trade_id_str' in value) || value['trade_id_str'] === undefined) return false;
|
|
216
247
|
if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
|
|
217
248
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
218
249
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
@@ -220,9 +251,13 @@ export function instanceOfTrade(value: object): value is Trade {
|
|
|
220
251
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
221
252
|
if (!('usd_amount' in value) || value['usd_amount'] === undefined) return false;
|
|
222
253
|
if (!('ask_id' in value) || value['ask_id'] === undefined) return false;
|
|
254
|
+
if (!('ask_id_str' in value) || value['ask_id_str'] === undefined) return false;
|
|
223
255
|
if (!('bid_id' in value) || value['bid_id'] === undefined) return false;
|
|
256
|
+
if (!('bid_id_str' in value) || value['bid_id_str'] === undefined) return false;
|
|
224
257
|
if (!('ask_client_id' in value) || value['ask_client_id'] === undefined) return false;
|
|
258
|
+
if (!('ask_client_id_str' in value) || value['ask_client_id_str'] === undefined) return false;
|
|
225
259
|
if (!('bid_client_id' in value) || value['bid_client_id'] === undefined) return false;
|
|
260
|
+
if (!('bid_client_id_str' in value) || value['bid_client_id_str'] === undefined) return false;
|
|
226
261
|
if (!('ask_account_id' in value) || value['ask_account_id'] === undefined) return false;
|
|
227
262
|
if (!('bid_account_id' in value) || value['bid_account_id'] === undefined) return false;
|
|
228
263
|
if (!('is_maker_ask' in value) || value['is_maker_ask'] === undefined) return false;
|
|
@@ -253,6 +288,7 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
|
|
|
253
288
|
return {
|
|
254
289
|
|
|
255
290
|
'trade_id': json['trade_id'],
|
|
291
|
+
'trade_id_str': json['trade_id_str'],
|
|
256
292
|
'tx_hash': json['tx_hash'],
|
|
257
293
|
'type': json['type'],
|
|
258
294
|
'market_id': json['market_id'],
|
|
@@ -260,9 +296,13 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
|
|
|
260
296
|
'price': json['price'],
|
|
261
297
|
'usd_amount': json['usd_amount'],
|
|
262
298
|
'ask_id': json['ask_id'],
|
|
299
|
+
'ask_id_str': json['ask_id_str'],
|
|
263
300
|
'bid_id': json['bid_id'],
|
|
301
|
+
'bid_id_str': json['bid_id_str'],
|
|
264
302
|
'ask_client_id': json['ask_client_id'],
|
|
303
|
+
'ask_client_id_str': json['ask_client_id_str'],
|
|
265
304
|
'bid_client_id': json['bid_client_id'],
|
|
305
|
+
'bid_client_id_str': json['bid_client_id_str'],
|
|
266
306
|
'ask_account_id': json['ask_account_id'],
|
|
267
307
|
'bid_account_id': json['bid_account_id'],
|
|
268
308
|
'is_maker_ask': json['is_maker_ask'],
|
|
@@ -291,6 +331,7 @@ export function TradeToJSON(value?: Trade | null): any {
|
|
|
291
331
|
return {
|
|
292
332
|
|
|
293
333
|
'trade_id': value['trade_id'],
|
|
334
|
+
'trade_id_str': value['trade_id_str'],
|
|
294
335
|
'tx_hash': value['tx_hash'],
|
|
295
336
|
'type': value['type'],
|
|
296
337
|
'market_id': value['market_id'],
|
|
@@ -298,9 +339,13 @@ export function TradeToJSON(value?: Trade | null): any {
|
|
|
298
339
|
'price': value['price'],
|
|
299
340
|
'usd_amount': value['usd_amount'],
|
|
300
341
|
'ask_id': value['ask_id'],
|
|
342
|
+
'ask_id_str': value['ask_id_str'],
|
|
301
343
|
'bid_id': value['bid_id'],
|
|
344
|
+
'bid_id_str': value['bid_id_str'],
|
|
302
345
|
'ask_client_id': value['ask_client_id'],
|
|
346
|
+
'ask_client_id_str': value['ask_client_id_str'],
|
|
303
347
|
'bid_client_id': value['bid_client_id'],
|
|
348
|
+
'bid_client_id_str': value['bid_client_id_str'],
|
|
304
349
|
'ask_account_id': value['ask_account_id'],
|
|
305
350
|
'bid_account_id': value['bid_account_id'],
|
|
306
351
|
'is_maker_ask': value['is_maker_ask'],
|
package/models/index.ts
CHANGED
package/openapi.json
CHANGED
|
@@ -127,9 +127,10 @@
|
|
|
127
127
|
{
|
|
128
128
|
"name": "market_id",
|
|
129
129
|
"in": "query",
|
|
130
|
-
"required":
|
|
130
|
+
"required": false,
|
|
131
131
|
"type": "integer",
|
|
132
|
-
"format": "int16"
|
|
132
|
+
"format": "int16",
|
|
133
|
+
"default": "255"
|
|
133
134
|
}
|
|
134
135
|
],
|
|
135
136
|
"tags": [
|
|
@@ -4927,6 +4928,56 @@
|
|
|
4927
4928
|
"scopes"
|
|
4928
4929
|
]
|
|
4929
4930
|
},
|
|
4931
|
+
"ApprovedIntegrator": {
|
|
4932
|
+
"type": "object",
|
|
4933
|
+
"properties": {
|
|
4934
|
+
"account_index": {
|
|
4935
|
+
"type": "integer",
|
|
4936
|
+
"format": "int64",
|
|
4937
|
+
"example": "54621"
|
|
4938
|
+
},
|
|
4939
|
+
"name": {
|
|
4940
|
+
"type": "string",
|
|
4941
|
+
"example": "Integrator1"
|
|
4942
|
+
},
|
|
4943
|
+
"max_perps_taker_fee": {
|
|
4944
|
+
"type": "integer",
|
|
4945
|
+
"format": "int32",
|
|
4946
|
+
"example": "10"
|
|
4947
|
+
},
|
|
4948
|
+
"max_perps_maker_fee": {
|
|
4949
|
+
"type": "integer",
|
|
4950
|
+
"format": "int32",
|
|
4951
|
+
"example": "1"
|
|
4952
|
+
},
|
|
4953
|
+
"max_spot_taker_fee": {
|
|
4954
|
+
"type": "integer",
|
|
4955
|
+
"format": "int32",
|
|
4956
|
+
"example": "10"
|
|
4957
|
+
},
|
|
4958
|
+
"max_spot_maker_fee": {
|
|
4959
|
+
"type": "integer",
|
|
4960
|
+
"format": "int32",
|
|
4961
|
+
"example": "1"
|
|
4962
|
+
},
|
|
4963
|
+
"approval_expiry": {
|
|
4964
|
+
"type": "integer",
|
|
4965
|
+
"format": "int64",
|
|
4966
|
+
"example": "1640995200",
|
|
4967
|
+
"description": " Timestamp in milliseconds, after which the integrator is no longer approved"
|
|
4968
|
+
}
|
|
4969
|
+
},
|
|
4970
|
+
"title": "ApprovedIntegrator",
|
|
4971
|
+
"required": [
|
|
4972
|
+
"account_index",
|
|
4973
|
+
"name",
|
|
4974
|
+
"max_perps_taker_fee",
|
|
4975
|
+
"max_perps_maker_fee",
|
|
4976
|
+
"max_spot_taker_fee",
|
|
4977
|
+
"max_spot_maker_fee",
|
|
4978
|
+
"approval_expiry"
|
|
4979
|
+
]
|
|
4980
|
+
},
|
|
4930
4981
|
"Asset": {
|
|
4931
4982
|
"type": "object",
|
|
4932
4983
|
"properties": {
|
|
@@ -5864,6 +5915,12 @@
|
|
|
5864
5915
|
"items": {
|
|
5865
5916
|
"$ref": "#/definitions/PendingUnlock"
|
|
5866
5917
|
}
|
|
5918
|
+
},
|
|
5919
|
+
"approved_integrators": {
|
|
5920
|
+
"type": "array",
|
|
5921
|
+
"items": {
|
|
5922
|
+
"$ref": "#/definitions/ApprovedIntegrator"
|
|
5923
|
+
}
|
|
5867
5924
|
}
|
|
5868
5925
|
},
|
|
5869
5926
|
"title": "DetailedAccount",
|
|
@@ -5891,7 +5948,8 @@
|
|
|
5891
5948
|
"total_asset_value",
|
|
5892
5949
|
"cross_asset_value",
|
|
5893
5950
|
"pool_info",
|
|
5894
|
-
"shares"
|
|
5951
|
+
"shares",
|
|
5952
|
+
"approved_integrators"
|
|
5895
5953
|
]
|
|
5896
5954
|
},
|
|
5897
5955
|
"DetailedAccounts": {
|
|
@@ -7224,6 +7282,18 @@
|
|
|
7224
7282
|
"type": "string",
|
|
7225
7283
|
"example": "1"
|
|
7226
7284
|
},
|
|
7285
|
+
"integrator_fee_collector_index": {
|
|
7286
|
+
"type": "string",
|
|
7287
|
+
"example": "1"
|
|
7288
|
+
},
|
|
7289
|
+
"integrator_taker_fee": {
|
|
7290
|
+
"type": "string",
|
|
7291
|
+
"example": "1"
|
|
7292
|
+
},
|
|
7293
|
+
"integrator_maker_fee": {
|
|
7294
|
+
"type": "string",
|
|
7295
|
+
"example": "1"
|
|
7296
|
+
},
|
|
7227
7297
|
"block_height": {
|
|
7228
7298
|
"type": "integer",
|
|
7229
7299
|
"format": "int64",
|
|
@@ -7281,6 +7351,9 @@
|
|
|
7281
7351
|
"to_trigger_order_id_0",
|
|
7282
7352
|
"to_trigger_order_id_1",
|
|
7283
7353
|
"to_cancel_order_id_0",
|
|
7354
|
+
"integrator_fee_collector_index",
|
|
7355
|
+
"integrator_taker_fee",
|
|
7356
|
+
"integrator_maker_fee",
|
|
7284
7357
|
"block_height",
|
|
7285
7358
|
"timestamp",
|
|
7286
7359
|
"created_at",
|
|
@@ -8780,13 +8853,13 @@
|
|
|
8780
8853
|
},
|
|
8781
8854
|
"market_id": {
|
|
8782
8855
|
"type": "integer",
|
|
8783
|
-
"format": "int16"
|
|
8856
|
+
"format": "int16",
|
|
8857
|
+
"default": "255"
|
|
8784
8858
|
}
|
|
8785
8859
|
},
|
|
8786
8860
|
"title": "ReqGetAccountActiveOrders",
|
|
8787
8861
|
"required": [
|
|
8788
|
-
"account_index"
|
|
8789
|
-
"market_id"
|
|
8862
|
+
"account_index"
|
|
8790
8863
|
]
|
|
8791
8864
|
},
|
|
8792
8865
|
"ReqGetAccountApiKeys": {
|
|
@@ -11352,6 +11425,26 @@
|
|
|
11352
11425
|
"type": "integer",
|
|
11353
11426
|
"format": "int64",
|
|
11354
11427
|
"example": "604800"
|
|
11428
|
+
},
|
|
11429
|
+
"max_integrator_spot_taker_fee": {
|
|
11430
|
+
"type": "integer",
|
|
11431
|
+
"format": "int32",
|
|
11432
|
+
"example": "200"
|
|
11433
|
+
},
|
|
11434
|
+
"max_integrator_spot_maker_fee": {
|
|
11435
|
+
"type": "integer",
|
|
11436
|
+
"format": "int32",
|
|
11437
|
+
"example": "200"
|
|
11438
|
+
},
|
|
11439
|
+
"max_integrator_perps_taker_fee": {
|
|
11440
|
+
"type": "integer",
|
|
11441
|
+
"format": "int32",
|
|
11442
|
+
"example": "200"
|
|
11443
|
+
},
|
|
11444
|
+
"max_integrator_perps_maker_fee": {
|
|
11445
|
+
"type": "integer",
|
|
11446
|
+
"format": "int32",
|
|
11447
|
+
"example": "200"
|
|
11355
11448
|
}
|
|
11356
11449
|
},
|
|
11357
11450
|
"title": "SystemConfig",
|
|
@@ -11361,7 +11454,11 @@
|
|
|
11361
11454
|
"staking_pool_index",
|
|
11362
11455
|
"funding_fee_rebate_account_index",
|
|
11363
11456
|
"liquidity_pool_cooldown_period",
|
|
11364
|
-
"staking_pool_lockup_period"
|
|
11457
|
+
"staking_pool_lockup_period",
|
|
11458
|
+
"max_integrator_spot_taker_fee",
|
|
11459
|
+
"max_integrator_spot_maker_fee",
|
|
11460
|
+
"max_integrator_perps_taker_fee",
|
|
11461
|
+
"max_integrator_perps_maker_fee"
|
|
11365
11462
|
]
|
|
11366
11463
|
},
|
|
11367
11464
|
"Ticker": {
|
|
@@ -11393,6 +11490,10 @@
|
|
|
11393
11490
|
"format": "int64",
|
|
11394
11491
|
"example": "145"
|
|
11395
11492
|
},
|
|
11493
|
+
"trade_id_str": {
|
|
11494
|
+
"type": "string",
|
|
11495
|
+
"example": "145"
|
|
11496
|
+
},
|
|
11396
11497
|
"tx_hash": {
|
|
11397
11498
|
"type": "string",
|
|
11398
11499
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
@@ -11429,21 +11530,37 @@
|
|
|
11429
11530
|
"format": "int64",
|
|
11430
11531
|
"example": "145"
|
|
11431
11532
|
},
|
|
11533
|
+
"ask_id_str": {
|
|
11534
|
+
"type": "string",
|
|
11535
|
+
"example": "145"
|
|
11536
|
+
},
|
|
11432
11537
|
"bid_id": {
|
|
11433
11538
|
"type": "integer",
|
|
11434
11539
|
"format": "int64",
|
|
11435
11540
|
"example": "245"
|
|
11436
11541
|
},
|
|
11542
|
+
"bid_id_str": {
|
|
11543
|
+
"type": "string",
|
|
11544
|
+
"example": "245"
|
|
11545
|
+
},
|
|
11437
11546
|
"ask_client_id": {
|
|
11438
11547
|
"type": "integer",
|
|
11439
11548
|
"format": "int64",
|
|
11440
11549
|
"example": "145"
|
|
11441
11550
|
},
|
|
11551
|
+
"ask_client_id_str": {
|
|
11552
|
+
"type": "string",
|
|
11553
|
+
"example": "145"
|
|
11554
|
+
},
|
|
11442
11555
|
"bid_client_id": {
|
|
11443
11556
|
"type": "integer",
|
|
11444
11557
|
"format": "int64",
|
|
11445
11558
|
"example": "245"
|
|
11446
11559
|
},
|
|
11560
|
+
"bid_client_id_str": {
|
|
11561
|
+
"type": "string",
|
|
11562
|
+
"example": "245"
|
|
11563
|
+
},
|
|
11447
11564
|
"ask_account_id": {
|
|
11448
11565
|
"type": "integer",
|
|
11449
11566
|
"format": "int64",
|
|
@@ -11532,6 +11649,7 @@
|
|
|
11532
11649
|
"title": "Trade",
|
|
11533
11650
|
"required": [
|
|
11534
11651
|
"trade_id",
|
|
11652
|
+
"trade_id_str",
|
|
11535
11653
|
"tx_hash",
|
|
11536
11654
|
"type",
|
|
11537
11655
|
"market_id",
|
|
@@ -11539,9 +11657,13 @@
|
|
|
11539
11657
|
"price",
|
|
11540
11658
|
"usd_amount",
|
|
11541
11659
|
"ask_id",
|
|
11660
|
+
"ask_id_str",
|
|
11542
11661
|
"bid_id",
|
|
11662
|
+
"bid_id_str",
|
|
11543
11663
|
"ask_client_id",
|
|
11664
|
+
"ask_client_id_str",
|
|
11544
11665
|
"bid_client_id",
|
|
11666
|
+
"bid_client_id_str",
|
|
11545
11667
|
"ask_account_id",
|
|
11546
11668
|
"bid_account_id",
|
|
11547
11669
|
"is_maker_ask",
|