zklighter-perps 1.0.181 → 1.0.183
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 +1 -0
- package/apis/OrderApi.ts +3 -3
- package/apis/index.ts +1 -0
- package/models/Asset.ts +4 -4
- package/models/DepositHistoryItem.ts +4 -4
- package/models/EnrichedTx.ts +9 -0
- package/models/PublicPoolInfo.ts +9 -0
- package/models/PublicPoolMetadata.ts +18 -0
- package/models/ReqGetAssetDetails.ts +3 -3
- package/models/SpotOrderBookDetail.ts +0 -16
- package/models/TransferHistoryItem.ts +42 -5
- package/models/Tx.ts +9 -0
- package/models/WithdrawHistoryItem.ts +4 -4
- package/openapi.json +83 -17
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/OrderApi.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface AccountInactiveOrdersRequest {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface AssetDetailsRequest {
|
|
76
|
-
|
|
76
|
+
asset_id?: number;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export interface OrderBookDetailsRequest {
|
|
@@ -312,8 +312,8 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
312
312
|
async assetDetailsRaw(requestParameters: AssetDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetDetails>> {
|
|
313
313
|
const queryParameters: any = {};
|
|
314
314
|
|
|
315
|
-
if (requestParameters['
|
|
316
|
-
queryParameters['
|
|
315
|
+
if (requestParameters['asset_id'] != null) {
|
|
316
|
+
queryParameters['asset_id'] = requestParameters['asset_id'];
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
const headerParameters: runtime.HTTPHeaders = {};
|
package/apis/index.ts
CHANGED
package/models/Asset.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface Asset {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof Asset
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
asset_id: number;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
@@ -90,7 +90,7 @@ export type AssetMarginModeEnum = typeof AssetMarginModeEnum[keyof typeof AssetM
|
|
|
90
90
|
* Check if a given object implements the Asset interface.
|
|
91
91
|
*/
|
|
92
92
|
export function instanceOfAsset(value: object): value is Asset {
|
|
93
|
-
if (!('
|
|
93
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
94
94
|
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
95
95
|
if (!('l1_decimals' in value) || value['l1_decimals'] === undefined) return false;
|
|
96
96
|
if (!('decimals' in value) || value['decimals'] === undefined) return false;
|
|
@@ -112,7 +112,7 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
112
112
|
}
|
|
113
113
|
return {
|
|
114
114
|
|
|
115
|
-
'
|
|
115
|
+
'asset_id': json['asset_id'],
|
|
116
116
|
'symbol': json['symbol'],
|
|
117
117
|
'l1_decimals': json['l1_decimals'],
|
|
118
118
|
'decimals': json['decimals'],
|
|
@@ -130,7 +130,7 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
130
130
|
}
|
|
131
131
|
return {
|
|
132
132
|
|
|
133
|
-
'
|
|
133
|
+
'asset_id': value['asset_id'],
|
|
134
134
|
'symbol': value['symbol'],
|
|
135
135
|
'l1_decimals': value['l1_decimals'],
|
|
136
136
|
'decimals': value['decimals'],
|
|
@@ -30,7 +30,7 @@ export interface DepositHistoryItem {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof DepositHistoryItem
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
asset_id: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -75,7 +75,7 @@ export type DepositHistoryItemStatusEnum = typeof DepositHistoryItemStatusEnum[k
|
|
|
75
75
|
*/
|
|
76
76
|
export function instanceOfDepositHistoryItem(value: object): value is DepositHistoryItem {
|
|
77
77
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
78
|
-
if (!('
|
|
78
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
79
79
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
80
80
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
81
81
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -94,7 +94,7 @@ export function DepositHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
94
94
|
return {
|
|
95
95
|
|
|
96
96
|
'id': json['id'],
|
|
97
|
-
'
|
|
97
|
+
'asset_id': json['asset_id'],
|
|
98
98
|
'amount': json['amount'],
|
|
99
99
|
'timestamp': json['timestamp'],
|
|
100
100
|
'status': json['status'],
|
|
@@ -109,7 +109,7 @@ export function DepositHistoryItemToJSON(value?: DepositHistoryItem | null): any
|
|
|
109
109
|
return {
|
|
110
110
|
|
|
111
111
|
'id': value['id'],
|
|
112
|
-
'
|
|
112
|
+
'asset_id': value['asset_id'],
|
|
113
113
|
'amount': value['amount'],
|
|
114
114
|
'timestamp': value['timestamp'],
|
|
115
115
|
'status': value['status'],
|
package/models/EnrichedTx.ts
CHANGED
|
@@ -121,6 +121,12 @@ export interface EnrichedTx {
|
|
|
121
121
|
* @memberof EnrichedTx
|
|
122
122
|
*/
|
|
123
123
|
parent_hash: string;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof EnrichedTx
|
|
128
|
+
*/
|
|
129
|
+
api_key_index: number;
|
|
124
130
|
/**
|
|
125
131
|
*
|
|
126
132
|
* @type {number}
|
|
@@ -155,6 +161,7 @@ export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
|
|
|
155
161
|
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
156
162
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
157
163
|
if (!('parent_hash' in value) || value['parent_hash'] === undefined) return false;
|
|
164
|
+
if (!('api_key_index' in value) || value['api_key_index'] === undefined) return false;
|
|
158
165
|
if (!('committed_at' in value) || value['committed_at'] === undefined) return false;
|
|
159
166
|
if (!('verified_at' in value) || value['verified_at'] === undefined) return false;
|
|
160
167
|
return true;
|
|
@@ -187,6 +194,7 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
187
194
|
'executed_at': json['executed_at'],
|
|
188
195
|
'sequence_index': json['sequence_index'],
|
|
189
196
|
'parent_hash': json['parent_hash'],
|
|
197
|
+
'api_key_index': json['api_key_index'],
|
|
190
198
|
'committed_at': json['committed_at'],
|
|
191
199
|
'verified_at': json['verified_at'],
|
|
192
200
|
};
|
|
@@ -215,6 +223,7 @@ export function EnrichedTxToJSON(value?: EnrichedTx | null): any {
|
|
|
215
223
|
'executed_at': value['executed_at'],
|
|
216
224
|
'sequence_index': value['sequence_index'],
|
|
217
225
|
'parent_hash': value['parent_hash'],
|
|
226
|
+
'api_key_index': value['api_key_index'],
|
|
218
227
|
'committed_at': value['committed_at'],
|
|
219
228
|
'verified_at': value['verified_at'],
|
|
220
229
|
};
|
package/models/PublicPoolInfo.ts
CHANGED
|
@@ -68,6 +68,12 @@ export interface PublicPoolInfo {
|
|
|
68
68
|
* @memberof PublicPoolInfo
|
|
69
69
|
*/
|
|
70
70
|
annual_percentage_yield: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {number}
|
|
74
|
+
* @memberof PublicPoolInfo
|
|
75
|
+
*/
|
|
76
|
+
sharpe_ratio: number;
|
|
71
77
|
/**
|
|
72
78
|
*
|
|
73
79
|
* @type {Array<DailyReturn>}
|
|
@@ -92,6 +98,7 @@ export function instanceOfPublicPoolInfo(value: object): value is PublicPoolInfo
|
|
|
92
98
|
if (!('total_shares' in value) || value['total_shares'] === undefined) return false;
|
|
93
99
|
if (!('operator_shares' in value) || value['operator_shares'] === undefined) return false;
|
|
94
100
|
if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
|
|
101
|
+
if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
|
|
95
102
|
if (!('daily_returns' in value) || value['daily_returns'] === undefined) return false;
|
|
96
103
|
if (!('share_prices' in value) || value['share_prices'] === undefined) return false;
|
|
97
104
|
return true;
|
|
@@ -113,6 +120,7 @@ export function PublicPoolInfoFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
113
120
|
'total_shares': json['total_shares'],
|
|
114
121
|
'operator_shares': json['operator_shares'],
|
|
115
122
|
'annual_percentage_yield': json['annual_percentage_yield'],
|
|
123
|
+
'sharpe_ratio': json['sharpe_ratio'],
|
|
116
124
|
'daily_returns': ((json['daily_returns'] as Array<any>).map(DailyReturnFromJSON)),
|
|
117
125
|
'share_prices': ((json['share_prices'] as Array<any>).map(SharePriceFromJSON)),
|
|
118
126
|
};
|
|
@@ -130,6 +138,7 @@ export function PublicPoolInfoToJSON(value?: PublicPoolInfo | null): any {
|
|
|
130
138
|
'total_shares': value['total_shares'],
|
|
131
139
|
'operator_shares': value['operator_shares'],
|
|
132
140
|
'annual_percentage_yield': value['annual_percentage_yield'],
|
|
141
|
+
'sharpe_ratio': value['sharpe_ratio'],
|
|
133
142
|
'daily_returns': ((value['daily_returns'] as Array<any>).map(DailyReturnToJSON)),
|
|
134
143
|
'share_prices': ((value['share_prices'] as Array<any>).map(SharePriceToJSON)),
|
|
135
144
|
};
|
|
@@ -44,6 +44,12 @@ export interface PublicPoolMetadata {
|
|
|
44
44
|
* @memberof PublicPoolMetadata
|
|
45
45
|
*/
|
|
46
46
|
account_index: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof PublicPoolMetadata
|
|
51
|
+
*/
|
|
52
|
+
created_at: number;
|
|
47
53
|
/**
|
|
48
54
|
*
|
|
49
55
|
* @type {number}
|
|
@@ -74,6 +80,12 @@ export interface PublicPoolMetadata {
|
|
|
74
80
|
* @memberof PublicPoolMetadata
|
|
75
81
|
*/
|
|
76
82
|
annual_percentage_yield: number;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof PublicPoolMetadata
|
|
87
|
+
*/
|
|
88
|
+
sharpe_ratio: number;
|
|
77
89
|
/**
|
|
78
90
|
*
|
|
79
91
|
* @type {number}
|
|
@@ -112,11 +124,13 @@ export interface PublicPoolMetadata {
|
|
|
112
124
|
export function instanceOfPublicPoolMetadata(value: object): value is PublicPoolMetadata {
|
|
113
125
|
if (!('code' in value) || value['code'] === undefined) return false;
|
|
114
126
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
127
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
115
128
|
if (!('master_account_index' in value) || value['master_account_index'] === undefined) return false;
|
|
116
129
|
if (!('account_type' in value) || value['account_type'] === undefined) return false;
|
|
117
130
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
118
131
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
119
132
|
if (!('annual_percentage_yield' in value) || value['annual_percentage_yield'] === undefined) return false;
|
|
133
|
+
if (!('sharpe_ratio' in value) || value['sharpe_ratio'] === undefined) return false;
|
|
120
134
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
121
135
|
if (!('operator_fee' in value) || value['operator_fee'] === undefined) return false;
|
|
122
136
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
@@ -137,11 +151,13 @@ export function PublicPoolMetadataFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
137
151
|
'code': json['code'],
|
|
138
152
|
'message': json['message'] == null ? undefined : json['message'],
|
|
139
153
|
'account_index': json['account_index'],
|
|
154
|
+
'created_at': json['created_at'],
|
|
140
155
|
'master_account_index': json['master_account_index'],
|
|
141
156
|
'account_type': json['account_type'],
|
|
142
157
|
'name': json['name'],
|
|
143
158
|
'l1_address': json['l1_address'],
|
|
144
159
|
'annual_percentage_yield': json['annual_percentage_yield'],
|
|
160
|
+
'sharpe_ratio': json['sharpe_ratio'],
|
|
145
161
|
'status': json['status'],
|
|
146
162
|
'operator_fee': json['operator_fee'],
|
|
147
163
|
'total_asset_value': json['total_asset_value'],
|
|
@@ -159,11 +175,13 @@ export function PublicPoolMetadataToJSON(value?: PublicPoolMetadata | null): any
|
|
|
159
175
|
'code': value['code'],
|
|
160
176
|
'message': value['message'],
|
|
161
177
|
'account_index': value['account_index'],
|
|
178
|
+
'created_at': value['created_at'],
|
|
162
179
|
'master_account_index': value['master_account_index'],
|
|
163
180
|
'account_type': value['account_type'],
|
|
164
181
|
'name': value['name'],
|
|
165
182
|
'l1_address': value['l1_address'],
|
|
166
183
|
'annual_percentage_yield': value['annual_percentage_yield'],
|
|
184
|
+
'sharpe_ratio': value['sharpe_ratio'],
|
|
167
185
|
'status': value['status'],
|
|
168
186
|
'operator_fee': value['operator_fee'],
|
|
169
187
|
'total_asset_value': value['total_asset_value'],
|
|
@@ -24,7 +24,7 @@ export interface ReqGetAssetDetails {
|
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof ReqGetAssetDetails
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
asset_id?: number;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -44,7 +44,7 @@ export function ReqGetAssetDetailsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
44
44
|
}
|
|
45
45
|
return {
|
|
46
46
|
|
|
47
|
-
'
|
|
47
|
+
'asset_id': json['asset_id'] == null ? undefined : json['asset_id'],
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ export function ReqGetAssetDetailsToJSON(value?: ReqGetAssetDetails | null): any
|
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
56
56
|
|
|
57
|
-
'
|
|
57
|
+
'asset_id': value['asset_id'],
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type { MarketConfig } from './MarketConfig';
|
|
17
|
-
import {
|
|
18
|
-
MarketConfigFromJSON,
|
|
19
|
-
MarketConfigFromJSONTyped,
|
|
20
|
-
MarketConfigToJSON,
|
|
21
|
-
} from './MarketConfig';
|
|
22
|
-
|
|
23
16
|
/**
|
|
24
17
|
*
|
|
25
18
|
* @export
|
|
@@ -176,12 +169,6 @@ export interface SpotOrderBookDetail {
|
|
|
176
169
|
* @memberof SpotOrderBookDetail
|
|
177
170
|
*/
|
|
178
171
|
daily_chart: { [key: string]: number; };
|
|
179
|
-
/**
|
|
180
|
-
*
|
|
181
|
-
* @type {MarketConfig}
|
|
182
|
-
* @memberof SpotOrderBookDetail
|
|
183
|
-
*/
|
|
184
|
-
market_config: MarketConfig;
|
|
185
172
|
}
|
|
186
173
|
|
|
187
174
|
|
|
@@ -233,7 +220,6 @@ export function instanceOfSpotOrderBookDetail(value: object): value is SpotOrder
|
|
|
233
220
|
if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
|
|
234
221
|
if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
|
|
235
222
|
if (!('daily_chart' in value) || value['daily_chart'] === undefined) return false;
|
|
236
|
-
if (!('market_config' in value) || value['market_config'] === undefined) return false;
|
|
237
223
|
return true;
|
|
238
224
|
}
|
|
239
225
|
|
|
@@ -272,7 +258,6 @@ export function SpotOrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
272
258
|
'daily_price_high': json['daily_price_high'],
|
|
273
259
|
'daily_price_change': json['daily_price_change'],
|
|
274
260
|
'daily_chart': json['daily_chart'],
|
|
275
|
-
'market_config': MarketConfigFromJSON(json['market_config']),
|
|
276
261
|
};
|
|
277
262
|
}
|
|
278
263
|
|
|
@@ -307,7 +292,6 @@ export function SpotOrderBookDetailToJSON(value?: SpotOrderBookDetail | null): a
|
|
|
307
292
|
'daily_price_high': value['daily_price_high'],
|
|
308
293
|
'daily_price_change': value['daily_price_change'],
|
|
309
294
|
'daily_chart': value['daily_chart'],
|
|
310
|
-
'market_config': MarketConfigToJSON(value['market_config']),
|
|
311
295
|
};
|
|
312
296
|
}
|
|
313
297
|
|
|
@@ -30,7 +30,7 @@ export interface TransferHistoryItem {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof TransferHistoryItem
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
asset_id: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -73,6 +73,18 @@ export interface TransferHistoryItem {
|
|
|
73
73
|
* @memberof TransferHistoryItem
|
|
74
74
|
*/
|
|
75
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;
|
|
76
88
|
/**
|
|
77
89
|
*
|
|
78
90
|
* @type {string}
|
|
@@ -91,17 +103,36 @@ export const TransferHistoryItemTypeEnum = {
|
|
|
91
103
|
L2BurnSharesInflow: 'L2BurnSharesInflow',
|
|
92
104
|
L2BurnSharesOutflow: 'L2BurnSharesOutflow',
|
|
93
105
|
L2MintSharesInflow: 'L2MintSharesInflow',
|
|
94
|
-
L2MintSharesOutflow: 'L2MintSharesOutflow'
|
|
106
|
+
L2MintSharesOutflow: 'L2MintSharesOutflow',
|
|
107
|
+
L2SelfTransfer: 'L2SelfTransfer'
|
|
95
108
|
} as const;
|
|
96
109
|
export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
|
|
97
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
|
+
|
|
98
129
|
|
|
99
130
|
/**
|
|
100
131
|
* Check if a given object implements the TransferHistoryItem interface.
|
|
101
132
|
*/
|
|
102
133
|
export function instanceOfTransferHistoryItem(value: object): value is TransferHistoryItem {
|
|
103
134
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
104
|
-
if (!('
|
|
135
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
105
136
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
106
137
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
107
138
|
if (!('type' in value) || value['type'] === undefined) return false;
|
|
@@ -109,6 +140,8 @@ export function instanceOfTransferHistoryItem(value: object): value is TransferH
|
|
|
109
140
|
if (!('to_l1_address' in value) || value['to_l1_address'] === undefined) return false;
|
|
110
141
|
if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false;
|
|
111
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;
|
|
112
145
|
if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
|
|
113
146
|
return true;
|
|
114
147
|
}
|
|
@@ -124,7 +157,7 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
124
157
|
return {
|
|
125
158
|
|
|
126
159
|
'id': json['id'],
|
|
127
|
-
'
|
|
160
|
+
'asset_id': json['asset_id'],
|
|
128
161
|
'amount': json['amount'],
|
|
129
162
|
'timestamp': json['timestamp'],
|
|
130
163
|
'type': json['type'],
|
|
@@ -132,6 +165,8 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
132
165
|
'to_l1_address': json['to_l1_address'],
|
|
133
166
|
'from_account_index': json['from_account_index'],
|
|
134
167
|
'to_account_index': json['to_account_index'],
|
|
168
|
+
'from_route': json['from_route'],
|
|
169
|
+
'to_route': json['to_route'],
|
|
135
170
|
'tx_hash': json['tx_hash'],
|
|
136
171
|
};
|
|
137
172
|
}
|
|
@@ -143,7 +178,7 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
|
|
|
143
178
|
return {
|
|
144
179
|
|
|
145
180
|
'id': value['id'],
|
|
146
|
-
'
|
|
181
|
+
'asset_id': value['asset_id'],
|
|
147
182
|
'amount': value['amount'],
|
|
148
183
|
'timestamp': value['timestamp'],
|
|
149
184
|
'type': value['type'],
|
|
@@ -151,6 +186,8 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
|
|
|
151
186
|
'to_l1_address': value['to_l1_address'],
|
|
152
187
|
'from_account_index': value['from_account_index'],
|
|
153
188
|
'to_account_index': value['to_account_index'],
|
|
189
|
+
'from_route': value['from_route'],
|
|
190
|
+
'to_route': value['to_route'],
|
|
154
191
|
'tx_hash': value['tx_hash'],
|
|
155
192
|
};
|
|
156
193
|
}
|
package/models/Tx.ts
CHANGED
|
@@ -109,6 +109,12 @@ 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;
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
/**
|
|
@@ -130,6 +136,7 @@ export function instanceOfTx(value: object): value is Tx {
|
|
|
130
136
|
if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
|
|
131
137
|
if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
|
|
132
138
|
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;
|
|
133
140
|
return true;
|
|
134
141
|
}
|
|
135
142
|
|
|
@@ -158,6 +165,7 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
|
|
|
158
165
|
'executed_at': json['executed_at'],
|
|
159
166
|
'sequence_index': json['sequence_index'],
|
|
160
167
|
'parent_hash': json['parent_hash'],
|
|
168
|
+
'api_key_index': json['api_key_index'],
|
|
161
169
|
};
|
|
162
170
|
}
|
|
163
171
|
|
|
@@ -182,6 +190,7 @@ export function TxToJSON(value?: Tx | null): any {
|
|
|
182
190
|
'executed_at': value['executed_at'],
|
|
183
191
|
'sequence_index': value['sequence_index'],
|
|
184
192
|
'parent_hash': value['parent_hash'],
|
|
193
|
+
'api_key_index': value['api_key_index'],
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
196
|
|
|
@@ -30,7 +30,7 @@ export interface WithdrawHistoryItem {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof WithdrawHistoryItem
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
asset_id: number;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -91,7 +91,7 @@ export type WithdrawHistoryItemTypeEnum = typeof WithdrawHistoryItemTypeEnum[key
|
|
|
91
91
|
*/
|
|
92
92
|
export function instanceOfWithdrawHistoryItem(value: object): value is WithdrawHistoryItem {
|
|
93
93
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
94
|
-
if (!('
|
|
94
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
95
95
|
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
96
96
|
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
97
97
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
@@ -111,7 +111,7 @@ export function WithdrawHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
111
111
|
return {
|
|
112
112
|
|
|
113
113
|
'id': json['id'],
|
|
114
|
-
'
|
|
114
|
+
'asset_id': json['asset_id'],
|
|
115
115
|
'amount': json['amount'],
|
|
116
116
|
'timestamp': json['timestamp'],
|
|
117
117
|
'status': json['status'],
|
|
@@ -127,7 +127,7 @@ export function WithdrawHistoryItemToJSON(value?: WithdrawHistoryItem | null): a
|
|
|
127
127
|
return {
|
|
128
128
|
|
|
129
129
|
'id': value['id'],
|
|
130
|
-
'
|
|
130
|
+
'asset_id': value['asset_id'],
|
|
131
131
|
'amount': value['amount'],
|
|
132
132
|
'timestamp': value['timestamp'],
|
|
133
133
|
'status': value['status'],
|
package/openapi.json
CHANGED
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
},
|
|
541
541
|
"parameters": [
|
|
542
542
|
{
|
|
543
|
-
"name": "
|
|
543
|
+
"name": "asset_id",
|
|
544
544
|
"in": "query",
|
|
545
545
|
"required": false,
|
|
546
546
|
"type": "integer",
|
|
@@ -1516,6 +1516,30 @@
|
|
|
1516
1516
|
"description": "Coin Gecko Orderbook"
|
|
1517
1517
|
}
|
|
1518
1518
|
},
|
|
1519
|
+
"/api/v1/geoLocation": {
|
|
1520
|
+
"get": {
|
|
1521
|
+
"summary": "geoLocation",
|
|
1522
|
+
"operationId": "geoLocation",
|
|
1523
|
+
"responses": {
|
|
1524
|
+
"200": {
|
|
1525
|
+
"description": "A successful response.",
|
|
1526
|
+
"schema": {
|
|
1527
|
+
"$ref": "#/definitions/ResultCode"
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
"400": {
|
|
1531
|
+
"description": "Bad request",
|
|
1532
|
+
"schema": {
|
|
1533
|
+
"$ref": "#/definitions/ResultCode"
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
"tags": [
|
|
1538
|
+
"geo"
|
|
1539
|
+
],
|
|
1540
|
+
"description": "Get geo location"
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1519
1543
|
"/api/v1/isWhitelisted": {
|
|
1520
1544
|
"get": {
|
|
1521
1545
|
"summary": "isWhitelisted",
|
|
@@ -3843,7 +3867,7 @@
|
|
|
3843
3867
|
"Asset": {
|
|
3844
3868
|
"type": "object",
|
|
3845
3869
|
"properties": {
|
|
3846
|
-
"
|
|
3870
|
+
"asset_id": {
|
|
3847
3871
|
"type": "integer",
|
|
3848
3872
|
"format": "int16",
|
|
3849
3873
|
"example": "1"
|
|
@@ -3889,7 +3913,7 @@
|
|
|
3889
3913
|
},
|
|
3890
3914
|
"title": "Asset",
|
|
3891
3915
|
"required": [
|
|
3892
|
-
"
|
|
3916
|
+
"asset_id",
|
|
3893
3917
|
"symbol",
|
|
3894
3918
|
"l1_decimals",
|
|
3895
3919
|
"decimals",
|
|
@@ -4472,7 +4496,7 @@
|
|
|
4472
4496
|
"id": {
|
|
4473
4497
|
"type": "string"
|
|
4474
4498
|
},
|
|
4475
|
-
"
|
|
4499
|
+
"asset_id": {
|
|
4476
4500
|
"type": "integer",
|
|
4477
4501
|
"format": "int16",
|
|
4478
4502
|
"example": "1"
|
|
@@ -4503,7 +4527,7 @@
|
|
|
4503
4527
|
"title": "DepositHistoryItem",
|
|
4504
4528
|
"required": [
|
|
4505
4529
|
"id",
|
|
4506
|
-
"
|
|
4530
|
+
"asset_id",
|
|
4507
4531
|
"amount",
|
|
4508
4532
|
"timestamp",
|
|
4509
4533
|
"status",
|
|
@@ -4836,6 +4860,11 @@
|
|
|
4836
4860
|
"type": "string",
|
|
4837
4861
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
4838
4862
|
},
|
|
4863
|
+
"api_key_index": {
|
|
4864
|
+
"type": "integer",
|
|
4865
|
+
"format": "uint8",
|
|
4866
|
+
"example": "0"
|
|
4867
|
+
},
|
|
4839
4868
|
"committed_at": {
|
|
4840
4869
|
"type": "integer",
|
|
4841
4870
|
"format": "int64",
|
|
@@ -4865,6 +4894,7 @@
|
|
|
4865
4894
|
"executed_at",
|
|
4866
4895
|
"sequence_index",
|
|
4867
4896
|
"parent_hash",
|
|
4897
|
+
"api_key_index",
|
|
4868
4898
|
"committed_at",
|
|
4869
4899
|
"verified_at"
|
|
4870
4900
|
]
|
|
@@ -6623,6 +6653,11 @@
|
|
|
6623
6653
|
"format": "double",
|
|
6624
6654
|
"example": "20.5000"
|
|
6625
6655
|
},
|
|
6656
|
+
"sharpe_ratio": {
|
|
6657
|
+
"type": "number",
|
|
6658
|
+
"format": "double",
|
|
6659
|
+
"example": "1.5"
|
|
6660
|
+
},
|
|
6626
6661
|
"daily_returns": {
|
|
6627
6662
|
"type": "array",
|
|
6628
6663
|
"items": {
|
|
@@ -6644,6 +6679,7 @@
|
|
|
6644
6679
|
"total_shares",
|
|
6645
6680
|
"operator_shares",
|
|
6646
6681
|
"annual_percentage_yield",
|
|
6682
|
+
"sharpe_ratio",
|
|
6647
6683
|
"daily_returns",
|
|
6648
6684
|
"share_prices"
|
|
6649
6685
|
]
|
|
@@ -6664,6 +6700,10 @@
|
|
|
6664
6700
|
"format": "int64",
|
|
6665
6701
|
"example": "3"
|
|
6666
6702
|
},
|
|
6703
|
+
"created_at": {
|
|
6704
|
+
"type": "integer",
|
|
6705
|
+
"format": "int64"
|
|
6706
|
+
},
|
|
6667
6707
|
"master_account_index": {
|
|
6668
6708
|
"type": "integer",
|
|
6669
6709
|
"format": "int64",
|
|
@@ -6686,6 +6726,11 @@
|
|
|
6686
6726
|
"format": "double",
|
|
6687
6727
|
"example": "20.5000"
|
|
6688
6728
|
},
|
|
6729
|
+
"sharpe_ratio": {
|
|
6730
|
+
"type": "number",
|
|
6731
|
+
"format": "double",
|
|
6732
|
+
"example": "1.5"
|
|
6733
|
+
},
|
|
6689
6734
|
"status": {
|
|
6690
6735
|
"type": "integer",
|
|
6691
6736
|
"format": "uint8",
|
|
@@ -6712,11 +6757,13 @@
|
|
|
6712
6757
|
"required": [
|
|
6713
6758
|
"code",
|
|
6714
6759
|
"account_index",
|
|
6760
|
+
"created_at",
|
|
6715
6761
|
"master_account_index",
|
|
6716
6762
|
"account_type",
|
|
6717
6763
|
"name",
|
|
6718
6764
|
"l1_address",
|
|
6719
6765
|
"annual_percentage_yield",
|
|
6766
|
+
"sharpe_ratio",
|
|
6720
6767
|
"status",
|
|
6721
6768
|
"operator_fee",
|
|
6722
6769
|
"total_asset_value",
|
|
@@ -7258,7 +7305,7 @@
|
|
|
7258
7305
|
"ReqGetAssetDetails": {
|
|
7259
7306
|
"type": "object",
|
|
7260
7307
|
"properties": {
|
|
7261
|
-
"
|
|
7308
|
+
"asset_id": {
|
|
7262
7309
|
"type": "integer",
|
|
7263
7310
|
"format": "int16",
|
|
7264
7311
|
"default": "0"
|
|
@@ -8787,9 +8834,6 @@
|
|
|
8787
8834
|
"type": "number",
|
|
8788
8835
|
"format": "double"
|
|
8789
8836
|
}
|
|
8790
|
-
},
|
|
8791
|
-
"market_config": {
|
|
8792
|
-
"$ref": "#/definitions/MarketConfig"
|
|
8793
8837
|
}
|
|
8794
8838
|
},
|
|
8795
8839
|
"title": "SpotOrderBookDetail",
|
|
@@ -8818,8 +8862,7 @@
|
|
|
8818
8862
|
"daily_price_low",
|
|
8819
8863
|
"daily_price_high",
|
|
8820
8864
|
"daily_price_change",
|
|
8821
|
-
"daily_chart"
|
|
8822
|
-
"market_config"
|
|
8865
|
+
"daily_chart"
|
|
8823
8866
|
]
|
|
8824
8867
|
},
|
|
8825
8868
|
"Status": {
|
|
@@ -9141,7 +9184,7 @@
|
|
|
9141
9184
|
"id": {
|
|
9142
9185
|
"type": "string"
|
|
9143
9186
|
},
|
|
9144
|
-
"
|
|
9187
|
+
"asset_id": {
|
|
9145
9188
|
"type": "integer",
|
|
9146
9189
|
"format": "int16",
|
|
9147
9190
|
"example": "1"
|
|
@@ -9163,7 +9206,8 @@
|
|
|
9163
9206
|
"L2BurnSharesInflow",
|
|
9164
9207
|
"L2BurnSharesOutflow",
|
|
9165
9208
|
"L2MintSharesInflow",
|
|
9166
|
-
"L2MintSharesOutflow"
|
|
9209
|
+
"L2MintSharesOutflow",
|
|
9210
|
+
"L2SelfTransfer"
|
|
9167
9211
|
]
|
|
9168
9212
|
},
|
|
9169
9213
|
"from_l1_address": {
|
|
@@ -9184,6 +9228,20 @@
|
|
|
9184
9228
|
"format": "int64",
|
|
9185
9229
|
"example": "1"
|
|
9186
9230
|
},
|
|
9231
|
+
"from_route": {
|
|
9232
|
+
"type": "string",
|
|
9233
|
+
"enum": [
|
|
9234
|
+
"spot",
|
|
9235
|
+
"perps"
|
|
9236
|
+
]
|
|
9237
|
+
},
|
|
9238
|
+
"to_route": {
|
|
9239
|
+
"type": "string",
|
|
9240
|
+
"enum": [
|
|
9241
|
+
"spot",
|
|
9242
|
+
"perps"
|
|
9243
|
+
]
|
|
9244
|
+
},
|
|
9187
9245
|
"tx_hash": {
|
|
9188
9246
|
"type": "string",
|
|
9189
9247
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
@@ -9192,7 +9250,7 @@
|
|
|
9192
9250
|
"title": "TransferHistoryItem",
|
|
9193
9251
|
"required": [
|
|
9194
9252
|
"id",
|
|
9195
|
-
"
|
|
9253
|
+
"asset_id",
|
|
9196
9254
|
"amount",
|
|
9197
9255
|
"timestamp",
|
|
9198
9256
|
"type",
|
|
@@ -9200,6 +9258,8 @@
|
|
|
9200
9258
|
"to_l1_address",
|
|
9201
9259
|
"from_account_index",
|
|
9202
9260
|
"to_account_index",
|
|
9261
|
+
"from_route",
|
|
9262
|
+
"to_route",
|
|
9203
9263
|
"tx_hash"
|
|
9204
9264
|
]
|
|
9205
9265
|
},
|
|
@@ -9277,6 +9337,11 @@
|
|
|
9277
9337
|
"parent_hash": {
|
|
9278
9338
|
"type": "string",
|
|
9279
9339
|
"example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
|
|
9340
|
+
},
|
|
9341
|
+
"api_key_index": {
|
|
9342
|
+
"type": "integer",
|
|
9343
|
+
"format": "uint8",
|
|
9344
|
+
"example": "0"
|
|
9280
9345
|
}
|
|
9281
9346
|
},
|
|
9282
9347
|
"title": "Tx",
|
|
@@ -9295,7 +9360,8 @@
|
|
|
9295
9360
|
"queued_at",
|
|
9296
9361
|
"executed_at",
|
|
9297
9362
|
"sequence_index",
|
|
9298
|
-
"parent_hash"
|
|
9363
|
+
"parent_hash",
|
|
9364
|
+
"api_key_index"
|
|
9299
9365
|
]
|
|
9300
9366
|
},
|
|
9301
9367
|
"TxHash": {
|
|
@@ -9421,7 +9487,7 @@
|
|
|
9421
9487
|
"id": {
|
|
9422
9488
|
"type": "string"
|
|
9423
9489
|
},
|
|
9424
|
-
"
|
|
9490
|
+
"asset_id": {
|
|
9425
9491
|
"type": "integer",
|
|
9426
9492
|
"format": "int16",
|
|
9427
9493
|
"example": "1"
|
|
@@ -9460,7 +9526,7 @@
|
|
|
9460
9526
|
"title": "WithdrawHistoryItem",
|
|
9461
9527
|
"required": [
|
|
9462
9528
|
"id",
|
|
9463
|
-
"
|
|
9529
|
+
"asset_id",
|
|
9464
9530
|
"amount",
|
|
9465
9531
|
"timestamp",
|
|
9466
9532
|
"status",
|