zklighter-perps 1.0.3 → 1.0.4

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 (81) hide show
  1. package/apis/TransactionApi.ts +34 -6
  2. package/models/AccountMarketStats.ts +18 -12
  3. package/models/AccountPnL.ts +7 -5
  4. package/models/AccountPosition.ts +33 -22
  5. package/models/AccountStats.ts +15 -10
  6. package/models/Block.ts +40 -27
  7. package/models/Blocks.ts +7 -5
  8. package/models/Candlestick.ts +21 -14
  9. package/models/Candlesticks.ts +7 -5
  10. package/models/ContractAddress.ts +6 -4
  11. package/models/CurrentHeight.ts +3 -2
  12. package/models/DetailedAccount.ts +11 -8
  13. package/models/DetailedAccounts.ts +7 -5
  14. package/models/EnrichedTx.ts +9 -6
  15. package/models/ExchangeStats.ts +13 -9
  16. package/models/Funding.ts +12 -8
  17. package/models/Fundings.ts +7 -5
  18. package/models/L1ProviderInfo.ts +12 -8
  19. package/models/Layer1BasicInfo.ts +24 -17
  20. package/models/Layer2BasicInfo.ts +9 -6
  21. package/models/MainAccount.ts +9 -6
  22. package/models/MainAccounts.ts +7 -5
  23. package/models/MarketInfo.ts +33 -22
  24. package/models/MarketSig.ts +12 -8
  25. package/models/NextNonce.ts +3 -2
  26. package/models/Order.ts +48 -32
  27. package/models/OrderBook.ts +30 -20
  28. package/models/OrderBookDepth.ts +11 -8
  29. package/models/OrderBookDetail.ts +54 -36
  30. package/models/OrderBookDetails.ts +4 -3
  31. package/models/OrderBookOrders.ts +14 -10
  32. package/models/OrderBookStats.ts +18 -12
  33. package/models/OrderBooks.ts +4 -3
  34. package/models/Orders.ts +4 -3
  35. package/models/Permission.ts +3 -2
  36. package/models/PnLEntry.ts +6 -4
  37. package/models/PriceLevel.ts +6 -4
  38. package/models/ReqDoFaucet.ts +3 -2
  39. package/models/ReqGetAccount.ts +6 -4
  40. package/models/ReqGetAccountActiveOrders.ts +9 -6
  41. package/models/ReqGetAccountByL1Address.ts +3 -2
  42. package/models/ReqGetAccountInactiveOrders.ts +12 -8
  43. package/models/ReqGetAccountOrders.ts +9 -6
  44. package/models/ReqGetAccountPnL.ts +18 -12
  45. package/models/ReqGetBlock.ts +6 -4
  46. package/models/ReqGetBlockTxs.ts +6 -4
  47. package/models/ReqGetByAccount.ts +6 -4
  48. package/models/ReqGetCandlesticks.ts +15 -10
  49. package/models/ReqGetFundings.ts +15 -10
  50. package/models/ReqGetL1Tx.ts +3 -2
  51. package/models/ReqGetMarketSig.ts +9 -6
  52. package/models/ReqGetNextNonce.ts +6 -4
  53. package/models/ReqGetOrderBookDetails.ts +3 -2
  54. package/models/ReqGetOrderBookOrders.ts +6 -4
  55. package/models/ReqGetOrderBooks.ts +3 -2
  56. package/models/ReqGetPermission.ts +9 -6
  57. package/models/ReqGetRangeWithCursor.ts +3 -2
  58. package/models/ReqGetRangeWithIndex.ts +3 -2
  59. package/models/ReqGetRecentTrades.ts +6 -4
  60. package/models/ReqGetRollbacks.ts +9 -6
  61. package/models/ReqGetSubAccount.ts +9 -6
  62. package/models/ReqGetTrades.ts +12 -8
  63. package/models/ReqGetTx.ts +6 -4
  64. package/models/ReqSearch.ts +3 -2
  65. package/models/ResultCode.ts +3 -2
  66. package/models/Rollback.ts +12 -8
  67. package/models/Rollbacks.ts +7 -5
  68. package/models/Search.ts +3 -2
  69. package/models/SignBody.ts +3 -2
  70. package/models/SimpleOrder.ts +18 -12
  71. package/models/Status.ts +6 -4
  72. package/models/SubAccount.ts +24 -16
  73. package/models/SubAccounts.ts +13 -9
  74. package/models/Trade.ts +36 -24
  75. package/models/Trades.ts +4 -3
  76. package/models/Tx.ts +42 -28
  77. package/models/TxHash.ts +3 -2
  78. package/models/Txs.ts +4 -3
  79. package/models/ValidatorInfo.ts +6 -4
  80. package/openapi.json +536 -80
  81. package/package.json +1 -1
