zklighter-perps 1.0.4 → 1.0.6
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/apis/AccountApi.ts +12 -0
- package/apis/BlockApi.ts +6 -0
- package/apis/CandlestickApi.ts +4 -0
- package/apis/InfoApi.ts +8 -0
- package/apis/OrderApi.ts +18 -0
- package/apis/RelayerApi.ts +2 -0
- package/apis/RootApi.ts +2 -0
- package/apis/TransactionApi.ts +26 -34
- package/apis/WsApi.ts +4 -0
- package/models/AccountMarketStats.ts +12 -18
- package/models/AccountPnL.ts +5 -7
- package/models/AccountPosition.ts +22 -33
- package/models/AccountStats.ts +10 -15
- package/models/Block.ts +27 -40
- package/models/Blocks.ts +5 -7
- package/models/Candlestick.ts +14 -21
- package/models/Candlesticks.ts +5 -7
- package/models/ContractAddress.ts +4 -6
- package/models/CurrentHeight.ts +2 -3
- package/models/DetailedAccount.ts +8 -11
- package/models/DetailedAccounts.ts +5 -7
- package/models/EnrichedTx.ts +6 -9
- package/models/ExchangeStats.ts +9 -13
- package/models/Funding.ts +8 -12
- package/models/Fundings.ts +5 -7
- package/models/L1ProviderInfo.ts +8 -12
- package/models/Layer1BasicInfo.ts +17 -24
- package/models/Layer2BasicInfo.ts +6 -9
- package/models/MainAccount.ts +6 -9
- package/models/MainAccounts.ts +5 -7
- package/models/MarketInfo.ts +22 -33
- package/models/MarketSig.ts +8 -12
- package/models/NextNonce.ts +2 -3
- package/models/Order.ts +32 -48
- package/models/OrderBook.ts +20 -30
- package/models/OrderBookDepth.ts +8 -11
- package/models/OrderBookDetail.ts +36 -54
- package/models/OrderBookDetails.ts +3 -4
- package/models/OrderBookOrders.ts +10 -14
- package/models/OrderBookStats.ts +12 -18
- package/models/OrderBooks.ts +3 -4
- package/models/Orders.ts +3 -4
- package/models/Permission.ts +2 -3
- package/models/PnLEntry.ts +4 -6
- package/models/PriceLevel.ts +4 -6
- package/models/ReqDoFaucet.ts +2 -3
- package/models/ReqGetAccount.ts +4 -6
- package/models/ReqGetAccountActiveOrders.ts +6 -9
- package/models/ReqGetAccountByL1Address.ts +2 -3
- package/models/ReqGetAccountInactiveOrders.ts +8 -12
- package/models/ReqGetAccountOrders.ts +6 -9
- package/models/ReqGetAccountPnL.ts +12 -18
- package/models/ReqGetBlock.ts +4 -6
- package/models/ReqGetBlockTxs.ts +4 -6
- package/models/ReqGetByAccount.ts +4 -6
- package/models/ReqGetCandlesticks.ts +10 -15
- package/models/ReqGetFundings.ts +10 -15
- package/models/ReqGetL1Tx.ts +2 -3
- package/models/ReqGetMarketSig.ts +6 -9
- package/models/ReqGetNextNonce.ts +4 -6
- package/models/ReqGetOrderBookDetails.ts +2 -3
- package/models/ReqGetOrderBookOrders.ts +4 -6
- package/models/ReqGetOrderBooks.ts +2 -3
- package/models/ReqGetPermission.ts +6 -9
- package/models/ReqGetRangeWithCursor.ts +2 -3
- package/models/ReqGetRangeWithIndex.ts +2 -3
- package/models/ReqGetRecentTrades.ts +4 -6
- package/models/ReqGetRollbacks.ts +6 -9
- package/models/ReqGetSubAccount.ts +6 -9
- package/models/ReqGetTrades.ts +8 -12
- package/models/ReqGetTx.ts +4 -6
- package/models/ReqSearch.ts +2 -3
- package/models/ResultCode.ts +2 -3
- package/models/Rollback.ts +8 -12
- package/models/Rollbacks.ts +5 -7
- package/models/Search.ts +2 -3
- package/models/SignBody.ts +2 -3
- package/models/SimpleOrder.ts +12 -18
- package/models/Status.ts +4 -6
- package/models/SubAccount.ts +16 -24
- package/models/SubAccounts.ts +9 -13
- package/models/Trade.ts +24 -36
- package/models/Trades.ts +3 -4
- package/models/Tx.ts +28 -42
- package/models/TxHash.ts +2 -3
- package/models/Txs.ts +3 -4
- package/models/ValidatorInfo.ts +4 -6
- package/openapi.json +192 -610
- package/package.json +1 -1
|
@@ -84,109 +84,109 @@ export interface OrderBookDetail {
|
|
|
84
84
|
* @type {number}
|
|
85
85
|
* @memberof OrderBookDetail
|
|
86
86
|
*/
|
|
87
|
-
decimal
|
|
87
|
+
decimal?: number;
|
|
88
88
|
/**
|
|
89
89
|
*
|
|
90
90
|
* @type {number}
|
|
91
91
|
* @memberof OrderBookDetail
|
|
92
92
|
*/
|
|
93
|
-
priceTick
|
|
93
|
+
priceTick?: number;
|
|
94
94
|
/**
|
|
95
95
|
*
|
|
96
96
|
* @type {number}
|
|
97
97
|
* @memberof OrderBookDetail
|
|
98
98
|
*/
|
|
99
|
-
quoteMultiplier
|
|
99
|
+
quoteMultiplier?: number;
|
|
100
100
|
/**
|
|
101
101
|
*
|
|
102
102
|
* @type {number}
|
|
103
103
|
* @memberof OrderBookDetail
|
|
104
104
|
*/
|
|
105
|
-
initialMargin
|
|
105
|
+
initialMargin?: number;
|
|
106
106
|
/**
|
|
107
107
|
*
|
|
108
108
|
* @type {number}
|
|
109
109
|
* @memberof OrderBookDetail
|
|
110
110
|
*/
|
|
111
|
-
maintenanceMargin
|
|
111
|
+
maintenanceMargin?: number;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @type {number}
|
|
115
115
|
* @memberof OrderBookDetail
|
|
116
116
|
*/
|
|
117
|
-
closeouteMargin
|
|
117
|
+
closeouteMargin?: number;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
120
|
* @type {number}
|
|
121
121
|
* @memberof OrderBookDetail
|
|
122
122
|
*/
|
|
123
|
-
askNonce
|
|
123
|
+
askNonce?: number;
|
|
124
124
|
/**
|
|
125
125
|
*
|
|
126
126
|
* @type {number}
|
|
127
127
|
* @memberof OrderBookDetail
|
|
128
128
|
*/
|
|
129
|
-
bidNonce
|
|
129
|
+
bidNonce?: number;
|
|
130
130
|
/**
|
|
131
131
|
*
|
|
132
132
|
* @type {number}
|
|
133
133
|
* @memberof OrderBookDetail
|
|
134
134
|
*/
|
|
135
|
-
lastTradePrice
|
|
135
|
+
lastTradePrice?: number;
|
|
136
136
|
/**
|
|
137
137
|
*
|
|
138
138
|
* @type {number}
|
|
139
139
|
* @memberof OrderBookDetail
|
|
140
140
|
*/
|
|
141
|
-
dailyTradesCount
|
|
141
|
+
dailyTradesCount?: number;
|
|
142
142
|
/**
|
|
143
143
|
*
|
|
144
144
|
* @type {number}
|
|
145
145
|
* @memberof OrderBookDetail
|
|
146
146
|
*/
|
|
147
|
-
dailyBaseTokenVolume
|
|
147
|
+
dailyBaseTokenVolume?: number;
|
|
148
148
|
/**
|
|
149
149
|
*
|
|
150
150
|
* @type {number}
|
|
151
151
|
* @memberof OrderBookDetail
|
|
152
152
|
*/
|
|
153
|
-
dailyQuoteTokenVolume
|
|
153
|
+
dailyQuoteTokenVolume?: number;
|
|
154
154
|
/**
|
|
155
155
|
*
|
|
156
156
|
* @type {number}
|
|
157
157
|
* @memberof OrderBookDetail
|
|
158
158
|
*/
|
|
159
|
-
dailyPriceLow
|
|
159
|
+
dailyPriceLow?: number;
|
|
160
160
|
/**
|
|
161
161
|
*
|
|
162
162
|
* @type {number}
|
|
163
163
|
* @memberof OrderBookDetail
|
|
164
164
|
*/
|
|
165
|
-
dailyPriceHigh
|
|
165
|
+
dailyPriceHigh?: number;
|
|
166
166
|
/**
|
|
167
167
|
*
|
|
168
168
|
* @type {number}
|
|
169
169
|
* @memberof OrderBookDetail
|
|
170
170
|
*/
|
|
171
|
-
dailyPriceChange
|
|
171
|
+
dailyPriceChange?: number;
|
|
172
172
|
/**
|
|
173
173
|
*
|
|
174
174
|
* @type {number}
|
|
175
175
|
* @memberof OrderBookDetail
|
|
176
176
|
*/
|
|
177
|
-
openPositionBase
|
|
177
|
+
openPositionBase?: number;
|
|
178
178
|
/**
|
|
179
179
|
*
|
|
180
180
|
* @type {number}
|
|
181
181
|
* @memberof OrderBookDetail
|
|
182
182
|
*/
|
|
183
|
-
openPositionQuote
|
|
183
|
+
openPositionQuote?: number;
|
|
184
184
|
/**
|
|
185
185
|
*
|
|
186
186
|
* @type {{ [key: string]: number; }}
|
|
187
187
|
* @memberof OrderBookDetail
|
|
188
188
|
*/
|
|
189
|
-
dailyChart
|
|
189
|
+
dailyChart?: { [key: string]: number; };
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
|
|
@@ -204,24 +204,6 @@ export type OrderBookDetailStatusEnum = typeof OrderBookDetailStatusEnum[keyof t
|
|
|
204
204
|
* Check if a given object implements the OrderBookDetail interface.
|
|
205
205
|
*/
|
|
206
206
|
export function instanceOfOrderBookDetail(value: object): value is OrderBookDetail {
|
|
207
|
-
if (!('decimal' in value) || value['decimal'] === undefined) return false;
|
|
208
|
-
if (!('priceTick' in value) || value['priceTick'] === undefined) return false;
|
|
209
|
-
if (!('quoteMultiplier' in value) || value['quoteMultiplier'] === undefined) return false;
|
|
210
|
-
if (!('initialMargin' in value) || value['initialMargin'] === undefined) return false;
|
|
211
|
-
if (!('maintenanceMargin' in value) || value['maintenanceMargin'] === undefined) return false;
|
|
212
|
-
if (!('closeouteMargin' in value) || value['closeouteMargin'] === undefined) return false;
|
|
213
|
-
if (!('askNonce' in value) || value['askNonce'] === undefined) return false;
|
|
214
|
-
if (!('bidNonce' in value) || value['bidNonce'] === undefined) return false;
|
|
215
|
-
if (!('lastTradePrice' in value) || value['lastTradePrice'] === undefined) return false;
|
|
216
|
-
if (!('dailyTradesCount' in value) || value['dailyTradesCount'] === undefined) return false;
|
|
217
|
-
if (!('dailyBaseTokenVolume' in value) || value['dailyBaseTokenVolume'] === undefined) return false;
|
|
218
|
-
if (!('dailyQuoteTokenVolume' in value) || value['dailyQuoteTokenVolume'] === undefined) return false;
|
|
219
|
-
if (!('dailyPriceLow' in value) || value['dailyPriceLow'] === undefined) return false;
|
|
220
|
-
if (!('dailyPriceHigh' in value) || value['dailyPriceHigh'] === undefined) return false;
|
|
221
|
-
if (!('dailyPriceChange' in value) || value['dailyPriceChange'] === undefined) return false;
|
|
222
|
-
if (!('openPositionBase' in value) || value['openPositionBase'] === undefined) return false;
|
|
223
|
-
if (!('openPositionQuote' in value) || value['openPositionQuote'] === undefined) return false;
|
|
224
|
-
if (!('dailyChart' in value) || value['dailyChart'] === undefined) return false;
|
|
225
207
|
return true;
|
|
226
208
|
}
|
|
227
209
|
|
|
@@ -245,24 +227,24 @@ export function OrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
245
227
|
'supportedSizeDecimals': json['supported_size_decimals'] == null ? undefined : json['supported_size_decimals'],
|
|
246
228
|
'supportedPriceDecimals': json['supported_price_decimals'] == null ? undefined : json['supported_price_decimals'],
|
|
247
229
|
'supportedQuoteDecimals': json['supported_quote_decimals'] == null ? undefined : json['supported_quote_decimals'],
|
|
248
|
-
'decimal': json['decimal'],
|
|
249
|
-
'priceTick': json['price_tick'],
|
|
250
|
-
'quoteMultiplier': json['quote_multiplier'],
|
|
251
|
-
'initialMargin': json['initial_margin'],
|
|
252
|
-
'maintenanceMargin': json['maintenance_margin'],
|
|
253
|
-
'closeouteMargin': json['closeoute_margin'],
|
|
254
|
-
'askNonce': json['ask_nonce'],
|
|
255
|
-
'bidNonce': json['bid_nonce'],
|
|
256
|
-
'lastTradePrice': json['last_trade_price'],
|
|
257
|
-
'dailyTradesCount': json['daily_trades_count'],
|
|
258
|
-
'dailyBaseTokenVolume': json['daily_base_token_volume'],
|
|
259
|
-
'dailyQuoteTokenVolume': json['daily_quote_token_volume'],
|
|
260
|
-
'dailyPriceLow': json['daily_price_low'],
|
|
261
|
-
'dailyPriceHigh': json['daily_price_high'],
|
|
262
|
-
'dailyPriceChange': json['daily_price_change'],
|
|
263
|
-
'openPositionBase': json['open_position_base'],
|
|
264
|
-
'openPositionQuote': json['open_position_quote'],
|
|
265
|
-
'dailyChart': json['daily_chart'],
|
|
230
|
+
'decimal': json['decimal'] == null ? undefined : json['decimal'],
|
|
231
|
+
'priceTick': json['price_tick'] == null ? undefined : json['price_tick'],
|
|
232
|
+
'quoteMultiplier': json['quote_multiplier'] == null ? undefined : json['quote_multiplier'],
|
|
233
|
+
'initialMargin': json['initial_margin'] == null ? undefined : json['initial_margin'],
|
|
234
|
+
'maintenanceMargin': json['maintenance_margin'] == null ? undefined : json['maintenance_margin'],
|
|
235
|
+
'closeouteMargin': json['closeoute_margin'] == null ? undefined : json['closeoute_margin'],
|
|
236
|
+
'askNonce': json['ask_nonce'] == null ? undefined : json['ask_nonce'],
|
|
237
|
+
'bidNonce': json['bid_nonce'] == null ? undefined : json['bid_nonce'],
|
|
238
|
+
'lastTradePrice': json['last_trade_price'] == null ? undefined : json['last_trade_price'],
|
|
239
|
+
'dailyTradesCount': json['daily_trades_count'] == null ? undefined : json['daily_trades_count'],
|
|
240
|
+
'dailyBaseTokenVolume': json['daily_base_token_volume'] == null ? undefined : json['daily_base_token_volume'],
|
|
241
|
+
'dailyQuoteTokenVolume': json['daily_quote_token_volume'] == null ? undefined : json['daily_quote_token_volume'],
|
|
242
|
+
'dailyPriceLow': json['daily_price_low'] == null ? undefined : json['daily_price_low'],
|
|
243
|
+
'dailyPriceHigh': json['daily_price_high'] == null ? undefined : json['daily_price_high'],
|
|
244
|
+
'dailyPriceChange': json['daily_price_change'] == null ? undefined : json['daily_price_change'],
|
|
245
|
+
'openPositionBase': json['open_position_base'] == null ? undefined : json['open_position_base'],
|
|
246
|
+
'openPositionQuote': json['open_position_quote'] == null ? undefined : json['open_position_quote'],
|
|
247
|
+
'dailyChart': json['daily_chart'] == null ? undefined : json['daily_chart'],
|
|
266
248
|
};
|
|
267
249
|
}
|
|
268
250
|
|
|
@@ -43,14 +43,13 @@ export interface OrderBookDetails {
|
|
|
43
43
|
* @type {Array<OrderBookDetail>}
|
|
44
44
|
* @memberof OrderBookDetails
|
|
45
45
|
*/
|
|
46
|
-
orderBookDetails
|
|
46
|
+
orderBookDetails?: Array<OrderBookDetail>;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Check if a given object implements the OrderBookDetails interface.
|
|
51
51
|
*/
|
|
52
52
|
export function instanceOfOrderBookDetails(value: object): value is OrderBookDetails {
|
|
53
|
-
if (!('orderBookDetails' in value) || value['orderBookDetails'] === undefined) return false;
|
|
54
53
|
return true;
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -66,7 +65,7 @@ export function OrderBookDetailsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
66
65
|
|
|
67
66
|
'code': json['code'] == null ? undefined : json['code'],
|
|
68
67
|
'message': json['message'] == null ? undefined : json['message'],
|
|
69
|
-
'orderBookDetails': ((json['order_book_details'] as Array<any>).map(OrderBookDetailFromJSON)),
|
|
68
|
+
'orderBookDetails': json['order_book_details'] == null ? undefined : ((json['order_book_details'] as Array<any>).map(OrderBookDetailFromJSON)),
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
|
|
@@ -78,7 +77,7 @@ export function OrderBookDetailsToJSON(value?: OrderBookDetails | null): any {
|
|
|
78
77
|
|
|
79
78
|
'code': value['code'],
|
|
80
79
|
'message': value['message'],
|
|
81
|
-
'order_book_details': ((value['orderBookDetails'] as Array<any>).map(OrderBookDetailToJSON)),
|
|
80
|
+
'order_book_details': value['orderBookDetails'] == null ? undefined : ((value['orderBookDetails'] as Array<any>).map(OrderBookDetailToJSON)),
|
|
82
81
|
};
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -43,35 +43,31 @@ export interface OrderBookOrders {
|
|
|
43
43
|
* @type {number}
|
|
44
44
|
* @memberof OrderBookOrders
|
|
45
45
|
*/
|
|
46
|
-
totalAsks
|
|
46
|
+
totalAsks?: number;
|
|
47
47
|
/**
|
|
48
48
|
*
|
|
49
49
|
* @type {Array<SimpleOrder>}
|
|
50
50
|
* @memberof OrderBookOrders
|
|
51
51
|
*/
|
|
52
|
-
asks
|
|
52
|
+
asks?: Array<SimpleOrder>;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
55
|
* @type {number}
|
|
56
56
|
* @memberof OrderBookOrders
|
|
57
57
|
*/
|
|
58
|
-
totalBids
|
|
58
|
+
totalBids?: number;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {Array<SimpleOrder>}
|
|
62
62
|
* @memberof OrderBookOrders
|
|
63
63
|
*/
|
|
64
|
-
bids
|
|
64
|
+
bids?: Array<SimpleOrder>;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Check if a given object implements the OrderBookOrders interface.
|
|
69
69
|
*/
|
|
70
70
|
export function instanceOfOrderBookOrders(value: object): value is OrderBookOrders {
|
|
71
|
-
if (!('totalAsks' in value) || value['totalAsks'] === undefined) return false;
|
|
72
|
-
if (!('asks' in value) || value['asks'] === undefined) return false;
|
|
73
|
-
if (!('totalBids' in value) || value['totalBids'] === undefined) return false;
|
|
74
|
-
if (!('bids' in value) || value['bids'] === undefined) return false;
|
|
75
71
|
return true;
|
|
76
72
|
}
|
|
77
73
|
|
|
@@ -87,10 +83,10 @@ export function OrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
87
83
|
|
|
88
84
|
'code': json['code'] == null ? undefined : json['code'],
|
|
89
85
|
'message': json['message'] == null ? undefined : json['message'],
|
|
90
|
-
'totalAsks': json['total_asks'],
|
|
91
|
-
'asks': ((json['asks'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
92
|
-
'totalBids': json['total_bids'],
|
|
93
|
-
'bids': ((json['bids'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
86
|
+
'totalAsks': json['total_asks'] == null ? undefined : json['total_asks'],
|
|
87
|
+
'asks': json['asks'] == null ? undefined : ((json['asks'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
88
|
+
'totalBids': json['total_bids'] == null ? undefined : json['total_bids'],
|
|
89
|
+
'bids': json['bids'] == null ? undefined : ((json['bids'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
94
90
|
};
|
|
95
91
|
}
|
|
96
92
|
|
|
@@ -103,9 +99,9 @@ export function OrderBookOrdersToJSON(value?: OrderBookOrders | null): any {
|
|
|
103
99
|
'code': value['code'],
|
|
104
100
|
'message': value['message'],
|
|
105
101
|
'total_asks': value['totalAsks'],
|
|
106
|
-
'asks': ((value['asks'] as Array<any>).map(SimpleOrderToJSON)),
|
|
102
|
+
'asks': value['asks'] == null ? undefined : ((value['asks'] as Array<any>).map(SimpleOrderToJSON)),
|
|
107
103
|
'total_bids': value['totalBids'],
|
|
108
|
-
'bids': ((value['bids'] as Array<any>).map(SimpleOrderToJSON)),
|
|
104
|
+
'bids': value['bids'] == null ? undefined : ((value['bids'] as Array<any>).map(SimpleOrderToJSON)),
|
|
109
105
|
};
|
|
110
106
|
}
|
|
111
107
|
|
package/models/OrderBookStats.ts
CHANGED
|
@@ -24,49 +24,43 @@ export interface OrderBookStats {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof OrderBookStats
|
|
26
26
|
*/
|
|
27
|
-
symbol
|
|
27
|
+
symbol?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof OrderBookStats
|
|
32
32
|
*/
|
|
33
|
-
lastTradePrice
|
|
33
|
+
lastTradePrice?: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof OrderBookStats
|
|
38
38
|
*/
|
|
39
|
-
dailyTradesCount
|
|
39
|
+
dailyTradesCount?: number;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
43
43
|
* @memberof OrderBookStats
|
|
44
44
|
*/
|
|
45
|
-
dailyBaseTokenVolume
|
|
45
|
+
dailyBaseTokenVolume?: number;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {number}
|
|
49
49
|
* @memberof OrderBookStats
|
|
50
50
|
*/
|
|
51
|
-
dailyQuoteTokenVolume
|
|
51
|
+
dailyQuoteTokenVolume?: number;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
55
55
|
* @memberof OrderBookStats
|
|
56
56
|
*/
|
|
57
|
-
dailyPriceChange
|
|
57
|
+
dailyPriceChange?: number;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Check if a given object implements the OrderBookStats interface.
|
|
62
62
|
*/
|
|
63
63
|
export function instanceOfOrderBookStats(value: object): value is OrderBookStats {
|
|
64
|
-
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
65
|
-
if (!('lastTradePrice' in value) || value['lastTradePrice'] === undefined) return false;
|
|
66
|
-
if (!('dailyTradesCount' in value) || value['dailyTradesCount'] === undefined) return false;
|
|
67
|
-
if (!('dailyBaseTokenVolume' in value) || value['dailyBaseTokenVolume'] === undefined) return false;
|
|
68
|
-
if (!('dailyQuoteTokenVolume' in value) || value['dailyQuoteTokenVolume'] === undefined) return false;
|
|
69
|
-
if (!('dailyPriceChange' in value) || value['dailyPriceChange'] === undefined) return false;
|
|
70
64
|
return true;
|
|
71
65
|
}
|
|
72
66
|
|
|
@@ -80,12 +74,12 @@ export function OrderBookStatsFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
80
74
|
}
|
|
81
75
|
return {
|
|
82
76
|
|
|
83
|
-
'symbol': json['symbol'],
|
|
84
|
-
'lastTradePrice': json['last_trade_price'],
|
|
85
|
-
'dailyTradesCount': json['daily_trades_count'],
|
|
86
|
-
'dailyBaseTokenVolume': json['daily_base_token_volume'],
|
|
87
|
-
'dailyQuoteTokenVolume': json['daily_quote_token_volume'],
|
|
88
|
-
'dailyPriceChange': json['daily_price_change'],
|
|
77
|
+
'symbol': json['symbol'] == null ? undefined : json['symbol'],
|
|
78
|
+
'lastTradePrice': json['last_trade_price'] == null ? undefined : json['last_trade_price'],
|
|
79
|
+
'dailyTradesCount': json['daily_trades_count'] == null ? undefined : json['daily_trades_count'],
|
|
80
|
+
'dailyBaseTokenVolume': json['daily_base_token_volume'] == null ? undefined : json['daily_base_token_volume'],
|
|
81
|
+
'dailyQuoteTokenVolume': json['daily_quote_token_volume'] == null ? undefined : json['daily_quote_token_volume'],
|
|
82
|
+
'dailyPriceChange': json['daily_price_change'] == null ? undefined : json['daily_price_change'],
|
|
89
83
|
};
|
|
90
84
|
}
|
|
91
85
|
|
package/models/OrderBooks.ts
CHANGED
|
@@ -43,14 +43,13 @@ export interface OrderBooks {
|
|
|
43
43
|
* @type {Array<OrderBook>}
|
|
44
44
|
* @memberof OrderBooks
|
|
45
45
|
*/
|
|
46
|
-
orderBooks
|
|
46
|
+
orderBooks?: Array<OrderBook>;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Check if a given object implements the OrderBooks interface.
|
|
51
51
|
*/
|
|
52
52
|
export function instanceOfOrderBooks(value: object): value is OrderBooks {
|
|
53
|
-
if (!('orderBooks' in value) || value['orderBooks'] === undefined) return false;
|
|
54
53
|
return true;
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -66,7 +65,7 @@ export function OrderBooksFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
66
65
|
|
|
67
66
|
'code': json['code'] == null ? undefined : json['code'],
|
|
68
67
|
'message': json['message'] == null ? undefined : json['message'],
|
|
69
|
-
'orderBooks': ((json['order_books'] as Array<any>).map(OrderBookFromJSON)),
|
|
68
|
+
'orderBooks': json['order_books'] == null ? undefined : ((json['order_books'] as Array<any>).map(OrderBookFromJSON)),
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
|
|
@@ -78,7 +77,7 @@ export function OrderBooksToJSON(value?: OrderBooks | null): any {
|
|
|
78
77
|
|
|
79
78
|
'code': value['code'],
|
|
80
79
|
'message': value['message'],
|
|
81
|
-
'order_books': ((value['orderBooks'] as Array<any>).map(OrderBookToJSON)),
|
|
80
|
+
'order_books': value['orderBooks'] == null ? undefined : ((value['orderBooks'] as Array<any>).map(OrderBookToJSON)),
|
|
82
81
|
};
|
|
83
82
|
}
|
|
84
83
|
|
package/models/Orders.ts
CHANGED
|
@@ -49,14 +49,13 @@ export interface Orders {
|
|
|
49
49
|
* @type {Array<Order>}
|
|
50
50
|
* @memberof Orders
|
|
51
51
|
*/
|
|
52
|
-
orders
|
|
52
|
+
orders?: Array<Order>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the Orders interface.
|
|
57
57
|
*/
|
|
58
58
|
export function instanceOfOrders(value: object): value is Orders {
|
|
59
|
-
if (!('orders' in value) || value['orders'] === undefined) return false;
|
|
60
59
|
return true;
|
|
61
60
|
}
|
|
62
61
|
|
|
@@ -73,7 +72,7 @@ export function OrdersFromJSONTyped(json: any, ignoreDiscriminator: boolean): Or
|
|
|
73
72
|
'code': json['code'] == null ? undefined : json['code'],
|
|
74
73
|
'message': json['message'] == null ? undefined : json['message'],
|
|
75
74
|
'next': json['next'] == null ? undefined : json['next'],
|
|
76
|
-
'orders': ((json['orders'] as Array<any>).map(OrderFromJSON)),
|
|
75
|
+
'orders': json['orders'] == null ? undefined : ((json['orders'] as Array<any>).map(OrderFromJSON)),
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
|
|
@@ -86,7 +85,7 @@ export function OrdersToJSON(value?: Orders | null): any {
|
|
|
86
85
|
'code': value['code'],
|
|
87
86
|
'message': value['message'],
|
|
88
87
|
'next': value['next'],
|
|
89
|
-
'orders': ((value['orders'] as Array<any>).map(OrderToJSON)),
|
|
88
|
+
'orders': value['orders'] == null ? undefined : ((value['orders'] as Array<any>).map(OrderToJSON)),
|
|
90
89
|
};
|
|
91
90
|
}
|
|
92
91
|
|
package/models/Permission.ts
CHANGED
|
@@ -36,14 +36,13 @@ export interface Permission {
|
|
|
36
36
|
* @type {boolean}
|
|
37
37
|
* @memberof Permission
|
|
38
38
|
*/
|
|
39
|
-
permit
|
|
39
|
+
permit?: boolean;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Check if a given object implements the Permission interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfPermission(value: object): value is Permission {
|
|
46
|
-
if (!('permit' in value) || value['permit'] === undefined) return false;
|
|
47
46
|
return true;
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -59,7 +58,7 @@ export function PermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
59
58
|
|
|
60
59
|
'code': json['code'] == null ? undefined : json['code'],
|
|
61
60
|
'message': json['message'] == null ? undefined : json['message'],
|
|
62
|
-
'permit': json['permit'],
|
|
61
|
+
'permit': json['permit'] == null ? undefined : json['permit'],
|
|
63
62
|
};
|
|
64
63
|
}
|
|
65
64
|
|
package/models/PnLEntry.ts
CHANGED
|
@@ -24,21 +24,19 @@ export interface PnLEntry {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof PnLEntry
|
|
26
26
|
*/
|
|
27
|
-
timestamp
|
|
27
|
+
timestamp?: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof PnLEntry
|
|
32
32
|
*/
|
|
33
|
-
value
|
|
33
|
+
value?: number;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Check if a given object implements the PnLEntry interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfPnLEntry(value: object): value is PnLEntry {
|
|
40
|
-
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
41
|
-
if (!('value' in value) || value['value'] === undefined) return false;
|
|
42
40
|
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
@@ -52,8 +50,8 @@ export function PnLEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'timestamp': json['timestamp'],
|
|
56
|
-
'value': json['value'],
|
|
53
|
+
'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
|
|
54
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
package/models/PriceLevel.ts
CHANGED
|
@@ -24,21 +24,19 @@ export interface PriceLevel {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof PriceLevel
|
|
26
26
|
*/
|
|
27
|
-
price
|
|
27
|
+
price?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof PriceLevel
|
|
32
32
|
*/
|
|
33
|
-
size
|
|
33
|
+
size?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Check if a given object implements the PriceLevel interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfPriceLevel(value: object): value is PriceLevel {
|
|
40
|
-
if (!('price' in value) || value['price'] === undefined) return false;
|
|
41
|
-
if (!('size' in value) || value['size'] === undefined) return false;
|
|
42
40
|
return true;
|
|
43
41
|
}
|
|
44
42
|
|
|
@@ -52,8 +50,8 @@ export function PriceLevelFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
52
50
|
}
|
|
53
51
|
return {
|
|
54
52
|
|
|
55
|
-
'price': json['price'],
|
|
56
|
-
'size': json['size'],
|
|
53
|
+
'price': json['price'] == null ? undefined : json['price'],
|
|
54
|
+
'size': json['size'] == null ? undefined : json['size'],
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
|
package/models/ReqDoFaucet.ts
CHANGED
|
@@ -24,14 +24,13 @@ export interface ReqDoFaucet {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqDoFaucet
|
|
26
26
|
*/
|
|
27
|
-
l1Address
|
|
27
|
+
l1Address?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Check if a given object implements the ReqDoFaucet interface.
|
|
32
32
|
*/
|
|
33
33
|
export function instanceOfReqDoFaucet(value: object): value is ReqDoFaucet {
|
|
34
|
-
if (!('l1Address' in value) || value['l1Address'] === undefined) return false;
|
|
35
34
|
return true;
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -45,7 +44,7 @@ export function ReqDoFaucetFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
45
44
|
}
|
|
46
45
|
return {
|
|
47
46
|
|
|
48
|
-
'l1Address': json['l1_address'],
|
|
47
|
+
'l1Address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
|
package/models/ReqGetAccount.ts
CHANGED
|
@@ -24,13 +24,13 @@ export interface ReqGetAccount {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetAccount
|
|
26
26
|
*/
|
|
27
|
-
by
|
|
27
|
+
by?: ReqGetAccountByEnum;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ReqGetAccount
|
|
32
32
|
*/
|
|
33
|
-
value
|
|
33
|
+
value?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
@@ -48,8 +48,6 @@ export type ReqGetAccountByEnum = typeof ReqGetAccountByEnum[keyof typeof ReqGet
|
|
|
48
48
|
* Check if a given object implements the ReqGetAccount interface.
|
|
49
49
|
*/
|
|
50
50
|
export function instanceOfReqGetAccount(value: object): value is ReqGetAccount {
|
|
51
|
-
if (!('by' in value) || value['by'] === undefined) return false;
|
|
52
|
-
if (!('value' in value) || value['value'] === undefined) return false;
|
|
53
51
|
return true;
|
|
54
52
|
}
|
|
55
53
|
|
|
@@ -63,8 +61,8 @@ export function ReqGetAccountFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
63
61
|
}
|
|
64
62
|
return {
|
|
65
63
|
|
|
66
|
-
'by': json['by'],
|
|
67
|
-
'value': json['value'],
|
|
64
|
+
'by': json['by'] == null ? undefined : json['by'],
|
|
65
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
68
66
|
};
|
|
69
67
|
}
|
|
70
68
|
|
|
@@ -24,28 +24,25 @@ export interface ReqGetAccountActiveOrders {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof ReqGetAccountActiveOrders
|
|
26
26
|
*/
|
|
27
|
-
accountIndex
|
|
27
|
+
accountIndex?: number;
|
|
28
28
|
/**
|
|
29
29
|
* NilSubAccountIndex
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof ReqGetAccountActiveOrders
|
|
32
32
|
*/
|
|
33
|
-
subAccountIndex
|
|
33
|
+
subAccountIndex?: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
37
37
|
* @memberof ReqGetAccountActiveOrders
|
|
38
38
|
*/
|
|
39
|
-
marketId
|
|
39
|
+
marketId?: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Check if a given object implements the ReqGetAccountActiveOrders interface.
|
|
44
44
|
*/
|
|
45
45
|
export function instanceOfReqGetAccountActiveOrders(value: object): value is ReqGetAccountActiveOrders {
|
|
46
|
-
if (!('accountIndex' in value) || value['accountIndex'] === undefined) return false;
|
|
47
|
-
if (!('subAccountIndex' in value) || value['subAccountIndex'] === undefined) return false;
|
|
48
|
-
if (!('marketId' in value) || value['marketId'] === undefined) return false;
|
|
49
46
|
return true;
|
|
50
47
|
}
|
|
51
48
|
|
|
@@ -59,9 +56,9 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
59
56
|
}
|
|
60
57
|
return {
|
|
61
58
|
|
|
62
|
-
'accountIndex': json['account_index'],
|
|
63
|
-
'subAccountIndex': json['sub_account_index'],
|
|
64
|
-
'marketId': json['market_id'],
|
|
59
|
+
'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
|
|
60
|
+
'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
|
|
61
|
+
'marketId': json['market_id'] == null ? undefined : json['market_id'],
|
|
65
62
|
};
|
|
66
63
|
}
|
|
67
64
|
|
|
@@ -24,14 +24,13 @@ export interface ReqGetAccountByL1Address {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetAccountByL1Address
|
|
26
26
|
*/
|
|
27
|
-
l1Address
|
|
27
|
+
l1Address?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Check if a given object implements the ReqGetAccountByL1Address interface.
|
|
32
32
|
*/
|
|
33
33
|
export function instanceOfReqGetAccountByL1Address(value: object): value is ReqGetAccountByL1Address {
|
|
34
|
-
if (!('l1Address' in value) || value['l1Address'] === undefined) return false;
|
|
35
34
|
return true;
|
|
36
35
|
}
|
|
37
36
|
|
|
@@ -45,7 +44,7 @@ export function ReqGetAccountByL1AddressFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
45
44
|
}
|
|
46
45
|
return {
|
|
47
46
|
|
|
48
|
-
'l1Address': json['l1_address'],
|
|
47
|
+
'l1Address': json['l1_address'] == null ? undefined : json['l1_address'],
|
|
49
48
|
};
|
|
50
49
|
}
|
|
51
50
|
|