zklighter-perps 1.0.180 → 1.0.182
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +8 -3
- package/apis/AccountApi.ts +12 -0
- package/apis/OrderApi.ts +67 -0
- package/apis/index.ts +0 -1
- package/models/Account.ts +0 -9
- package/models/AccountAsset.ts +88 -0
- package/models/Asset.ts +144 -0
- package/models/AssetDetails.ts +85 -0
- package/models/DepositHistoryItem.ts +9 -0
- package/models/DetailedAccount.ts +15 -9
- package/models/EnrichedTx.ts +0 -9
- package/models/Order.ts +2 -1
- package/models/OrderBook.ts +36 -0
- package/models/OrderBookDetails.ts +24 -9
- package/models/PerpsMarketStats.ts +205 -0
- package/models/PerpsOrderBookDetail.ts +367 -0
- package/models/PnLEntry.ts +27 -0
- package/models/PublicPoolInfo.ts +0 -9
- package/models/PublicPoolMetadata.ts +0 -18
- package/models/ReqDoFaucet.ts +9 -0
- package/models/ReqGetAssetDetails.ts +60 -0
- package/models/ReqGetOrderBookDetails.ts +20 -0
- package/models/ReqGetOrderBooks.ts +20 -0
- package/models/SpotMarketStats.ts +142 -0
- package/models/SpotOrderBookDetail.ts +297 -0
- package/models/TransferHistoryItem.ts +47 -1
- package/models/Tx.ts +0 -9
- package/models/WithdrawHistoryItem.ts +9 -0
- package/models/index.ts +8 -2
- package/openapi.json +905 -414
- package/package.json +1 -1
|
@@ -25,8 +25,26 @@ export interface ReqGetOrderBooks {
|
|
|
25
25
|
* @memberof ReqGetOrderBooks
|
|
26
26
|
*/
|
|
27
27
|
market_id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetOrderBooks
|
|
32
|
+
*/
|
|
33
|
+
filter?: ReqGetOrderBooksFilterEnum;
|
|
28
34
|
}
|
|
29
35
|
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const ReqGetOrderBooksFilterEnum = {
|
|
41
|
+
All: 'all',
|
|
42
|
+
Spot: 'spot',
|
|
43
|
+
Perp: 'perp'
|
|
44
|
+
} as const;
|
|
45
|
+
export type ReqGetOrderBooksFilterEnum = typeof ReqGetOrderBooksFilterEnum[keyof typeof ReqGetOrderBooksFilterEnum];
|
|
46
|
+
|
|
47
|
+
|
|
30
48
|
/**
|
|
31
49
|
* Check if a given object implements the ReqGetOrderBooks interface.
|
|
32
50
|
*/
|
|
@@ -45,6 +63,7 @@ export function ReqGetOrderBooksFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
45
63
|
return {
|
|
46
64
|
|
|
47
65
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
66
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
48
67
|
};
|
|
49
68
|
}
|
|
50
69
|
|
|
@@ -55,6 +74,7 @@ export function ReqGetOrderBooksToJSON(value?: ReqGetOrderBooks | null): any {
|
|
|
55
74
|
return {
|
|
56
75
|
|
|
57
76
|
'market_id': value['market_id'],
|
|
77
|
+
'filter': value['filter'],
|
|
58
78
|
};
|
|
59
79
|
}
|
|
60
80
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SpotMarketStats
|
|
20
|
+
*/
|
|
21
|
+
export interface SpotMarketStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SpotMarketStats
|
|
26
|
+
*/
|
|
27
|
+
symbol: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SpotMarketStats
|
|
32
|
+
*/
|
|
33
|
+
market_id: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SpotMarketStats
|
|
38
|
+
*/
|
|
39
|
+
index_price: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SpotMarketStats
|
|
44
|
+
*/
|
|
45
|
+
mid_price: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SpotMarketStats
|
|
50
|
+
*/
|
|
51
|
+
last_trade_price: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof SpotMarketStats
|
|
56
|
+
*/
|
|
57
|
+
daily_base_token_volume: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof SpotMarketStats
|
|
62
|
+
*/
|
|
63
|
+
daily_quote_token_volume: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof SpotMarketStats
|
|
68
|
+
*/
|
|
69
|
+
daily_price_low: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof SpotMarketStats
|
|
74
|
+
*/
|
|
75
|
+
daily_price_high: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof SpotMarketStats
|
|
80
|
+
*/
|
|
81
|
+
daily_price_change: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the SpotMarketStats interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfSpotMarketStats(value: object): value is SpotMarketStats {
|
|
88
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
89
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
90
|
+
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
91
|
+
if (!('mid_price' in value) || value['mid_price'] === undefined) return false;
|
|
92
|
+
if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
|
|
93
|
+
if (!('daily_base_token_volume' in value) || value['daily_base_token_volume'] === undefined) return false;
|
|
94
|
+
if (!('daily_quote_token_volume' in value) || value['daily_quote_token_volume'] === undefined) return false;
|
|
95
|
+
if (!('daily_price_low' in value) || value['daily_price_low'] === undefined) return false;
|
|
96
|
+
if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
|
|
97
|
+
if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function SpotMarketStatsFromJSON(json: any): SpotMarketStats {
|
|
102
|
+
return SpotMarketStatsFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function SpotMarketStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpotMarketStats {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'symbol': json['symbol'],
|
|
112
|
+
'market_id': json['market_id'],
|
|
113
|
+
'index_price': json['index_price'],
|
|
114
|
+
'mid_price': json['mid_price'],
|
|
115
|
+
'last_trade_price': json['last_trade_price'],
|
|
116
|
+
'daily_base_token_volume': json['daily_base_token_volume'],
|
|
117
|
+
'daily_quote_token_volume': json['daily_quote_token_volume'],
|
|
118
|
+
'daily_price_low': json['daily_price_low'],
|
|
119
|
+
'daily_price_high': json['daily_price_high'],
|
|
120
|
+
'daily_price_change': json['daily_price_change'],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function SpotMarketStatsToJSON(value?: SpotMarketStats | null): any {
|
|
125
|
+
if (value == null) {
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
|
|
130
|
+
'symbol': value['symbol'],
|
|
131
|
+
'market_id': value['market_id'],
|
|
132
|
+
'index_price': value['index_price'],
|
|
133
|
+
'mid_price': value['mid_price'],
|
|
134
|
+
'last_trade_price': value['last_trade_price'],
|
|
135
|
+
'daily_base_token_volume': value['daily_base_token_volume'],
|
|
136
|
+
'daily_quote_token_volume': value['daily_quote_token_volume'],
|
|
137
|
+
'daily_price_low': value['daily_price_low'],
|
|
138
|
+
'daily_price_high': value['daily_price_high'],
|
|
139
|
+
'daily_price_change': value['daily_price_change'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SpotOrderBookDetail
|
|
20
|
+
*/
|
|
21
|
+
export interface SpotOrderBookDetail {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SpotOrderBookDetail
|
|
26
|
+
*/
|
|
27
|
+
symbol: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SpotOrderBookDetail
|
|
32
|
+
*/
|
|
33
|
+
market_id: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SpotOrderBookDetail
|
|
38
|
+
*/
|
|
39
|
+
market_type: SpotOrderBookDetailMarketTypeEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SpotOrderBookDetail
|
|
44
|
+
*/
|
|
45
|
+
base_asset_id: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SpotOrderBookDetail
|
|
50
|
+
*/
|
|
51
|
+
quote_asset_id: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof SpotOrderBookDetail
|
|
56
|
+
*/
|
|
57
|
+
status: SpotOrderBookDetailStatusEnum;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof SpotOrderBookDetail
|
|
62
|
+
*/
|
|
63
|
+
taker_fee: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof SpotOrderBookDetail
|
|
68
|
+
*/
|
|
69
|
+
maker_fee: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof SpotOrderBookDetail
|
|
74
|
+
*/
|
|
75
|
+
liquidation_fee: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof SpotOrderBookDetail
|
|
80
|
+
*/
|
|
81
|
+
min_base_amount: string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof SpotOrderBookDetail
|
|
86
|
+
*/
|
|
87
|
+
min_quote_amount: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof SpotOrderBookDetail
|
|
92
|
+
*/
|
|
93
|
+
order_quote_limit: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof SpotOrderBookDetail
|
|
98
|
+
*/
|
|
99
|
+
supported_size_decimals: number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof SpotOrderBookDetail
|
|
104
|
+
*/
|
|
105
|
+
supported_price_decimals: number;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {number}
|
|
109
|
+
* @memberof SpotOrderBookDetail
|
|
110
|
+
*/
|
|
111
|
+
supported_quote_decimals: number;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {number}
|
|
115
|
+
* @memberof SpotOrderBookDetail
|
|
116
|
+
*/
|
|
117
|
+
size_decimals: number;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {number}
|
|
121
|
+
* @memberof SpotOrderBookDetail
|
|
122
|
+
*/
|
|
123
|
+
price_decimals: number;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof SpotOrderBookDetail
|
|
128
|
+
*/
|
|
129
|
+
last_trade_price: number;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @type {number}
|
|
133
|
+
* @memberof SpotOrderBookDetail
|
|
134
|
+
*/
|
|
135
|
+
daily_trades_count: number;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {number}
|
|
139
|
+
* @memberof SpotOrderBookDetail
|
|
140
|
+
*/
|
|
141
|
+
daily_base_token_volume: number;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {number}
|
|
145
|
+
* @memberof SpotOrderBookDetail
|
|
146
|
+
*/
|
|
147
|
+
daily_quote_token_volume: number;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @type {number}
|
|
151
|
+
* @memberof SpotOrderBookDetail
|
|
152
|
+
*/
|
|
153
|
+
daily_price_low: number;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @type {number}
|
|
157
|
+
* @memberof SpotOrderBookDetail
|
|
158
|
+
*/
|
|
159
|
+
daily_price_high: number;
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @type {number}
|
|
163
|
+
* @memberof SpotOrderBookDetail
|
|
164
|
+
*/
|
|
165
|
+
daily_price_change: number;
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @type {{ [key: string]: number; }}
|
|
169
|
+
* @memberof SpotOrderBookDetail
|
|
170
|
+
*/
|
|
171
|
+
daily_chart: { [key: string]: number; };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @export
|
|
177
|
+
*/
|
|
178
|
+
export const SpotOrderBookDetailMarketTypeEnum = {
|
|
179
|
+
Perp: 'perp',
|
|
180
|
+
Spot: 'spot'
|
|
181
|
+
} as const;
|
|
182
|
+
export type SpotOrderBookDetailMarketTypeEnum = typeof SpotOrderBookDetailMarketTypeEnum[keyof typeof SpotOrderBookDetailMarketTypeEnum];
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @export
|
|
186
|
+
*/
|
|
187
|
+
export const SpotOrderBookDetailStatusEnum = {
|
|
188
|
+
Inactive: 'inactive',
|
|
189
|
+
Active: 'active'
|
|
190
|
+
} as const;
|
|
191
|
+
export type SpotOrderBookDetailStatusEnum = typeof SpotOrderBookDetailStatusEnum[keyof typeof SpotOrderBookDetailStatusEnum];
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Check if a given object implements the SpotOrderBookDetail interface.
|
|
196
|
+
*/
|
|
197
|
+
export function instanceOfSpotOrderBookDetail(value: object): value is SpotOrderBookDetail {
|
|
198
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
199
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
200
|
+
if (!('market_type' in value) || value['market_type'] === undefined) return false;
|
|
201
|
+
if (!('base_asset_id' in value) || value['base_asset_id'] === undefined) return false;
|
|
202
|
+
if (!('quote_asset_id' in value) || value['quote_asset_id'] === undefined) return false;
|
|
203
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
204
|
+
if (!('taker_fee' in value) || value['taker_fee'] === undefined) return false;
|
|
205
|
+
if (!('maker_fee' in value) || value['maker_fee'] === undefined) return false;
|
|
206
|
+
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
207
|
+
if (!('min_base_amount' in value) || value['min_base_amount'] === undefined) return false;
|
|
208
|
+
if (!('min_quote_amount' in value) || value['min_quote_amount'] === undefined) return false;
|
|
209
|
+
if (!('order_quote_limit' in value) || value['order_quote_limit'] === undefined) return false;
|
|
210
|
+
if (!('supported_size_decimals' in value) || value['supported_size_decimals'] === undefined) return false;
|
|
211
|
+
if (!('supported_price_decimals' in value) || value['supported_price_decimals'] === undefined) return false;
|
|
212
|
+
if (!('supported_quote_decimals' in value) || value['supported_quote_decimals'] === undefined) return false;
|
|
213
|
+
if (!('size_decimals' in value) || value['size_decimals'] === undefined) return false;
|
|
214
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
215
|
+
if (!('last_trade_price' in value) || value['last_trade_price'] === undefined) return false;
|
|
216
|
+
if (!('daily_trades_count' in value) || value['daily_trades_count'] === undefined) return false;
|
|
217
|
+
if (!('daily_base_token_volume' in value) || value['daily_base_token_volume'] === undefined) return false;
|
|
218
|
+
if (!('daily_quote_token_volume' in value) || value['daily_quote_token_volume'] === undefined) return false;
|
|
219
|
+
if (!('daily_price_low' in value) || value['daily_price_low'] === undefined) return false;
|
|
220
|
+
if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
|
|
221
|
+
if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
|
|
222
|
+
if (!('daily_chart' in value) || value['daily_chart'] === undefined) return false;
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function SpotOrderBookDetailFromJSON(json: any): SpotOrderBookDetail {
|
|
227
|
+
return SpotOrderBookDetailFromJSONTyped(json, false);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function SpotOrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpotOrderBookDetail {
|
|
231
|
+
if (json == null) {
|
|
232
|
+
return json;
|
|
233
|
+
}
|
|
234
|
+
return {
|
|
235
|
+
|
|
236
|
+
'symbol': json['symbol'],
|
|
237
|
+
'market_id': json['market_id'],
|
|
238
|
+
'market_type': json['market_type'],
|
|
239
|
+
'base_asset_id': json['base_asset_id'],
|
|
240
|
+
'quote_asset_id': json['quote_asset_id'],
|
|
241
|
+
'status': json['status'],
|
|
242
|
+
'taker_fee': json['taker_fee'],
|
|
243
|
+
'maker_fee': json['maker_fee'],
|
|
244
|
+
'liquidation_fee': json['liquidation_fee'],
|
|
245
|
+
'min_base_amount': json['min_base_amount'],
|
|
246
|
+
'min_quote_amount': json['min_quote_amount'],
|
|
247
|
+
'order_quote_limit': json['order_quote_limit'],
|
|
248
|
+
'supported_size_decimals': json['supported_size_decimals'],
|
|
249
|
+
'supported_price_decimals': json['supported_price_decimals'],
|
|
250
|
+
'supported_quote_decimals': json['supported_quote_decimals'],
|
|
251
|
+
'size_decimals': json['size_decimals'],
|
|
252
|
+
'price_decimals': json['price_decimals'],
|
|
253
|
+
'last_trade_price': json['last_trade_price'],
|
|
254
|
+
'daily_trades_count': json['daily_trades_count'],
|
|
255
|
+
'daily_base_token_volume': json['daily_base_token_volume'],
|
|
256
|
+
'daily_quote_token_volume': json['daily_quote_token_volume'],
|
|
257
|
+
'daily_price_low': json['daily_price_low'],
|
|
258
|
+
'daily_price_high': json['daily_price_high'],
|
|
259
|
+
'daily_price_change': json['daily_price_change'],
|
|
260
|
+
'daily_chart': json['daily_chart'],
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function SpotOrderBookDetailToJSON(value?: SpotOrderBookDetail | null): any {
|
|
265
|
+
if (value == null) {
|
|
266
|
+
return value;
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
|
|
270
|
+
'symbol': value['symbol'],
|
|
271
|
+
'market_id': value['market_id'],
|
|
272
|
+
'market_type': value['market_type'],
|
|
273
|
+
'base_asset_id': value['base_asset_id'],
|
|
274
|
+
'quote_asset_id': value['quote_asset_id'],
|
|
275
|
+
'status': value['status'],
|
|
276
|
+
'taker_fee': value['taker_fee'],
|
|
277
|
+
'maker_fee': value['maker_fee'],
|
|
278
|
+
'liquidation_fee': value['liquidation_fee'],
|
|
279
|
+
'min_base_amount': value['min_base_amount'],
|
|
280
|
+
'min_quote_amount': value['min_quote_amount'],
|
|
281
|
+
'order_quote_limit': value['order_quote_limit'],
|
|
282
|
+
'supported_size_decimals': value['supported_size_decimals'],
|
|
283
|
+
'supported_price_decimals': value['supported_price_decimals'],
|
|
284
|
+
'supported_quote_decimals': value['supported_quote_decimals'],
|
|
285
|
+
'size_decimals': value['size_decimals'],
|
|
286
|
+
'price_decimals': value['price_decimals'],
|
|
287
|
+
'last_trade_price': value['last_trade_price'],
|
|
288
|
+
'daily_trades_count': value['daily_trades_count'],
|
|
289
|
+
'daily_base_token_volume': value['daily_base_token_volume'],
|
|
290
|
+
'daily_quote_token_volume': value['daily_quote_token_volume'],
|
|
291
|
+
'daily_price_low': value['daily_price_low'],
|
|
292
|
+
'daily_price_high': value['daily_price_high'],
|
|
293
|
+
'daily_price_change': value['daily_price_change'],
|
|
294
|
+
'daily_chart': value['daily_chart'],
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
@@ -25,6 +25,12 @@ export interface TransferHistoryItem {
|
|
|
25
25
|
* @memberof TransferHistoryItem
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof TransferHistoryItem
|
|
32
|
+
*/
|
|
33
|
+
asset_id: number;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {string}
|
|
@@ -67,6 +73,18 @@ export interface TransferHistoryItem {
|
|
|
67
73
|
* @memberof TransferHistoryItem
|
|
68
74
|
*/
|
|
69
75
|
to_account_index: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof TransferHistoryItem
|
|
80
|
+
*/
|
|
81
|
+
from_route: TransferHistoryItemFromRouteEnum;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof TransferHistoryItem
|
|
86
|
+
*/
|
|
87
|
+
to_route: TransferHistoryItemToRouteEnum;
|
|
70
88
|
/**
|
|
71
89
|
*
|
|
72
90
|
* @type {string}
|
|
@@ -85,16 +103,36 @@ export const TransferHistoryItemTypeEnum = {
|
|
|
85
103
|
L2BurnSharesInflow: 'L2BurnSharesInflow',
|
|
86
104
|
L2BurnSharesOutflow: 'L2BurnSharesOutflow',
|
|
87
105
|
L2MintSharesInflow: 'L2MintSharesInflow',
|
|
88
|
-
L2MintSharesOutflow: 'L2MintSharesOutflow'
|
|
106
|
+
L2MintSharesOutflow: 'L2MintSharesOutflow',
|
|
107
|
+
L2SelfTransfer: 'L2SelfTransfer'
|
|
89
108
|
} as const;
|
|
90
109
|
export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
|
|
91
110
|
|
|
111
|
+
/**
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
export const TransferHistoryItemFromRouteEnum = {
|
|
115
|
+
Spot: 'spot',
|
|
116
|
+
Perps: 'perps'
|
|
117
|
+
} as const;
|
|
118
|
+
export type TransferHistoryItemFromRouteEnum = typeof TransferHistoryItemFromRouteEnum[keyof typeof TransferHistoryItemFromRouteEnum];
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
export const TransferHistoryItemToRouteEnum = {
|
|
124
|
+
Spot: 'spot',
|
|
125
|
+
Perps: 'perps'
|
|
126
|
+
} as const;
|
|
127
|
+
export type TransferHistoryItemToRouteEnum = typeof TransferHistoryItemToRouteEnum[keyof typeof TransferHistoryItemToRouteEnum];
|
|
128
|
+
|
|
92
129
|
|
|
93
130
|
/**
|
|
94
131
|
* Check if a given object implements the TransferHistoryItem interface.
|
|
95
132
|
*/
|
|
96
133
|
export function instanceOfTransferHistoryItem(value: object): value is TransferHistoryItem {
|
|
97
134
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
135
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
98
136
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
99
137
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
100
138
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
@@ -102,6 +140,8 @@ export function instanceOfTransferHistoryItem(value: object): value is TransferH
|
|
|
102
140
|
if (!('to_l1_address' in value) || value['to_l1_address'] === undefined) return false;
|
|
103
141
|
if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false;
|
|
104
142
|
if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false;
|
|
143
|
+
if (!('from_route' in value) || value['from_route'] === undefined) return false;
|
|
144
|
+
if (!('to_route' in value) || value['to_route'] === undefined) return false;
|
|
105
145
|
if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
|
|
106
146
|
return true;
|
|
107
147
|
}
|
|
@@ -117,6 +157,7 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
117
157
|
return {
|
|
118
158
|
|
|
119
159
|
'id': json['id'],
|
|
160
|
+
'asset_id': json['asset_id'],
|
|
120
161
|
'amount': json['amount'],
|
|
121
162
|
'timestamp': json['timestamp'],
|
|
122
163
|
'type': json['type'],
|
|
@@ -124,6 +165,8 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
124
165
|
'to_l1_address': json['to_l1_address'],
|
|
125
166
|
'from_account_index': json['from_account_index'],
|
|
126
167
|
'to_account_index': json['to_account_index'],
|
|
168
|
+
'from_route': json['from_route'],
|
|
169
|
+
'to_route': json['to_route'],
|
|
127
170
|
'tx_hash': json['tx_hash'],
|
|
128
171
|
};
|
|
129
172
|
}
|
|
@@ -135,6 +178,7 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
|
|
|
135
178
|
return {
|
|
136
179
|
|
|
137
180
|
'id': value['id'],
|
|
181
|
+
'asset_id': value['asset_id'],
|
|
138
182
|
'amount': value['amount'],
|
|
139
183
|
'timestamp': value['timestamp'],
|
|
140
184
|
'type': value['type'],
|
|
@@ -142,6 +186,8 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
|
|
|
142
186
|
'to_l1_address': value['to_l1_address'],
|
|
143
187
|
'from_account_index': value['from_account_index'],
|
|
144
188
|
'to_account_index': value['to_account_index'],
|
|
189
|
+
'from_route': value['from_route'],
|
|
190
|
+
'to_route': value['to_route'],
|
|
145
191
|
'tx_hash': value['tx_hash'],
|
|
146
192
|
};
|
|
147
193
|
}
|
package/models/Tx.ts
CHANGED
|
@@ -109,12 +109,6 @@ export interface Tx {
|
|
|
109
109
|
* @memberof Tx
|
|
110
110
|
*/
|
|
111
111
|
parent_hash: string;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @type {number}
|
|
115
|
-
* @memberof Tx
|
|
116
|
-
*/
|
|
117
|
-
api_key_index: number;
|
|
118
112
|
}
|
|
119
113
|
|
|
120
114
|
/**
|
|
@@ -136,7 +130,6 @@ export function instanceOfTx(value: object): value is Tx {
|
|
|
136
130
|
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
137
131
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
138
132
|
if (!('parent_hash' in value) || value['parent_hash'] === undefined) return false;
|
|
139
|
-
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
140
133
|
return true;
|
|
141
134
|
}
|
|
142
135
|
|
|
@@ -165,7 +158,6 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
|
|
|
165
158
|
'executed_at': json['executed_at'],
|
|
166
159
|
'sequence_index': json['sequence_index'],
|
|
167
160
|
'parent_hash': json['parent_hash'],
|
|
168
|
-
'api_key_index': json['api_key_index'],
|
|
169
161
|
};
|
|
170
162
|
}
|
|
171
163
|
|
|
@@ -190,7 +182,6 @@ export function TxToJSON(value?: Tx | null): any {
|
|
|
190
182
|
'executed_at': value['executed_at'],
|
|
191
183
|
'sequence_index': value['sequence_index'],
|
|
192
184
|
'parent_hash': value['parent_hash'],
|
|
193
|
-
'api_key_index': value['api_key_index'],
|
|
194
185
|
};
|
|
195
186
|
}
|
|
196
187
|
|
|
@@ -25,6 +25,12 @@ export interface WithdrawHistoryItem {
|
|
|
25
25
|
* @memberof WithdrawHistoryItem
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof WithdrawHistoryItem
|
|
32
|
+
*/
|
|
33
|
+
asset_id: number;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* @type {string}
|
|
@@ -85,6 +91,7 @@ export type WithdrawHistoryItemTypeEnum = typeof WithdrawHistoryItemTypeEnum[key
|
|
|
85
91
|
*/
|
|
86
92
|
export function instanceOfWithdrawHistoryItem(value: object): value is WithdrawHistoryItem {
|
|
87
93
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
94
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
88
95
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
89
96
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
90
97
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -104,6 +111,7 @@ export function WithdrawHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
104
111
|
return {
|
|
105
112
|
|
|
106
113
|
'id': json['id'],
|
|
114
|
+
'asset_id': json['asset_id'],
|
|
107
115
|
'amount': json['amount'],
|
|
108
116
|
'timestamp': json['timestamp'],
|
|
109
117
|
'status': json['status'],
|
|
@@ -119,6 +127,7 @@ export function WithdrawHistoryItemToJSON(value?: WithdrawHistoryItem | null): a
|
|
|
119
127
|
return {
|
|
120
128
|
|
|
121
129
|
'id': value['id'],
|
|
130
|
+
'asset_id': value['asset_id'],
|
|
122
131
|
'amount': value['amount'],
|
|
123
132
|
'timestamp': value['timestamp'],
|
|
124
133
|
'status': value['status'],
|