@@ -43,19 +43,21 @@ export interface MainAccounts {
43
43
  * @type {number}
44
44
  * @memberof MainAccounts
45
45
  */
46
- total?: number;
46
+ total: number;
47
47
  /**
48
48
  *
49
49
  * @type {Array<MainAccount>}
50
50
  * @memberof MainAccounts
51
51
  */
52
- accounts?: Array<MainAccount>;
52
+ accounts: Array<MainAccount>;
53
53
  }
54
54
 
55
55
  /**
56
56
  * Check if a given object implements the MainAccounts interface.
57
57
  */
58
58
  export function instanceOfMainAccounts(value: object): value is MainAccounts {
59
+ if (!('total' in value) || value['total'] === undefined) return false;
60
+ if (!('accounts' in value) || value['accounts'] === undefined) return false;
59
61
  return true;
60
62
  }
61
63
 
@@ -71,8 +73,8 @@ export function MainAccountsFromJSONTyped(json: any, ignoreDiscriminator: boolea
71
73
 
72
74
  'code': json['code'] == null ? undefined : json['code'],
73
75
  'message': json['message'] == null ? undefined : json['message'],
74
- 'total': json['total'] == null ? undefined : json['total'],
75
- 'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array<any>).map(MainAccountFromJSON)),
76
+ 'total': json['total'],
77
+ 'accounts': ((json['accounts'] as Array<any>).map(MainAccountFromJSON)),
76
78
  };
77
79
  }
78
80
 
@@ -85,7 +87,7 @@ export function MainAccountsToJSON(value?: MainAccounts | null): any {
85
87
  'code': value['code'],
86
88
  'message': value['message'],
87
89
  'total': value['total'],
88
- 'accounts': value['accounts'] == null ? undefined : ((value['accounts'] as Array<any>).map(MainAccountToJSON)),
90
+ 'accounts': ((value['accounts'] as Array<any>).map(MainAccountToJSON)),
89
91
  };
90
92
  }
91
93
 
@@ -24,73 +24,84 @@ export interface MarketInfo {
24
24
  * @type {number}
25
25
  * @memberof MarketInfo
26
26
  */
27
- marketId?: number;
27
+ marketId: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof MarketInfo
32
32
  */
33
- indexPrice?: string;
33
+ indexPrice: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof MarketInfo
38
38
  */
39
- markPrice?: string;
39
+ markPrice: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof MarketInfo
44
44
  */
45
- lastTradePrice?: string;
45
+ lastTradePrice: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof MarketInfo
50
50
  */
51
- fundingRate?: string;
51
+ fundingRate: string;
52
52
  /**
53
53
  *
54
54
  * @type {number}
55
55
  * @memberof MarketInfo
56
56
  */
57
- fundingTimestamp?: number;
57
+ fundingTimestamp: number;
58
58
  /**
59
59
  *
60
60
  * @type {number}
61
61
  * @memberof MarketInfo
62
62
  */
63
- dailyBaseTokenVolume?: number;
63
+ dailyBaseTokenVolume: number;
64
64
  /**
65
65
  *
66
66
  * @type {number}
67
67
  * @memberof MarketInfo
68
68
  */
69
- dailyQuoteTokenVolume?: number;
69
+ dailyQuoteTokenVolume: number;
70
70
  /**
71
71
  *
72
72
  * @type {number}
73
73
  * @memberof MarketInfo
74
74
  */
75
- dailyPriceLow?: number;
75
+ dailyPriceLow: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof MarketInfo
80
80
  */
81
- dailyPriceHigh?: number;
81
+ dailyPriceHigh: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
85
85
  * @memberof MarketInfo
86
86
  */
87
- dailyPriceChange?: number;
87
+ dailyPriceChange: number;
88
88
  }
