zklighter-perps 1.0.53 → 1.0.55
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/models/Account.ts +13 -4
- package/models/AccountMarketStats.ts +0 -18
- package/models/AccountPosition.ts +9 -0
- package/models/DetailedAccount.ts +13 -4
- package/models/Order.ts +60 -36
- package/models/OrderBookDetail.ts +4 -13
- package/models/PublicPool.ts +13 -4
- package/openapi.json +83 -60
- package/package.json +1 -1
package/models/Account.ts
CHANGED
|
@@ -60,7 +60,13 @@ export interface Account {
|
|
|
60
60
|
* @type {number}
|
|
61
61
|
* @memberof Account
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
total_order_count: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof Account
|
|
68
|
+
*/
|
|
69
|
+
pending_order_count: number;
|
|
64
70
|
/**
|
|
65
71
|
*
|
|
66
72
|
* @type {number}
|
|
@@ -84,7 +90,8 @@ export function instanceOfAccount(value: object): value is Account {
|
|
|
84
90
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
85
91
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
86
92
|
if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
|
|
87
|
-
if (!('
|
|
93
|
+
if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
|
|
94
|
+
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
88
95
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
89
96
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
90
97
|
return true;
|
|
@@ -106,7 +113,8 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
|
|
|
106
113
|
'index': json['index'],
|
|
107
114
|
'l1_address': json['l1_address'],
|
|
108
115
|
'cancel_all_time': json['cancel_all_time'],
|
|
109
|
-
'
|
|
116
|
+
'total_order_count': json['total_order_count'],
|
|
117
|
+
'pending_order_count': json['pending_order_count'],
|
|
110
118
|
'status': json['status'],
|
|
111
119
|
'collateral': json['collateral'],
|
|
112
120
|
};
|
|
@@ -124,7 +132,8 @@ export function AccountToJSON(value?: Account | null): any {
|
|
|
124
132
|
'index': value['index'],
|
|
125
133
|
'l1_address': value['l1_address'],
|
|
126
134
|
'cancel_all_time': value['cancel_all_time'],
|
|
127
|
-
'
|
|
135
|
+
'total_order_count': value['total_order_count'],
|
|
136
|
+
'pending_order_count': value['pending_order_count'],
|
|
128
137
|
'status': value['status'],
|
|
129
138
|
'collateral': value['collateral'],
|
|
130
139
|
};
|
|
@@ -43,18 +43,6 @@ export interface AccountMarketStats {
|
|
|
43
43
|
* @memberof AccountMarketStats
|
|
44
44
|
*/
|
|
45
45
|
daily_quote_token_volume: number;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {number}
|
|
49
|
-
* @memberof AccountMarketStats
|
|
50
|
-
*/
|
|
51
|
-
open_position_base: number;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @type {number}
|
|
55
|
-
* @memberof AccountMarketStats
|
|
56
|
-
*/
|
|
57
|
-
open_position_quote: number;
|
|
58
46
|
}
|
|
59
47
|
|
|
60
48
|
/**
|
|
@@ -65,8 +53,6 @@ export function instanceOfAccountMarketStats(value: object): value is AccountMar
|
|
|
65
53
|
if (!('daily_trades_count' in value) || value['daily_trades_count'] === undefined) return false;
|
|
66
54
|
if (!('daily_base_token_volume' in value) || value['daily_base_token_volume'] === undefined) return false;
|
|
67
55
|
if (!('daily_quote_token_volume' in value) || value['daily_quote_token_volume'] === undefined) return false;
|
|
68
|
-
if (!('open_position_base' in value) || value['open_position_base'] === undefined) return false;
|
|
69
|
-
if (!('open_position_quote' in value) || value['open_position_quote'] === undefined) return false;
|
|
70
56
|
return true;
|
|
71
57
|
}
|
|
72
58
|
|
|
@@ -84,8 +70,6 @@ export function AccountMarketStatsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
84
70
|
'daily_trades_count': json['daily_trades_count'],
|
|
85
71
|
'daily_base_token_volume': json['daily_base_token_volume'],
|
|
86
72
|
'daily_quote_token_volume': json['daily_quote_token_volume'],
|
|
87
|
-
'open_position_base': json['open_position_base'],
|
|
88
|
-
'open_position_quote': json['open_position_quote'],
|
|
89
73
|
};
|
|
90
74
|
}
|
|
91
75
|
|
|
@@ -99,8 +83,6 @@ export function AccountMarketStatsToJSON(value?: AccountMarketStats | null): any
|
|
|
99
83
|
'daily_trades_count': value['daily_trades_count'],
|
|
100
84
|
'daily_base_token_volume': value['daily_base_token_volume'],
|
|
101
85
|
'daily_quote_token_volume': value['daily_quote_token_volume'],
|
|
102
|
-
'open_position_base': value['open_position_base'],
|
|
103
|
-
'open_position_quote': value['open_position_quote'],
|
|
104
86
|
};
|
|
105
87
|
}
|
|
106
88
|
|
|
@@ -31,6 +31,12 @@ export interface AccountPosition {
|
|
|
31
31
|
* @memberof AccountPosition
|
|
32
32
|
*/
|
|
33
33
|
open_order_count: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof AccountPosition
|
|
38
|
+
*/
|
|
39
|
+
pending_order_count: number;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {string}
|
|
@@ -81,6 +87,7 @@ export interface AccountPosition {
|
|
|
81
87
|
export function instanceOfAccountPosition(value: object): value is AccountPosition {
|
|
82
88
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
83
89
|
if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
|
|
90
|
+
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
84
91
|
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
85
92
|
if (!('sign' in value) || value['sign'] === undefined) return false;
|
|
86
93
|
if (!('position' in value) || value['position'] === undefined) return false;
|
|
@@ -103,6 +110,7 @@ export function AccountPositionFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
103
110
|
|
|
104
111
|
'market_id': json['market_id'],
|
|
105
112
|
'open_order_count': json['open_order_count'],
|
|
113
|
+
'pending_order_count': json['pending_order_count'],
|
|
106
114
|
'symbol': json['symbol'],
|
|
107
115
|
'sign': json['sign'],
|
|
108
116
|
'position': json['position'],
|
|
@@ -121,6 +129,7 @@ export function AccountPositionToJSON(value?: AccountPosition | null): any {
|
|
|
121
129
|
|
|
122
130
|
'market_id': value['market_id'],
|
|
123
131
|
'open_order_count': value['open_order_count'],
|
|
132
|
+
'pending_order_count': value['pending_order_count'],
|
|
124
133
|
'symbol': value['symbol'],
|
|
125
134
|
'sign': value['sign'],
|
|
126
135
|
'position': value['position'],
|
|
@@ -85,7 +85,13 @@ export interface DetailedAccount {
|
|
|
85
85
|
* @type {number}
|
|
86
86
|
* @memberof DetailedAccount
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
total_order_count: number;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof DetailedAccount
|
|
93
|
+
*/
|
|
94
|
+
pending_order_count: number;
|
|
89
95
|
/**
|
|
90
96
|
*
|
|
91
97
|
* @type {number}
|
|
@@ -151,7 +157,8 @@ export function instanceOfDetailedAccount(value: object): value is DetailedAccou
|
|
|
151
157
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
152
158
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
153
159
|
if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
|
|
154
|
-
if (!('
|
|
160
|
+
if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
|
|
161
|
+
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
155
162
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
156
163
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
157
164
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
@@ -180,7 +187,8 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
180
187
|
'index': json['index'],
|
|
181
188
|
'l1_address': json['l1_address'],
|
|
182
189
|
'cancel_all_time': json['cancel_all_time'],
|
|
183
|
-
'
|
|
190
|
+
'total_order_count': json['total_order_count'],
|
|
191
|
+
'pending_order_count': json['pending_order_count'],
|
|
184
192
|
'status': json['status'],
|
|
185
193
|
'collateral': json['collateral'],
|
|
186
194
|
'name': json['name'],
|
|
@@ -205,7 +213,8 @@ export function DetailedAccountToJSON(value?: DetailedAccount | null): any {
|
|
|
205
213
|
'index': value['index'],
|
|
206
214
|
'l1_address': value['l1_address'],
|
|
207
215
|
'cancel_all_time': value['cancel_all_time'],
|
|
208
|
-
'
|
|
216
|
+
'total_order_count': value['total_order_count'],
|
|
217
|
+
'pending_order_count': value['pending_order_count'],
|
|
209
218
|
'status': value['status'],
|
|
210
219
|
'collateral': value['collateral'],
|
|
211
220
|
'name': value['name'],
|
package/models/Order.ts
CHANGED
|
@@ -24,25 +24,25 @@ export interface Order {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof Order
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
order_index: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof Order
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
client_order_index: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof Order
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
market_index: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
43
|
* @memberof Order
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
owner_account_index: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
@@ -54,25 +54,25 @@ export interface Order {
|
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof Order
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
price: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
|
-
* @type {
|
|
60
|
+
* @type {number}
|
|
61
61
|
* @memberof Order
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
nonce: number;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {string}
|
|
67
67
|
* @memberof Order
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
remaining_base_amount: string;
|
|
70
70
|
/**
|
|
71
71
|
*
|
|
72
|
-
* @type {
|
|
72
|
+
* @type {boolean}
|
|
73
73
|
* @memberof Order
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
is_ask: boolean;
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
78
|
* @type {number}
|
|
@@ -87,16 +87,16 @@ export interface Order {
|
|
|
87
87
|
base_price: number;
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
|
-
* @type {
|
|
90
|
+
* @type {string}
|
|
91
91
|
* @memberof Order
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
filled_base_amount: string;
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
|
-
* @type {
|
|
96
|
+
* @type {string}
|
|
97
97
|
* @memberof Order
|
|
98
98
|
*/
|
|
99
|
-
|
|
99
|
+
filled_quote_amount: string;
|
|
100
100
|
/**
|
|
101
101
|
* TODO: remove this
|
|
102
102
|
* @type {string}
|
|
@@ -115,6 +115,18 @@ export interface Order {
|
|
|
115
115
|
* @memberof Order
|
|
116
116
|
*/
|
|
117
117
|
time_in_force: OrderTimeInForceEnum;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {boolean}
|
|
121
|
+
* @memberof Order
|
|
122
|
+
*/
|
|
123
|
+
reduce_only: boolean;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {string}
|
|
127
|
+
* @memberof Order
|
|
128
|
+
*/
|
|
129
|
+
trigger_price: string;
|
|
118
130
|
/**
|
|
119
131
|
*
|
|
120
132
|
* @type {number}
|
|
@@ -147,7 +159,13 @@ export interface Order {
|
|
|
147
159
|
*/
|
|
148
160
|
export const OrderTypeEnum = {
|
|
149
161
|
Limit: 'limit',
|
|
150
|
-
Market: 'market'
|
|
162
|
+
Market: 'market',
|
|
163
|
+
StopLoss: 'stop-loss',
|
|
164
|
+
StopLossLimit: 'stop-loss-limit',
|
|
165
|
+
TakeProfit: 'take-profit',
|
|
166
|
+
TakeProfitLimit: 'take-profit-limit',
|
|
167
|
+
Twap: 'twap',
|
|
168
|
+
TwapSub: 'twap-sub'
|
|
151
169
|
} as const;
|
|
152
170
|
export type OrderTypeEnum = typeof OrderTypeEnum[keyof typeof OrderTypeEnum];
|
|
153
171
|
|
|
@@ -177,22 +195,24 @@ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnu
|
|
|
177
195
|
* Check if a given object implements the Order interface.
|
|
178
196
|
*/
|
|
179
197
|
export function instanceOfOrder(value: object): value is Order {
|
|
180
|
-
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
181
|
-
if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
|
|
182
198
|
if (!('order_index' in value) || value['order_index'] === undefined) return false;
|
|
183
199
|
if (!('client_order_index' in value) || value['client_order_index'] === undefined) return false;
|
|
200
|
+
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
201
|
+
if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
|
|
184
202
|
if (!('initial_base_amount' in value) || value['initial_base_amount'] === undefined) return false;
|
|
185
|
-
if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
|
|
186
|
-
if (!('filled_base_amount' in value) || value['filled_base_amount'] === undefined) return false;
|
|
187
|
-
if (!('filled_quote_amount' in value) || value['filled_quote_amount'] === undefined) return false;
|
|
188
203
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
189
|
-
if (!('base_size' in value) || value['base_size'] === undefined) return false;
|
|
190
|
-
if (!('base_price' in value) || value['base_price'] === undefined) return false;
|
|
191
204
|
if (!('nonce' in value) || value['nonce'] === undefined) return false;
|
|
205
|
+
if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
|
|
192
206
|
if (!('is_ask' in value) || value['is_ask'] === undefined) return false;
|
|
207
|
+
if (!('base_size' in value) || value['base_size'] === undefined) return false;
|
|
208
|
+
if (!('base_price' in value) || value['base_price'] === undefined) return false;
|
|
209
|
+
if (!('filled_base_amount' in value) || value['filled_base_amount'] === undefined) return false;
|
|
210
|
+
if (!('filled_quote_amount' in value) || value['filled_quote_amount'] === undefined) return false;
|
|
193
211
|
if (!('side' in value) || value['side'] === undefined) return false;
|
|
194
212
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
195
213
|
if (!('time_in_force' in value) || value['time_in_force'] === undefined) return false;
|
|
214
|
+
if (!('reduce_only' in value) || value['reduce_only'] === undefined) return false;
|
|
215
|
+
if (!('trigger_price' in value) || value['trigger_price'] === undefined) return false;
|
|
196
216
|
if (!('order_expiry' in value) || value['order_expiry'] === undefined) return false;
|
|
197
217
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
198
218
|
if (!('block_height' in value) || value['block_height'] === undefined) return false;
|
|
@@ -210,22 +230,24 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
|
|
|
210
230
|
}
|
|
211
231
|
return {
|
|
212
232
|
|
|
213
|
-
'market_index': json['market_index'],
|
|
214
|
-
'owner_account_index': json['owner_account_index'],
|
|
215
233
|
'order_index': json['order_index'],
|
|
216
234
|
'client_order_index': json['client_order_index'],
|
|
235
|
+
'market_index': json['market_index'],
|
|
236
|
+
'owner_account_index': json['owner_account_index'],
|
|
217
237
|
'initial_base_amount': json['initial_base_amount'],
|
|
218
|
-
'remaining_base_amount': json['remaining_base_amount'],
|
|
219
|
-
'filled_base_amount': json['filled_base_amount'],
|
|
220
|
-
'filled_quote_amount': json['filled_quote_amount'],
|
|
221
238
|
'price': json['price'],
|
|
222
|
-
'base_size': json['base_size'],
|
|
223
|
-
'base_price': json['base_price'],
|
|
224
239
|
'nonce': json['nonce'],
|
|
240
|
+
'remaining_base_amount': json['remaining_base_amount'],
|
|
225
241
|
'is_ask': json['is_ask'],
|
|
242
|
+
'base_size': json['base_size'],
|
|
243
|
+
'base_price': json['base_price'],
|
|
244
|
+
'filled_base_amount': json['filled_base_amount'],
|
|
245
|
+
'filled_quote_amount': json['filled_quote_amount'],
|
|
226
246
|
'side': json['side'],
|
|
227
247
|
'type': json['type'],
|
|
228
248
|
'time_in_force': json['time_in_force'],
|
|
249
|
+
'reduce_only': json['reduce_only'],
|
|
250
|
+
'trigger_price': json['trigger_price'],
|
|
229
251
|
'order_expiry': json['order_expiry'],
|
|
230
252
|
'status': json['status'],
|
|
231
253
|
'block_height': json['block_height'],
|
|
@@ -239,22 +261,24 @@ export function OrderToJSON(value?: Order | null): any {
|
|
|
239
261
|
}
|
|
240
262
|
return {
|
|
241
263
|
|
|
242
|
-
'market_index': value['market_index'],
|
|
243
|
-
'owner_account_index': value['owner_account_index'],
|
|
244
264
|
'order_index': value['order_index'],
|
|
245
265
|
'client_order_index': value['client_order_index'],
|
|
266
|
+
'market_index': value['market_index'],
|
|
267
|
+
'owner_account_index': value['owner_account_index'],
|
|
246
268
|
'initial_base_amount': value['initial_base_amount'],
|
|
247
|
-
'remaining_base_amount': value['remaining_base_amount'],
|
|
248
|
-
'filled_base_amount': value['filled_base_amount'],
|
|
249
|
-
'filled_quote_amount': value['filled_quote_amount'],
|
|
250
269
|
'price': value['price'],
|
|
251
|
-
'base_size': value['base_size'],
|
|
252
|
-
'base_price': value['base_price'],
|
|
253
270
|
'nonce': value['nonce'],
|
|
271
|
+
'remaining_base_amount': value['remaining_base_amount'],
|
|
254
272
|
'is_ask': value['is_ask'],
|
|
273
|
+
'base_size': value['base_size'],
|
|
274
|
+
'base_price': value['base_price'],
|
|
275
|
+
'filled_base_amount': value['filled_base_amount'],
|
|
276
|
+
'filled_quote_amount': value['filled_quote_amount'],
|
|
255
277
|
'side': value['side'],
|
|
256
278
|
'type': value['type'],
|
|
257
279
|
'time_in_force': value['time_in_force'],
|
|
280
|
+
'reduce_only': value['reduce_only'],
|
|
281
|
+
'trigger_price': value['trigger_price'],
|
|
258
282
|
'order_expiry': value['order_expiry'],
|
|
259
283
|
'status': value['status'],
|
|
260
284
|
'block_height': value['block_height'],
|
|
@@ -168,13 +168,7 @@ export interface OrderBookDetail {
|
|
|
168
168
|
* @type {number}
|
|
169
169
|
* @memberof OrderBookDetail
|
|
170
170
|
*/
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
174
|
-
* @type {number}
|
|
175
|
-
* @memberof OrderBookDetail
|
|
176
|
-
*/
|
|
177
|
-
open_position_quote: number;
|
|
171
|
+
open_interest: number;
|
|
178
172
|
/**
|
|
179
173
|
*
|
|
180
174
|
* @type {{ [key: string]: number; }}
|
|
@@ -222,8 +216,7 @@ export function instanceOfOrderBookDetail(value: object): value is OrderBookDeta
|
|
|
222
216
|
if (!('daily_price_low' in value) || value['daily_price_low'] === undefined) return false;
|
|
223
217
|
if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
|
|
224
218
|
if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
|
|
225
|
-
if (!('
|
|
226
|
-
if (!('open_position_quote' in value) || value['open_position_quote'] === undefined) return false;
|
|
219
|
+
if (!('open_interest' in value) || value['open_interest'] === undefined) return false;
|
|
227
220
|
if (!('daily_chart' in value) || value['daily_chart'] === undefined) return false;
|
|
228
221
|
return true;
|
|
229
222
|
}
|
|
@@ -262,8 +255,7 @@ export function OrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
262
255
|
'daily_price_low': json['daily_price_low'],
|
|
263
256
|
'daily_price_high': json['daily_price_high'],
|
|
264
257
|
'daily_price_change': json['daily_price_change'],
|
|
265
|
-
'
|
|
266
|
-
'open_position_quote': json['open_position_quote'],
|
|
258
|
+
'open_interest': json['open_interest'],
|
|
267
259
|
'daily_chart': json['daily_chart'],
|
|
268
260
|
};
|
|
269
261
|
}
|
|
@@ -298,8 +290,7 @@ export function OrderBookDetailToJSON(value?: OrderBookDetail | null): any {
|
|
|
298
290
|
'daily_price_low': value['daily_price_low'],
|
|
299
291
|
'daily_price_high': value['daily_price_high'],
|
|
300
292
|
'daily_price_change': value['daily_price_change'],
|
|
301
|
-
'
|
|
302
|
-
'open_position_quote': value['open_position_quote'],
|
|
293
|
+
'open_interest': value['open_interest'],
|
|
303
294
|
'daily_chart': value['daily_chart'],
|
|
304
295
|
};
|
|
305
296
|
}
|
package/models/PublicPool.ts
CHANGED
|
@@ -67,7 +67,13 @@ export interface PublicPool {
|
|
|
67
67
|
* @type {number}
|
|
68
68
|
* @memberof PublicPool
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
total_order_count: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPool
|
|
75
|
+
*/
|
|
76
|
+
pending_order_count: number;
|
|
71
77
|
/**
|
|
72
78
|
*
|
|
73
79
|
* @type {number}
|
|
@@ -115,7 +121,8 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
|
|
|
115
121
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
116
122
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
117
123
|
if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
|
|
118
|
-
if (!('
|
|
124
|
+
if (!('total_order_count' in value) || value['total_order_count'] === undefined) return false;
|
|
125
|
+
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
119
126
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
120
127
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
121
128
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
@@ -141,7 +148,8 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
141
148
|
'index': json['index'],
|
|
142
149
|
'l1_address': json['l1_address'],
|
|
143
150
|
'cancel_all_time': json['cancel_all_time'],
|
|
144
|
-
'
|
|
151
|
+
'total_order_count': json['total_order_count'],
|
|
152
|
+
'pending_order_count': json['pending_order_count'],
|
|
145
153
|
'status': json['status'],
|
|
146
154
|
'collateral': json['collateral'],
|
|
147
155
|
'name': json['name'],
|
|
@@ -163,7 +171,8 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
|
|
|
163
171
|
'index': value['index'],
|
|
164
172
|
'l1_address': value['l1_address'],
|
|
165
173
|
'cancel_all_time': value['cancel_all_time'],
|
|
166
|
-
'
|
|
174
|
+
'total_order_count': value['total_order_count'],
|
|
175
|
+
'pending_order_count': value['pending_order_count'],
|
|
167
176
|
'status': value['status'],
|
|
168
177
|
'collateral': value['collateral'],
|
|
169
178
|
'name': value['name'],
|
package/openapi.json
CHANGED
|
@@ -1777,7 +1777,12 @@
|
|
|
1777
1777
|
"format": "int64",
|
|
1778
1778
|
"example": "1640995200"
|
|
1779
1779
|
},
|
|
1780
|
-
"
|
|
1780
|
+
"total_order_count": {
|
|
1781
|
+
"type": "integer",
|
|
1782
|
+
"format": "int64",
|
|
1783
|
+
"example": "100"
|
|
1784
|
+
},
|
|
1785
|
+
"pending_order_count": {
|
|
1781
1786
|
"type": "integer",
|
|
1782
1787
|
"format": "int64",
|
|
1783
1788
|
"example": "100"
|
|
@@ -1799,7 +1804,8 @@
|
|
|
1799
1804
|
"index",
|
|
1800
1805
|
"l1_address",
|
|
1801
1806
|
"cancel_all_time",
|
|
1802
|
-
"
|
|
1807
|
+
"total_order_count",
|
|
1808
|
+
"pending_order_count",
|
|
1803
1809
|
"status",
|
|
1804
1810
|
"collateral"
|
|
1805
1811
|
]
|
|
@@ -1850,16 +1856,6 @@
|
|
|
1850
1856
|
"type": "number",
|
|
1851
1857
|
"format": "double",
|
|
1852
1858
|
"example": "93566.25"
|
|
1853
|
-
},
|
|
1854
|
-
"open_position_base": {
|
|
1855
|
-
"type": "number",
|
|
1856
|
-
"format": "double",
|
|
1857
|
-
"example": "93.0"
|
|
1858
|
-
},
|
|
1859
|
-
"open_position_quote": {
|
|
1860
|
-
"type": "number",
|
|
1861
|
-
"format": "double",
|
|
1862
|
-
"example": "1276.0"
|
|
1863
1859
|
}
|
|
1864
1860
|
},
|
|
1865
1861
|
"title": "AccountMarketStats",
|
|
@@ -1867,9 +1863,7 @@
|
|
|
1867
1863
|
"market_id",
|
|
1868
1864
|
"daily_trades_count",
|
|
1869
1865
|
"daily_base_token_volume",
|
|
1870
|
-
"daily_quote_token_volume"
|
|
1871
|
-
"open_position_base",
|
|
1872
|
-
"open_position_quote"
|
|
1866
|
+
"daily_quote_token_volume"
|
|
1873
1867
|
]
|
|
1874
1868
|
},
|
|
1875
1869
|
"AccountMetadata": {
|
|
@@ -1930,6 +1924,11 @@
|
|
|
1930
1924
|
"format": "int64",
|
|
1931
1925
|
"example": "3"
|
|
1932
1926
|
},
|
|
1927
|
+
"pending_order_count": {
|
|
1928
|
+
"type": "integer",
|
|
1929
|
+
"format": "int64",
|
|
1930
|
+
"example": "3"
|
|
1931
|
+
},
|
|
1933
1932
|
"symbol": {
|
|
1934
1933
|
"type": "string",
|
|
1935
1934
|
"example": "ETH"
|
|
@@ -1964,6 +1963,7 @@
|
|
|
1964
1963
|
"required": [
|
|
1965
1964
|
"market_id",
|
|
1966
1965
|
"open_order_count",
|
|
1966
|
+
"pending_order_count",
|
|
1967
1967
|
"symbol",
|
|
1968
1968
|
"sign",
|
|
1969
1969
|
"position",
|
|
@@ -2326,7 +2326,12 @@
|
|
|
2326
2326
|
"format": "int64",
|
|
2327
2327
|
"example": "1640995200"
|
|
2328
2328
|
},
|
|
2329
|
-
"
|
|
2329
|
+
"total_order_count": {
|
|
2330
|
+
"type": "integer",
|
|
2331
|
+
"format": "int64",
|
|
2332
|
+
"example": "100"
|
|
2333
|
+
},
|
|
2334
|
+
"pending_order_count": {
|
|
2330
2335
|
"type": "integer",
|
|
2331
2336
|
"format": "int64",
|
|
2332
2337
|
"example": "100"
|
|
@@ -2379,7 +2384,8 @@
|
|
|
2379
2384
|
"index",
|
|
2380
2385
|
"l1_address",
|
|
2381
2386
|
"cancel_all_time",
|
|
2382
|
-
"
|
|
2387
|
+
"total_order_count",
|
|
2388
|
+
"pending_order_count",
|
|
2383
2389
|
"status",
|
|
2384
2390
|
"collateral",
|
|
2385
2391
|
"name",
|
|
@@ -2942,45 +2948,47 @@
|
|
|
2942
2948
|
"Order": {
|
|
2943
2949
|
"type": "object",
|
|
2944
2950
|
"properties": {
|
|
2945
|
-
"
|
|
2951
|
+
"order_index": {
|
|
2946
2952
|
"type": "integer",
|
|
2947
|
-
"format": "
|
|
2953
|
+
"format": "int64",
|
|
2948
2954
|
"example": "1"
|
|
2949
2955
|
},
|
|
2950
|
-
"
|
|
2956
|
+
"client_order_index": {
|
|
2951
2957
|
"type": "integer",
|
|
2952
2958
|
"format": "int64",
|
|
2953
|
-
"example": "
|
|
2959
|
+
"example": "234"
|
|
2954
2960
|
},
|
|
2955
|
-
"
|
|
2961
|
+
"market_index": {
|
|
2956
2962
|
"type": "integer",
|
|
2957
|
-
"format": "
|
|
2963
|
+
"format": "uint8",
|
|
2958
2964
|
"example": "1"
|
|
2959
2965
|
},
|
|
2960
|
-
"
|
|
2966
|
+
"owner_account_index": {
|
|
2961
2967
|
"type": "integer",
|
|
2962
2968
|
"format": "int64",
|
|
2963
|
-
"example": "
|
|
2969
|
+
"example": "1"
|
|
2964
2970
|
},
|
|
2965
2971
|
"initial_base_amount": {
|
|
2966
2972
|
"type": "string",
|
|
2967
2973
|
"example": "0.1"
|
|
2968
2974
|
},
|
|
2969
|
-
"
|
|
2975
|
+
"price": {
|
|
2970
2976
|
"type": "string",
|
|
2971
|
-
"example": "
|
|
2977
|
+
"example": "3024.66"
|
|
2972
2978
|
},
|
|
2973
|
-
"
|
|
2974
|
-
"type": "
|
|
2975
|
-
"
|
|
2979
|
+
"nonce": {
|
|
2980
|
+
"type": "integer",
|
|
2981
|
+
"format": "int64",
|
|
2982
|
+
"example": "722"
|
|
2976
2983
|
},
|
|
2977
|
-
"
|
|
2984
|
+
"remaining_base_amount": {
|
|
2978
2985
|
"type": "string",
|
|
2979
2986
|
"example": "0.1"
|
|
2980
2987
|
},
|
|
2981
|
-
"
|
|
2982
|
-
"type": "
|
|
2983
|
-
"
|
|
2988
|
+
"is_ask": {
|
|
2989
|
+
"type": "boolean",
|
|
2990
|
+
"format": "boolean",
|
|
2991
|
+
"example": "true"
|
|
2984
2992
|
},
|
|
2985
2993
|
"base_size": {
|
|
2986
2994
|
"type": "integer",
|
|
@@ -2992,15 +3000,13 @@
|
|
|
2992
3000
|
"format": "int32",
|
|
2993
3001
|
"example": "3024"
|
|
2994
3002
|
},
|
|
2995
|
-
"
|
|
2996
|
-
"type": "
|
|
2997
|
-
"
|
|
2998
|
-
"example": "722"
|
|
3003
|
+
"filled_base_amount": {
|
|
3004
|
+
"type": "string",
|
|
3005
|
+
"example": "0.1"
|
|
2999
3006
|
},
|
|
3000
|
-
"
|
|
3001
|
-
"type": "
|
|
3002
|
-
"
|
|
3003
|
-
"example": "true"
|
|
3007
|
+
"filled_quote_amount": {
|
|
3008
|
+
"type": "string",
|
|
3009
|
+
"example": "0.1"
|
|
3004
3010
|
},
|
|
3005
3011
|
"side": {
|
|
3006
3012
|
"type": "string",
|
|
@@ -3013,7 +3019,13 @@
|
|
|
3013
3019
|
"example": "limit",
|
|
3014
3020
|
"enum": [
|
|
3015
3021
|
"limit",
|
|
3016
|
-
"market"
|
|
3022
|
+
"market",
|
|
3023
|
+
"stop-loss",
|
|
3024
|
+
"stop-loss-limit",
|
|
3025
|
+
"take-profit",
|
|
3026
|
+
"take-profit-limit",
|
|
3027
|
+
"twap",
|
|
3028
|
+
"twap-sub"
|
|
3017
3029
|
]
|
|
3018
3030
|
},
|
|
3019
3031
|
"time_in_force": {
|
|
@@ -3026,6 +3038,15 @@
|
|
|
3026
3038
|
],
|
|
3027
3039
|
"default": "good-till-time"
|
|
3028
3040
|
},
|
|
3041
|
+
"reduce_only": {
|
|
3042
|
+
"type": "boolean",
|
|
3043
|
+
"format": "boolean",
|
|
3044
|
+
"example": "true"
|
|
3045
|
+
},
|
|
3046
|
+
"trigger_price": {
|
|
3047
|
+
"type": "string",
|
|
3048
|
+
"example": "3024.66"
|
|
3049
|
+
},
|
|
3029
3050
|
"order_expiry": {
|
|
3030
3051
|
"type": "integer",
|
|
3031
3052
|
"format": "int64",
|
|
@@ -3053,22 +3074,24 @@
|
|
|
3053
3074
|
},
|
|
3054
3075
|
"title": "Order",
|
|
3055
3076
|
"required": [
|
|
3056
|
-
"market_index",
|
|
3057
|
-
"owner_account_index",
|
|
3058
3077
|
"order_index",
|
|
3059
3078
|
"client_order_index",
|
|
3079
|
+
"market_index",
|
|
3080
|
+
"owner_account_index",
|
|
3060
3081
|
"initial_base_amount",
|
|
3061
|
-
"remaining_base_amount",
|
|
3062
|
-
"filled_base_amount",
|
|
3063
|
-
"filled_quote_amount",
|
|
3064
3082
|
"price",
|
|
3065
|
-
"base_size",
|
|
3066
|
-
"base_price",
|
|
3067
3083
|
"nonce",
|
|
3084
|
+
"remaining_base_amount",
|
|
3068
3085
|
"is_ask",
|
|
3086
|
+
"base_size",
|
|
3087
|
+
"base_price",
|
|
3088
|
+
"filled_base_amount",
|
|
3089
|
+
"filled_quote_amount",
|
|
3069
3090
|
"side",
|
|
3070
3091
|
"type",
|
|
3071
3092
|
"time_in_force",
|
|
3093
|
+
"reduce_only",
|
|
3094
|
+
"trigger_price",
|
|
3072
3095
|
"order_expiry",
|
|
3073
3096
|
"status",
|
|
3074
3097
|
"block_height",
|
|
@@ -3303,16 +3326,11 @@
|
|
|
3303
3326
|
"format": "double",
|
|
3304
3327
|
"example": "3.66"
|
|
3305
3328
|
},
|
|
3306
|
-
"
|
|
3329
|
+
"open_interest": {
|
|
3307
3330
|
"type": "number",
|
|
3308
3331
|
"format": "double",
|
|
3309
3332
|
"example": "93.0"
|
|
3310
3333
|
},
|
|
3311
|
-
"open_position_quote": {
|
|
3312
|
-
"type": "number",
|
|
3313
|
-
"format": "double",
|
|
3314
|
-
"example": "1276.0"
|
|
3315
|
-
},
|
|
3316
3334
|
"daily_chart": {
|
|
3317
3335
|
"type": "object",
|
|
3318
3336
|
"example": "{1640995200:3024.66}",
|
|
@@ -3348,8 +3366,7 @@
|
|
|
3348
3366
|
"daily_price_low",
|
|
3349
3367
|
"daily_price_high",
|
|
3350
3368
|
"daily_price_change",
|
|
3351
|
-
"
|
|
3352
|
-
"open_position_quote",
|
|
3369
|
+
"open_interest",
|
|
3353
3370
|
"daily_chart"
|
|
3354
3371
|
]
|
|
3355
3372
|
},
|
|
@@ -3652,7 +3669,12 @@
|
|
|
3652
3669
|
"format": "int64",
|
|
3653
3670
|
"example": "1640995200"
|
|
3654
3671
|
},
|
|
3655
|
-
"
|
|
3672
|
+
"total_order_count": {
|
|
3673
|
+
"type": "integer",
|
|
3674
|
+
"format": "int64",
|
|
3675
|
+
"example": "100"
|
|
3676
|
+
},
|
|
3677
|
+
"pending_order_count": {
|
|
3656
3678
|
"type": "integer",
|
|
3657
3679
|
"format": "int64",
|
|
3658
3680
|
"example": "100"
|
|
@@ -3687,7 +3709,8 @@
|
|
|
3687
3709
|
"index",
|
|
3688
3710
|
"l1_address",
|
|
3689
3711
|
"cancel_all_time",
|
|
3690
|
-
"
|
|
3712
|
+
"total_order_count",
|
|
3713
|
+
"pending_order_count",
|
|
3691
3714
|
"status",
|
|
3692
3715
|
"collateral",
|
|
3693
3716
|
"name",
|