zklighter-perps 1.0.11 → 1.0.13

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.
Files changed (64) hide show
  1. package/apis/AccountApi.ts +81 -81
  2. package/apis/BlockApi.ts +14 -14
  3. package/apis/CandlestickApi.ts +65 -65
  4. package/apis/InfoApi.ts +6 -6
  5. package/apis/OrderApi.ts +101 -101
  6. package/apis/TransactionApi.ts +76 -76
  7. package/config.yaml +4 -4
  8. package/models/AccountMarketStats.ts +24 -24
  9. package/models/AccountPosition.ts +28 -28
  10. package/models/AccountStats.ts +16 -16
  11. package/models/Block.ts +32 -32
  12. package/models/DetailedAccount.ts +17 -17
  13. package/models/EnrichedTx.ts +39 -39
  14. package/models/ExchangeStats.ts +12 -12
  15. package/models/L1ProviderInfo.ts +4 -4
  16. package/models/Layer1BasicInfo.ts +28 -28
  17. package/models/Layer2BasicInfo.ts +12 -12
  18. package/models/MainAccount.ts +4 -4
  19. package/models/MarketInfo.ts +44 -44
  20. package/models/Order.ts +55 -57
  21. package/models/OrderBook.ts +43 -44
  22. package/models/OrderBookDetail.ts +102 -103
  23. package/models/OrderBookDetails.ts +4 -4
  24. package/models/OrderBookOrders.ts +8 -8
  25. package/models/OrderBookStats.ts +20 -20
  26. package/models/OrderBooks.ts +4 -4
  27. package/models/ReqDoFaucet.ts +4 -4
  28. package/models/ReqGetAccount.ts +7 -8
  29. package/models/ReqGetAccountActiveOrders.ts +12 -12
  30. package/models/ReqGetAccountByL1Address.ts +4 -4
  31. package/models/ReqGetAccountInactiveOrders.ts +18 -19
  32. package/models/ReqGetAccountOrders.ts +8 -8
  33. package/models/ReqGetAccountPendingTxs.ts +7 -8
  34. package/models/ReqGetAccountPnL.ts +30 -32
  35. package/models/ReqGetAccountTxs.ts +7 -8
  36. package/models/ReqGetBlock.ts +7 -8
  37. package/models/ReqGetBlockTxs.ts +7 -8
  38. package/models/ReqGetByAccount.ts +7 -8
  39. package/models/ReqGetCandlesticks.ts +27 -28
  40. package/models/ReqGetFundings.ts +22 -23
  41. package/models/ReqGetNextNonce.ts +8 -8
  42. package/models/ReqGetOrderBookDetails.ts +10 -11
  43. package/models/ReqGetOrderBookOrders.ts +4 -4
  44. package/models/ReqGetOrderBooks.ts +10 -11
  45. package/models/ReqGetPermission.ts +11 -12
  46. package/models/ReqGetRangeWithIndexSortable.ts +7 -8
  47. package/models/ReqGetRecentTrades.ts +4 -4
  48. package/models/ReqGetRollbacks.ts +4 -4
  49. package/models/ReqGetSubAccount.ts +11 -12
  50. package/models/ReqGetTrades.ts +15 -16
  51. package/models/ReqGetTx.ts +7 -8
  52. package/models/Rollback.ts +12 -12
  53. package/models/Search.ts +4 -4
  54. package/models/SignBody.ts +4 -4
  55. package/models/SimpleOrder.ts +16 -16
  56. package/models/Status.ts +4 -4
  57. package/models/SubAccount.ts +12 -12
  58. package/models/SubAccounts.ts +8 -8
  59. package/models/Trade.ts +36 -36
  60. package/models/Tx.ts +36 -36
  61. package/models/TxHash.ts +4 -4
  62. package/models/TxHashes.ts +4 -4
  63. package/models/ValidatorInfo.ts +4 -4
  64. package/package.json +1 -1