89
89
 
90
90
  /**
91
91
  * Check if a given object implements the MarketInfo interface.
92
92
  */
93
93
  export function instanceOfMarketInfo(value: object): value is MarketInfo {
94
+ if (!('marketId' in value) || value['marketId'] === undefined) return false;
95
+ if (!('indexPrice' in value) || value['indexPrice'] === undefined) return false;
96
+ if (!('markPrice' in value) || value['markPrice'] === undefined) return false;
97
+ if (!('lastTradePrice' in value) || value['lastTradePrice'] === undefined) return false;
98
+ if (!('fundingRate' in value) || value['fundingRate'] === undefined) return false;
99
+ if (!('fundingTimestamp' in value) || value['fundingTimestamp'] === undefined) return false;
100
+ if (!('dailyBaseTokenVolume' in value) || value['dailyBaseTokenVolume'] === undefined) return false;
101
+ if (!('dailyQuoteTokenVolume' in value) || value['dailyQuoteTokenVolume'] === undefined) return false;
102
+ if (!('dailyPriceLow' in value) || value['dailyPriceLow'] === undefined) return false;
103
+ if (!('dailyPriceHigh' in value) || value['dailyPriceHigh'] === undefined) return false;
104
+ if (!('dailyPriceChange' in value) || value['dailyPriceChange'] === undefined) return false;
94
105
  return true;
95
106
  }
96
107
 
@@ -104,17 +115,17 @@ export function MarketInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
104
115
  }
105
116
  return {
106
117
 
107
- 'marketId': json['market_id'] == null ? undefined : json['market_id'],
108
- 'indexPrice': json['index_price'] == null ? undefined : json['index_price'],
109
- 'markPrice': json['mark_price'] == null ? undefined : json['mark_price'],
110
- 'lastTradePrice': json['last_trade_price'] == null ? undefined : json['last_trade_price'],
111
- 'fundingRate': json['funding_rate'] == null ? undefined : json['funding_rate'],
112
- 'fundingTimestamp': json['funding_timestamp'] == null ? undefined : json['funding_timestamp'],
113
- 'dailyBaseTokenVolume': json['daily_base_token_volume'] == null ? undefined : json['daily_base_token_volume'],
114
- 'dailyQuoteTokenVolume': json['daily_quote_token_volume'] == null ? undefined : json['daily_quote_token_volume'],
115
- 'dailyPriceLow': json['daily_price_low'] == null ? undefined : json['daily_price_low'],
116
- 'dailyPriceHigh': json['daily_price_high'] == null ? undefined : json['daily_price_high'],
117
- 'dailyPriceChange': json['daily_price_change'] == null ? undefined : json['daily_price_change'],
118
+ 'marketId': json['market_id'],
119
+ 'indexPrice': json['index_price'],
120
+ 'markPrice': json['mark_price'],
121
+ 'lastTradePrice': json['last_trade_price'],
122
+ 'fundingRate': json['funding_rate'],
123
+ 'fundingTimestamp': json['funding_timestamp'],
124
+ 'dailyBaseTokenVolume': json['daily_base_token_volume'],
125
+ 'dailyQuoteTokenVolume': json['daily_quote_token_volume'],
126
+ 'dailyPriceLow': json['daily_price_low'],
127
+ 'dailyPriceHigh': json['daily_price_high'],
128
+ 'dailyPriceChange': json['daily_price_change'],
118
129
  };
119
130
  }
120
131
 
@@ -36,31 +36,35 @@ export interface MarketSig {
36
36
  * @type {boolean}
37
37
  * @memberof MarketSig
38
38
  */
39
- canBeFilled?: boolean;
39
+ canBeFilled: boolean;
40
40
  /**
41
41
  *
42
42
  * @type {boolean}
43
43
  * @memberof MarketSig
44
44
  */
45
- isAsk?: boolean;
45
+ isAsk: boolean;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof MarketSig
50
50
  */
51
- quoteAmount?: number;
51
+ quoteAmount: number;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof MarketSig
56
56
  */
57
- signature?: string;
57
+ signature: string;
58
58
  }
59
59
 
60
60
  /**
61
61
  * Check if a given object implements the MarketSig interface.
62
62
  */
63
63
  export function instanceOfMarketSig(value: object): value is MarketSig {
64
+ if (!('canBeFilled' in value) || value['canBeFilled'] === undefined) return false;
65
+ if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
66
+ if (!('quoteAmount' in value) || value['quoteAmount'] === undefined) return false;
67
+ if (!('signature' in value) || value['signature'] === undefined) return false;
64
68
  return true;
65
69
  }
66
70
 
@@ -76,10 +80,10 @@ export function MarketSigFromJSONTyped(json: any, ignoreDiscriminator: boolean):
76
80
 
77
81
  'code': json['code'] == null ? undefined : json['code'],
78
82
  'message': json['message'] == null ? undefined : json['message'],
79
- 'canBeFilled': json['can_be_filled'] == null ? undefined : json['can_be_filled'],
80
- 'isAsk': json['is_ask'] == null ? undefined : json['is_ask'],
81
- 'quoteAmount': json['quote_amount'] == null ? undefined : json['quote_amount'],
82
- 'signature': json['signature'] == null ? undefined : json['signature'],
83
+ 'canBeFilled': json['can_be_filled'],
84
+ 'isAsk': json['is_ask'],
85
+ 'quoteAmount': json['quote_amount'],
86
+ 'signature': json['signature'],
83
87
  };
84
88
  }
85
89
 
@@ -36,13 +36,14 @@ export interface NextNonce {
36
36
  * @type {number}
37
37
  * @memberof NextNonce
38
38
  */
39
- nonce?: number;
39
+ nonce: number;
40
40
  }
41
41
 
42
42
  /**
43
43
  * Check if a given object implements the NextNonce interface.
44
44
  */
45
45
  export function instanceOfNextNonce(value: object): value is NextNonce {
46
+ if (!('nonce' in value) || value['nonce'] === undefined) return false;
46
47
  return true;
47
48
  }
48
49
 
@@ -58,7 +59,7 @@ export function NextNonceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
58
59
 
59
60
  'code': json['code'] == null ? undefined : json['code'],
60
61
  'message': json['message'] == null ? undefined : json['message'],
61
- 'nonce': json['nonce'] == null ? undefined : json['nonce'],
62
+ 'nonce': json['nonce'],
62
63
  };
63
64
  }
64
65
 
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
+ marketIndex: number;
28
28
  /**
29
29
  * TODO: should we return this?
30
30
  * @type {number}
@@ -36,91 +36,91 @@ export interface Order {
36
36
  * @type {number}
37
37
  * @memberof Order
38
38
  */
39
- ownerAccountIndex?: number;
39
+ ownerAccountIndex: number;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof Order
44
44
  */
45
- initialBaseAmount?: string;
45
+ initialBaseAmount: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof Order
50
50
  */
51
- remainingBaseAmount?: string;
51
+ remainingBaseAmount: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof Order
56
56
  */
57
- filledBaseAmount?: string;
57
+ filledBaseAmount: string;
58
58
  /**
59
59
  *
60
60
  * @type {string}
61
61
  * @memberof Order
62
62
  */
63
- filledQuoteAmount?: string;
63
+ filledQuoteAmount: string;
64
64
  /**
65
65
  *
66
66
  * @type {string}
67
67
  * @memberof Order
68
68
  */