package/models/Order.ts CHANGED
@@ -24,7 +24,7 @@ export interface Order {
24
24
  * @type {number}
25
25
  * @memberof Order
26
26
  */
27
- marketIndex: number;
27
+ market_index: number;
28
28
  /**
29
29
  * TODO: should we return this?
30
30
  * @type {number}
@@ -36,31 +36,31 @@ export interface Order {
36
36
  * @type {number}
37
37
  * @memberof Order
38
38
  */
39
- ownerAccountIndex: number;
39
+ owner_account_index: number;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof Order
44
44
  */
45
- initialBaseAmount: string;
45
+ initial_base_amount: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof Order
50
50
  */
51
- remainingBaseAmount: string;
51
+ remaining_base_amount: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof Order
56
56
  */
57
- filledBaseAmount: string;
57
+ filled_base_amount: string;
58
58
  /**
59
59
  *
60
60
  * @type {string}
61
61
  * @memberof Order
62
62
  */
63
- filledQuoteAmount: string;
63
+ filled_quote_amount: string;
64
64
  /**
65
65
  *
66
66
  * @type {string}
@@ -72,13 +72,13 @@ export interface Order {
72
72
  * @type {number}
73
73
  * @memberof Order
74
74
  */
75
- baseSize: number;
75
+ base_size: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof Order
80
80
  */
81
- basePrice: number;
81
+ base_price: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
@@ -90,7 +90,7 @@ export interface Order {
90
90
  * @type {boolean}
91
91
  * @memberof Order
92
92
  */
93
- isAsk: boolean;
93
+ is_ask: boolean;
94
94
  /**
95
95
  *
96
96
  * @type {string}
@@ -114,7 +114,7 @@ export interface Order {
114
114
  * @type {number}
115
115
  * @memberof Order
116
116
  */
117
- blockHeight: number;
117
+ block_height: number;
118
118
  /**
119
119
  *
120
120
  * @type {number}
@@ -123,46 +123,44 @@ export interface Order {
123
123
  timestamp: number;
124
124
  }
125
125
 
126
-
127
126
  /**
128
- * @export
129
- */
130
- export const OrderTypeEnum = {
131
- Limit: 'limit',
132
- Market: 'market'
133
- } as const;
134
- export type OrderTypeEnum = typeof OrderTypeEnum[keyof typeof OrderTypeEnum];
135
-
127
+ * @export
128
+ * @enum {string}
129
+ */
130
+ export enum OrderTypeEnum {
131
+ Limit = 'limit',
132
+ Market = 'market'
133
+ }
136
134
  /**
137
- * @export
138
- */
139
- export const OrderStatusEnum = {
140
- Open: 'open',
141
- Filled: 'filled',
142
- Canceled: 'canceled'
143
- } as const;
144
- export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
135
+ * @export
136
+ * @enum {string}
137
+ */
138
+ export enum OrderStatusEnum {
139
+ Open = 'open',
140
+ Filled = 'filled',
141
+ Canceled = 'canceled'
142
+ }
145
143
 
146
144
 
147
145
  /**
148
146
  * Check if a given object implements the Order interface.
149
147
  */
150
148
  export function instanceOfOrder(value: object): value is Order {
151
- if (!('marketIndex' in value) || value['marketIndex'] === undefined) return false;
152
- if (!('ownerAccountIndex' in value) || value['ownerAccountIndex'] === undefined) return false;
153
- if (!('initialBaseAmount' in value) || value['initialBaseAmount'] === undefined) return false;
154
- if (!('remainingBaseAmount' in value) || value['remainingBaseAmount'] === undefined) return false;
155
- if (!('filledBaseAmount' in value) || value['filledBaseAmount'] === undefined) return false;
156
- if (!('filledQuoteAmount' in value) || value['filledQuoteAmount'] === undefined) return false;
149
+ if (!('market_index' in value) || value['market_index'] === undefined) return false;
150
+ if (!('owner_account_index' in value) || value['owner_account_index'] === undefined) return false;
151
+ if (!('initial_base_amount' in value) || value['initial_base_amount'] === undefined) return false;
152
+ if (!('remaining_base_amount' in value) || value['remaining_base_amount'] === undefined) return false;
153
+ if (!('filled_base_amount' in value) || value['filled_base_amount'] === undefined) return false;
154
+ if (!('filled_quote_amount' in value) || value['filled_quote_amount'] === undefined) return false;
157
155
  if (!('price' in value) || value['price'] === undefined) return false;
158
- if (!('baseSize' in value) || value['baseSize'] === undefined) return false;
159
- if (!('basePrice' in value) || value['basePrice'] === undefined) return false;
156
+ if (!('base_size' in value) || value['base_size'] === undefined) return false;
157
+ if (!('base_price' in value) || value['base_price'] === undefined) return false;
160
158
  if (!('nonce' in value) || value['nonce'] === undefined) return false;
161
- if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
159
+ if (!('is_ask' in value) || value['is_ask'] === undefined) return false;
162
160
  if (!('side' in value) || value['side'] === undefined) return false;
163
161
  if (!('type' in value) || value['type'] === undefined) return false;
164
162
  if (!('status' in value) || value['status'] === undefined) return false;
165
- if (!('blockHeight' in value) || value['blockHeight'] === undefined) return false;
163
+ if (!('block_height' in value) || value['block_height'] === undefined) return false;
166
164
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
167
165
  return true;
168
166
  }
@@ -177,22 +175,22 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
177
175
  }
178
176
  return {
179
177
 
180
- 'marketIndex': json['market_index'],
178
+ 'market_index': json['market_index'],
181
179
  'ownerMainAccountIndex': json['ownerMainAccountIndex'] == null ? undefined : json['ownerMainAccountIndex'],
182
- 'ownerAccountIndex': json['owner_account_index'],
183
- 'initialBaseAmount': json['initial_base_amount'],
184
- 'remainingBaseAmount': json['remaining_base_amount'],
185
- 'filledBaseAmount': json['filled_base_amount'],
186
- 'filledQuoteAmount': json['filled_quote_amount'],
180
+ 'owner_account_index': json['owner_account_index'],
181
+ 'initial_base_amount': json['initial_base_amount'],
182
+ 'remaining_base_amount': json['remaining_base_amount'],
183
+ 'filled_base_amount': json['filled_base_amount'],
184
+ 'filled_quote_amount': json['filled_quote_amount'],
187
185
  'price': json['price'],
188
- 'baseSize': json['base_size'],
189
- 'basePrice': json['base_price'],
186
+ 'base_size': json['base_size'],
187
+ 'base_price': json['base_price'],
190
188
  'nonce': json['nonce'],
191
- 'isAsk': json['is_ask'],
189
+ 'is_ask': json['is_ask'],
192
190
  'side': json['side'],
193
191
  'type': json['type'],
194
192
  'status': json['status'],
195
- 'blockHeight': json['block_height'],
193
+ 'block_height': json['block_height'],
196
194
  'timestamp': json['timestamp'],
197
195
  };
198
196
  }