69
- price?: string;
69
+ price: string;
70
70
  /**
71
71
  *
72
72
  * @type {number}
73
73
  * @memberof Order
74
74
  */
75
- baseSize?: number;
75
+ baseSize: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof Order
80
80
  */
81
- basePrice?: number;
81
+ basePrice: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
85
85
  * @memberof Order
86
86
  */
87
- nonce?: number;
87
+ nonce: number;
88
88
  /**
89
89
  *
90
90
  * @type {boolean}
91
91
  * @memberof Order
92
92
  */
93
- isAsk?: boolean;
93
+ isAsk: boolean;
94
94
  /**
95
95
  *
96
96
  * @type {string}
97
97
  * @memberof Order
98
98
  */
99
- side?: string;
99
+ side: string;
100
100
  /**
101
101
  *
102
102
  * @type {string}
103
103
  * @memberof Order
104
104
  */
105
- type?: OrderTypeEnum;
105
+ type: OrderTypeEnum;
106
106
  /**
107
107
  *
108
108
  * @type {string}
109
109
  * @memberof Order
110
110
  */
111
- status?: OrderStatusEnum;
111
+ status: OrderStatusEnum;
112
112
  /**
113
113
  *
114
114
  * @type {number}
115
115
  * @memberof Order
116
116
  */
117
- blockHeight?: number;
117
+ blockHeight: number;
118
118
  /**
119
119
  *
120
120
  * @type {number}
121
121
  * @memberof Order
122
122
  */
123
- timestamp?: number;
123
+ timestamp: number;
124
124
  }
125
125
 
126
126
 
@@ -148,6 +148,22 @@ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnu
148
148
  * Check if a given object implements the Order interface.
149
149
  */
150
150
  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;
157
+ 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;
160
+ if (!('nonce' in value) || value['nonce'] === undefined) return false;
161
+ if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
162
+ if (!('side' in value) || value['side'] === undefined) return false;
163
+ if (!('type' in value) || value['type'] === undefined) return false;
164
+ if (!('status' in value) || value['status'] === undefined) return false;
165
+ if (!('blockHeight' in value) || value['blockHeight'] === undefined) return false;
166
+ if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
151
167
  return true;
152
168
  }
153
169
 
@@ -161,23 +177,23 @@ export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ord
161
177
  }
162
178
  return {
163
179
 
164
- 'marketIndex': json['market_index'] == null ? undefined : json['market_index'],
180
+ 'marketIndex': json['market_index'],
165
181
  'ownerMainAccountIndex': json['ownerMainAccountIndex'] == null ? undefined : json['ownerMainAccountIndex'],
166
- 'ownerAccountIndex': json['owner_account_index'] == null ? undefined : json['owner_account_index'],
167
- 'initialBaseAmount': json['initial_base_amount'] == null ? undefined : json['initial_base_amount'],
168
- 'remainingBaseAmount': json['remaining_base_amount'] == null ? undefined : json['remaining_base_amount'],
169
- 'filledBaseAmount': json['filled_base_amount'] == null ? undefined : json['filled_base_amount'],
170
- 'filledQuoteAmount': json['filled_quote_amount'] == null ? undefined : json['filled_quote_amount'],
171
- 'price': json['price'] == null ? undefined : json['price'],
172
- 'baseSize': json['base_size'] == null ? undefined : json['base_size'],
173
- 'basePrice': json['base_price'] == null ? undefined : json['base_price'],
174
- 'nonce': json['nonce'] == null ? undefined : json['nonce'],
175
- 'isAsk': json['is_ask'] == null ? undefined : json['is_ask'],
176
- 'side': json['side'] == null ? undefined : json['side'],
177
- 'type': json['type'] == null ? undefined : json['type'],
178
- 'status': json['status'] == null ? undefined : json['status'],
179
- 'blockHeight': json['block_height'] == null ? undefined : json['block_height'],
180
- 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
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'],
187
+ 'price': json['price'],
188
+ 'baseSize': json['base_size'],
189
+ 'basePrice': json['base_price'],
190
+ 'nonce': json['nonce'],
191
+ 'isAsk': json['is_ask'],
192
+ 'side': json['side'],
193
+ 'type': json['type'],
194
+ 'status': json['status'],
195
+ 'blockHeight': json['block_height'],
196
+ 'timestamp': json['timestamp'],
181
197
  };
182
198
  }
183
199
 
@@ -24,61 +24,61 @@ export interface OrderBook {
24
24
  * @type {string}
25
25
  * @memberof OrderBook
26
26
  */
27
- symbol?: string;
27
+ symbol: string;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof OrderBook
32
32
  */
33
- marketId?: number;
33
+ marketId: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof OrderBook
38
38
  */
39
- status?: OrderBookStatusEnum;
39
+ status: OrderBookStatusEnum;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof OrderBook
44
44
  */
45
- takerFee?: string;
45
+ takerFee: string;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof OrderBook
50
50
  */
51
- makerFee?: string;
51
+ makerFee: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof OrderBook
56
56
  */
57
- minBaseAmount?: string;
57
+ minBaseAmount: string;
58
58
  /**
59
59
  *
60
60
  * @type {string}
61
61
  * @memberof OrderBook
62
62
  */
63
- minQuoteAmount?: string;
63
+ minQuoteAmount: string;
64
64
  /**
65
65
  *
66
66
  * @type {number}
67
67
  * @memberof OrderBook
68
68
  */
69
- supportedSizeDecimals?: number;
69
+ supportedSizeDecimals: number;
70
70
  /**
71
71
  *
72
72
  * @type {number}
73
73
  * @memberof OrderBook
74
74
  */
75
- supportedPriceDecimals?: number;
75
+ supportedPriceDecimals: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof OrderBook
80
80
  */
81
- supportedQuoteDecimals?: number;
81
+ supportedQuoteDecimals: number;
82
82
  }
83
83
 
84
84
 
@@ -96,6 +96,16 @@ export type OrderBookStatusEnum = typeof OrderBookStatusEnum[keyof typeof OrderB
96
96
  * Check if a given object implements the OrderBook interface.
97
97
  */
98
98
  export function instanceOfOrderBook(value: object): value is OrderBook {
99
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
100
+ if (!('marketId' in value) || value['marketId'] === undefined) return false;
101
+ if (!('status' in value) || value['status'] === undefined) return false;
102
+ if (!('takerFee' in value) || value['takerFee'] === undefined) return false;
103
+ if (!('makerFee' in value) || value['makerFee'] === undefined) return false;
104
+ if (!('minBaseAmount' in value) || value['minBaseAmount'] === undefined) return false;
105
+ if (!('minQuoteAmount' in value) || value['minQuoteAmount'] === undefined) return false;
106
+ if (!('supportedSizeDecimals' in value) || value['supportedSizeDecimals'] === undefined) return false;
107
+ if (!('supportedPriceDecimals' in value) || value['supportedPriceDecimals'] === undefined) return false;
108
+ if (!('supportedQuoteDecimals' in value) || value['supportedQuoteDecimals'] === undefined) return false;
99
109
  return true;
100
110
  }
101
111
 
@@ -109,16 +119,16 @@ export function OrderBookFromJSONTyped(json: any, ignoreDiscriminator: boolean):
109
119
  }