@@ -203,22 +201,22 @@ export function OrderToJSON(value?: Order | null): any {
203
201
  }
204
202
  return {
205
203
 
206
- 'market_index': value['marketIndex'],
204
+ 'market_index': value['market_index'],
207
205
  'ownerMainAccountIndex': value['ownerMainAccountIndex'],
208
- 'owner_account_index': value['ownerAccountIndex'],
209
- 'initial_base_amount': value['initialBaseAmount'],
210
- 'remaining_base_amount': value['remainingBaseAmount'],
211
- 'filled_base_amount': value['filledBaseAmount'],
212
- 'filled_quote_amount': value['filledQuoteAmount'],
206
+ 'owner_account_index': value['owner_account_index'],
207
+ 'initial_base_amount': value['initial_base_amount'],
208
+ 'remaining_base_amount': value['remaining_base_amount'],
209
+ 'filled_base_amount': value['filled_base_amount'],
210
+ 'filled_quote_amount': value['filled_quote_amount'],
213
211
  'price': value['price'],
214
- 'base_size': value['baseSize'],
215
- 'base_price': value['basePrice'],
212
+ 'base_size': value['base_size'],
213
+ 'base_price': value['base_price'],
216
214
  'nonce': value['nonce'],
217
- 'is_ask': value['isAsk'],
215
+ 'is_ask': value['is_ask'],
218
216
  'side': value['side'],
219
217
  'type': value['type'],
220
218
  'status': value['status'],
221
- 'block_height': value['blockHeight'],
219
+ 'block_height': value['block_height'],
222
220
  'timestamp': value['timestamp'],
223
221
  };
224
222
  }
@@ -30,7 +30,7 @@ export interface OrderBook {
30
30
  * @type {number}
31
31
  * @memberof OrderBook
32
32
  */
33
- marketId: number;
33
+ market_id: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -42,60 +42,59 @@ export interface OrderBook {
42
42
  * @type {string}
43
43
  * @memberof OrderBook
44
44
  */
45
- takerFee: string;
45
+ taker_fee: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof OrderBook
50
50
  */
51
- makerFee: string;
51
+ maker_fee: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof OrderBook
56
56
  */
57
- liquidationFee: string;
57
+ liquidation_fee: string;
58
58
  /**
59
59
  *
60
60
  * @type {string}
61
61
  * @memberof OrderBook
62
62
  */
63
- minBaseAmount: string;
63
+ min_base_amount: string;
64
64
  /**
65
65
  *
66
66
  * @type {string}
67
67
  * @memberof OrderBook
68
68
  */
69
- minQuoteAmount: string;
69
+ min_quote_amount: string;
70
70
  /**
71
71
  *
72
72
  * @type {number}
73
73
  * @memberof OrderBook
74
74
  */
75
- supportedSizeDecimals: number;
75
+ supported_size_decimals: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof OrderBook
80
80
  */
81
- supportedPriceDecimals: number;
81
+ supported_price_decimals: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
85
85
  * @memberof OrderBook
86
86
  */
87
- supportedQuoteDecimals: number;
87
+ supported_quote_decimals: number;
88
88
  }
89
89
 
90
-
91
90
  /**
92
- * @export
93
- */
94
- export const OrderBookStatusEnum = {
95
- Frozen: 'frozen',
96
- Active: 'active'
97
- } as const;
98
- export type OrderBookStatusEnum = typeof OrderBookStatusEnum[keyof typeof OrderBookStatusEnum];
91
+ * @export
92
+ * @enum {string}
93
+ */
94
+ export enum OrderBookStatusEnum {
95
+ Frozen = 'frozen',
96
+ Active = 'active'
97
+ }
99
98
 
100
99
 
101
100
  /**
@@ -103,16 +102,16 @@ export type OrderBookStatusEnum = typeof OrderBookStatusEnum[keyof typeof OrderB
103
102
  */
104
103
  export function instanceOfOrderBook(value: object): value is OrderBook {
105
104
  if (!('symbol' in value) || value['symbol'] === undefined) return false;
106
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
105
+ if (!('market_id' in value) || value['market_id'] === undefined) return false;
107
106
  if (!('status' in value) || value['status'] === undefined) return false;
108
- if (!('takerFee' in value) || value['takerFee'] === undefined) return false;
109
- if (!('makerFee' in value) || value['makerFee'] === undefined) return false;
110
- if (!('liquidationFee' in value) || value['liquidationFee'] === undefined) return false;
111
- if (!('minBaseAmount' in value) || value['minBaseAmount'] === undefined) return false;
112
- if (!('minQuoteAmount' in value) || value['minQuoteAmount'] === undefined) return false;
113
- if (!('supportedSizeDecimals' in value) || value['supportedSizeDecimals'] === undefined) return false;
114
- if (!('supportedPriceDecimals' in value) || value['supportedPriceDecimals'] === undefined) return false;
115
- if (!('supportedQuoteDecimals' in value) || value['supportedQuoteDecimals'] === undefined) return false;
107
+ if (!('taker_fee' in value) || value['taker_fee'] === undefined) return false;
108
+ if (!('maker_fee' in value) || value['maker_fee'] === undefined) return false;
109
+ if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
110
+ if (!('min_base_amount' in value) || value['min_base_amount'] === undefined) return false;
111
+ if (!('min_quote_amount' in value) || value['min_quote_amount'] === undefined) return false;
112
+ if (!('supported_size_decimals' in value) || value['supported_size_decimals'] === undefined) return false;
113
+ if (!('supported_price_decimals' in value) || value['supported_price_decimals'] === undefined) return false;
114
+ if (!('supported_quote_decimals' in value) || value['supported_quote_decimals'] === undefined) return false;
116
115
  return true;
117
116
  }
118
117
 
@@ -127,16 +126,16 @@ export function OrderBookFromJSONTyped(json: any, ignoreDiscriminator: boolean):
127
126
  return {
128
127
 
129
128
  'symbol': json['symbol'],
130
- 'marketId': json['market_id'],
129
+ 'market_id': json['market_id'],
131
130
  'status': json['status'],
132
- 'takerFee': json['taker_fee'],
133
- 'makerFee': json['maker_fee'],
134
- 'liquidationFee': json['liquidation_fee'],
135
- 'minBaseAmount': json['min_base_amount'],
136
- 'minQuoteAmount': json['min_quote_amount'],
137
- 'supportedSizeDecimals': json['supported_size_decimals'],
138
- 'supportedPriceDecimals': json['supported_price_decimals'],
139
- 'supportedQuoteDecimals': json['supported_quote_decimals'],
131
+ 'taker_fee': json['taker_fee'],
132
+ 'maker_fee': json['maker_fee'],
133
+ 'liquidation_fee': json['liquidation_fee'],
134
+ 'min_base_amount': json['min_base_amount'],
135
+ 'min_quote_amount': json['min_quote_amount'],
136
+ 'supported_size_decimals': json['supported_size_decimals'],
137
+ 'supported_price_decimals': json['supported_price_decimals'],
138
+ 'supported_quote_decimals': json['supported_quote_decimals'],
140
139
  };
141
140
  }