110
120
  return {
111
121
 
112
- 'symbol': json['symbol'] == null ? undefined : json['symbol'],
113
- 'marketId': json['market_id'] == null ? undefined : json['market_id'],
114
- 'status': json['status'] == null ? undefined : json['status'],
115
- 'takerFee': json['taker_fee'] == null ? undefined : json['taker_fee'],
116
- 'makerFee': json['maker_fee'] == null ? undefined : json['maker_fee'],
117
- 'minBaseAmount': json['min_base_amount'] == null ? undefined : json['min_base_amount'],
118
- 'minQuoteAmount': json['min_quote_amount'] == null ? undefined : json['min_quote_amount'],
119
- 'supportedSizeDecimals': json['supported_size_decimals'] == null ? undefined : json['supported_size_decimals'],
120
- 'supportedPriceDecimals': json['supported_price_decimals'] == null ? undefined : json['supported_price_decimals'],
121
- 'supportedQuoteDecimals': json['supported_quote_decimals'] == null ? undefined : json['supported_quote_decimals'],
122
+ 'symbol': json['symbol'],
123
+ 'marketId': json['market_id'],
124
+ 'status': json['status'],
125
+ 'takerFee': json['taker_fee'],
126
+ 'makerFee': json['maker_fee'],
127
+ 'minBaseAmount': json['min_base_amount'],
128
+ 'minQuoteAmount': json['min_quote_amount'],
129
+ 'supportedSizeDecimals': json['supported_size_decimals'],
130
+ 'supportedPriceDecimals': json['supported_price_decimals'],
131
+ 'supportedQuoteDecimals': json['supported_quote_decimals'],
122
132
  };
123
133
  }
124
134
 
@@ -43,25 +43,28 @@ export interface OrderBookDepth {
43
43
  * @type {Array<PriceLevel>}
44
44
  * @memberof OrderBookDepth
45
45
  */
46
- asks?: Array<PriceLevel>;
46
+ asks: Array<PriceLevel>;
47
47
  /**
48
48
  *
49
49
  * @type {Array<PriceLevel>}
50
50
  * @memberof OrderBookDepth
51
51
  */
52
- bids?: Array<PriceLevel>;
52
+ bids: Array<PriceLevel>;
53
53
  /**
54
54
  *
55
55
  * @type {number}
56
56
  * @memberof OrderBookDepth
57
57
  */
58
- offset?: number;
58
+ offset: number;
59
59
  }
60
60
 
61
61
  /**
62
62
  * Check if a given object implements the OrderBookDepth interface.
63
63
  */
64
64
  export function instanceOfOrderBookDepth(value: object): value is OrderBookDepth {
65
+ if (!('asks' in value) || value['asks'] === undefined) return false;
66
+ if (!('bids' in value) || value['bids'] === undefined) return false;
67
+ if (!('offset' in value) || value['offset'] === undefined) return false;
65
68
  return true;
66
69
  }
67
70
 
@@ -77,9 +80,9 @@ export function OrderBookDepthFromJSONTyped(json: any, ignoreDiscriminator: bool
77
80
 
78
81
  'code': json['code'] == null ? undefined : json['code'],
79
82
  'message': json['message'] == null ? undefined : json['message'],
80
- 'asks': json['asks'] == null ? undefined : ((json['asks'] as Array<any>).map(PriceLevelFromJSON)),
81
- 'bids': json['bids'] == null ? undefined : ((json['bids'] as Array<any>).map(PriceLevelFromJSON)),
82
- 'offset': json['offset'] == null ? undefined : json['offset'],
83
+ 'asks': ((json['asks'] as Array<any>).map(PriceLevelFromJSON)),
84
+ 'bids': ((json['bids'] as Array<any>).map(PriceLevelFromJSON)),
85
+ 'offset': json['offset'],
83
86
  };
84
87
  }
85
88
 
@@ -91,8 +94,8 @@ export function OrderBookDepthToJSON(value?: OrderBookDepth | null): any {
91
94
 
92
95
  'code': value['code'],
93
96
  'message': value['message'],
94
- 'asks': value['asks'] == null ? undefined : ((value['asks'] as Array<any>).map(PriceLevelToJSON)),
95
- 'bids': value['bids'] == null ? undefined : ((value['bids'] as Array<any>).map(PriceLevelToJSON)),
97
+ 'asks': ((value['asks'] as Array<any>).map(PriceLevelToJSON)),
98
+ 'bids': ((value['bids'] as Array<any>).map(PriceLevelToJSON)),
96
99
  'offset': value['offset'],
97
100
  };
98
101
  }