142
141
 
@@ -147,16 +146,16 @@ export function OrderBookToJSON(value?: OrderBook | null): any {
147
146
  return {
148
147
 
149
148
  'symbol': value['symbol'],
150
- 'market_id': value['marketId'],
149
+ 'market_id': value['market_id'],
151
150
  'status': value['status'],
152
- 'taker_fee': value['takerFee'],
153
- 'maker_fee': value['makerFee'],
154
- 'liquidation_fee': value['liquidationFee'],
155
- 'min_base_amount': value['minBaseAmount'],
156
- 'min_quote_amount': value['minQuoteAmount'],
157
- 'supported_size_decimals': value['supportedSizeDecimals'],
158
- 'supported_price_decimals': value['supportedPriceDecimals'],
159
- 'supported_quote_decimals': value['supportedQuoteDecimals'],
151
+ 'taker_fee': value['taker_fee'],
152
+ 'maker_fee': value['maker_fee'],
153
+ 'liquidation_fee': value['liquidation_fee'],
154
+ 'min_base_amount': value['min_base_amount'],
155
+ 'min_quote_amount': value['min_quote_amount'],
156
+ 'supported_size_decimals': value['supported_size_decimals'],
157
+ 'supported_price_decimals': value['supported_price_decimals'],
158
+ 'supported_quote_decimals': value['supported_quote_decimals'],
160
159
  };
161
160
  }
162
161