zklighter-perps 1.0.242 → 1.0.243
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 +0 -10
- package/models/AccountAsset.ts +29 -0
- package/models/Asset.ts +72 -0
- package/models/LiquidationInfo.ts +30 -0
- package/models/ReqGetTrades.ts +0 -16
- package/models/RiskParameters.ts +35 -8
- package/models/index.ts +1 -0
- package/openapi.json +112 -30
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/apis/OrderApi.ts
CHANGED
|
@@ -144,8 +144,6 @@ export interface TradesRequest {
|
|
|
144
144
|
role?: TradesRoleEnum;
|
|
145
145
|
type?: TradesTypeEnum;
|
|
146
146
|
aggregate?: boolean;
|
|
147
|
-
skip_ask_order_id?: string;
|
|
148
|
-
skip_bid_order_id?: string;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
149
|
/**
|
|
@@ -821,14 +819,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
821
819
|
queryParameters['aggregate'] = requestParameters['aggregate'];
|
|
822
820
|
}
|
|
823
821
|
|
|
824
|
-
if (requestParameters['skip_ask_order_id'] != null) {
|
|
825
|
-
queryParameters['skip_ask_order_id'] = requestParameters['skip_ask_order_id'];
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
if (requestParameters['skip_bid_order_id'] != null) {
|
|
829
|
-
queryParameters['skip_bid_order_id'] = requestParameters['skip_bid_order_id'];
|
|
830
|
-
}
|
|
831
|
-
|
|
832
822
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
833
823
|
|
|
834
824
|
const response = await this.request({
|
package/models/AccountAsset.ts
CHANGED
|
@@ -43,8 +43,31 @@ export interface AccountAsset {
|
|
|
43
43
|
* @memberof AccountAsset
|
|
44
44
|
*/
|
|
45
45
|
locked_balance: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AccountAsset
|
|
50
|
+
*/
|
|
51
|
+
margin_mode: AccountAssetMarginModeEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof AccountAsset
|
|
56
|
+
*/
|
|
57
|
+
margin_balance: string;
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const AccountAssetMarginModeEnum = {
|
|
65
|
+
Enabled: 'enabled',
|
|
66
|
+
Disabled: 'disabled'
|
|
67
|
+
} as const;
|
|
68
|
+
export type AccountAssetMarginModeEnum = typeof AccountAssetMarginModeEnum[keyof typeof AccountAssetMarginModeEnum];
|
|
69
|
+
|
|
70
|
+
|
|
48
71
|
/**
|
|
49
72
|
* Check if a given object implements the AccountAsset interface.
|
|
50
73
|
*/
|
|
@@ -53,6 +76,8 @@ export function instanceOfAccountAsset(value: object): value is AccountAsset {
|
|
|
53
76
|
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
54
77
|
if (!('balance' in value) || value['balance'] === undefined) return false;
|
|
55
78
|
if (!('locked_balance' in value) || value['locked_balance'] === undefined) return false;
|
|
79
|
+
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
80
|
+
if (!('margin_balance' in value) || value['margin_balance'] === undefined) return false;
|
|
56
81
|
return true;
|
|
57
82
|
}
|
|
58
83
|
|
|
@@ -70,6 +95,8 @@ export function AccountAssetFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
70
95
|
'asset_id': json['asset_id'],
|
|
71
96
|
'balance': json['balance'],
|
|
72
97
|
'locked_balance': json['locked_balance'],
|
|
98
|
+
'margin_mode': json['margin_mode'],
|
|
99
|
+
'margin_balance': json['margin_balance'],
|
|
73
100
|
};
|
|
74
101
|
}
|
|
75
102
|
|
|
@@ -83,6 +110,8 @@ export function AccountAssetToJSON(value?: AccountAsset | null): any {
|
|
|
83
110
|
'asset_id': value['asset_id'],
|
|
84
111
|
'balance': value['balance'],
|
|
85
112
|
'locked_balance': value['locked_balance'],
|
|
113
|
+
'margin_mode': value['margin_mode'],
|
|
114
|
+
'margin_balance': value['margin_balance'],
|
|
86
115
|
};
|
|
87
116
|
}
|
|
88
117
|
|
package/models/Asset.ts
CHANGED
|
@@ -67,12 +67,60 @@ export interface Asset {
|
|
|
67
67
|
* @memberof Asset
|
|
68
68
|
*/
|
|
69
69
|
index_price: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof Asset
|
|
74
|
+
*/
|
|
75
|
+
price_decimals: number;
|
|
70
76
|
/**
|
|
71
77
|
*
|
|
72
78
|
* @type {string}
|
|
73
79
|
* @memberof Asset
|
|
74
80
|
*/
|
|
75
81
|
l1_address: string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof Asset
|
|
86
|
+
*/
|
|
87
|
+
loan_to_value: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Asset
|
|
92
|
+
*/
|
|
93
|
+
liquidation_threshold: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @memberof Asset
|
|
98
|
+
*/
|
|
99
|
+
liquidation_factor: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof Asset
|
|
104
|
+
*/
|
|
105
|
+
liquidation_fee: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof Asset
|
|
110
|
+
*/
|
|
111
|
+
global_supply_cap: string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Asset
|
|
116
|
+
*/
|
|
117
|
+
user_supply_cap: string;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {string}
|
|
121
|
+
* @memberof Asset
|
|
122
|
+
*/
|
|
123
|
+
total_supplied: string;
|
|
76
124
|
}
|
|
77
125
|
|
|
78
126
|
|
|
@@ -98,7 +146,15 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
98
146
|
if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false;
|
|
99
147
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
100
148
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
149
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
101
150
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
151
|
+
if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
|
|
152
|
+
if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
|
|
153
|
+
if (!('liquidation_factor' in value) || value['liquidation_factor'] === undefined) return false;
|
|
154
|
+
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
155
|
+
if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
|
|
156
|
+
if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
|
|
157
|
+
if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
|
|
102
158
|
return true;
|
|
103
159
|
}
|
|
104
160
|
|
|
@@ -120,7 +176,15 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
120
176
|
'min_withdrawal_amount': json['min_withdrawal_amount'],
|
|
121
177
|
'margin_mode': json['margin_mode'],
|
|
122
178
|
'index_price': json['index_price'],
|
|
179
|
+
'price_decimals': json['price_decimals'],
|
|
123
180
|
'l1_address': json['l1_address'],
|
|
181
|
+
'loan_to_value': json['loan_to_value'],
|
|
182
|
+
'liquidation_threshold': json['liquidation_threshold'],
|
|
183
|
+
'liquidation_factor': json['liquidation_factor'],
|
|
184
|
+
'liquidation_fee': json['liquidation_fee'],
|
|
185
|
+
'global_supply_cap': json['global_supply_cap'],
|
|
186
|
+
'user_supply_cap': json['user_supply_cap'],
|
|
187
|
+
'total_supplied': json['total_supplied'],
|
|
124
188
|
};
|
|
125
189
|
}
|
|
126
190
|
|
|
@@ -138,7 +202,15 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
138
202
|
'min_withdrawal_amount': value['min_withdrawal_amount'],
|
|
139
203
|
'margin_mode': value['margin_mode'],
|
|
140
204
|
'index_price': value['index_price'],
|
|
205
|
+
'price_decimals': value['price_decimals'],
|
|
141
206
|
'l1_address': value['l1_address'],
|
|
207
|
+
'loan_to_value': value['loan_to_value'],
|
|
208
|
+
'liquidation_threshold': value['liquidation_threshold'],
|
|
209
|
+
'liquidation_factor': value['liquidation_factor'],
|
|
210
|
+
'liquidation_fee': value['liquidation_fee'],
|
|
211
|
+
'global_supply_cap': value['global_supply_cap'],
|
|
212
|
+
'user_supply_cap': value['user_supply_cap'],
|
|
213
|
+
'total_supplied': value['total_supplied'],
|
|
142
214
|
};
|
|
143
215
|
}
|
|
144
216
|
|
|
@@ -13,12 +13,24 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { AccountAsset } from './AccountAsset';
|
|
17
|
+
import {
|
|
18
|
+
AccountAssetFromJSON,
|
|
19
|
+
AccountAssetFromJSONTyped,
|
|
20
|
+
AccountAssetToJSON,
|
|
21
|
+
} from './AccountAsset';
|
|
16
22
|
import type { AccountPosition } from './AccountPosition';
|
|
17
23
|
import {
|
|
18
24
|
AccountPositionFromJSON,
|
|
19
25
|
AccountPositionFromJSONTyped,
|
|
20
26
|
AccountPositionToJSON,
|
|
21
27
|
} from './AccountPosition';
|
|
28
|
+
import type { Mapint16string } from './Mapint16string';
|
|
29
|
+
import {
|
|
30
|
+
Mapint16stringFromJSON,
|
|
31
|
+
Mapint16stringFromJSONTyped,
|
|
32
|
+
Mapint16stringToJSON,
|
|
33
|
+
} from './Mapint16string';
|
|
22
34
|
import type { RiskInfo } from './RiskInfo';
|
|
23
35
|
import {
|
|
24
36
|
RiskInfoFromJSON,
|
|
@@ -56,6 +68,18 @@ export interface LiquidationInfo {
|
|
|
56
68
|
* @memberof LiquidationInfo
|
|
57
69
|
*/
|
|
58
70
|
mark_prices: { [key: string]: number; };
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {Array<AccountAsset>}
|
|
74
|
+
* @memberof LiquidationInfo
|
|
75
|
+
*/
|
|
76
|
+
assets: Array<AccountAsset>;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Mapint16string}
|
|
80
|
+
* @memberof LiquidationInfo
|
|
81
|
+
*/
|
|
82
|
+
asset_index_prices: Mapint16string;
|
|
59
83
|
}
|
|
60
84
|
|
|
61
85
|
/**
|
|
@@ -66,6 +90,8 @@ export function instanceOfLiquidationInfo(value: object): value is LiquidationIn
|
|
|
66
90
|
if (!('risk_info_before' in value) || value['risk_info_before'] === undefined) return false;
|
|
67
91
|
if (!('risk_info_after' in value) || value['risk_info_after'] === undefined) return false;
|
|
68
92
|
if (!('mark_prices' in value) || value['mark_prices'] === undefined) return false;
|
|
93
|
+
if (!('assets' in value) || value['assets'] === undefined) return false;
|
|
94
|
+
if (!('asset_index_prices' in value) || value['asset_index_prices'] === undefined) return false;
|
|
69
95
|
return true;
|
|
70
96
|
}
|
|
71
97
|
|
|
@@ -83,6 +109,8 @@ export function LiquidationInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
83
109
|
'risk_info_before': RiskInfoFromJSON(json['risk_info_before']),
|
|
84
110
|
'risk_info_after': RiskInfoFromJSON(json['risk_info_after']),
|
|
85
111
|
'mark_prices': json['mark_prices'],
|
|
112
|
+
'assets': ((json['assets'] as Array<any>).map(AccountAssetFromJSON)),
|
|
113
|
+
'asset_index_prices': Mapint16stringFromJSON(json['asset_index_prices']),
|
|
86
114
|
};
|
|
87
115
|
}
|
|
88
116
|
|
|
@@ -96,6 +124,8 @@ export function LiquidationInfoToJSON(value?: LiquidationInfo | null): any {
|
|
|
96
124
|
'risk_info_before': RiskInfoToJSON(value['risk_info_before']),
|
|
97
125
|
'risk_info_after': RiskInfoToJSON(value['risk_info_after']),
|
|
98
126
|
'mark_prices': value['mark_prices'],
|
|
127
|
+
'assets': ((value['assets'] as Array<any>).map(AccountAssetToJSON)),
|
|
128
|
+
'asset_index_prices': Mapint16stringToJSON(value['asset_index_prices']),
|
|
99
129
|
};
|
|
100
130
|
}
|
|
101
131
|
|
package/models/ReqGetTrades.ts
CHANGED
|
@@ -103,18 +103,6 @@ export interface ReqGetTrades {
|
|
|
103
103
|
* @memberof ReqGetTrades
|
|
104
104
|
*/
|
|
105
105
|
aggregate?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @type {string}
|
|
109
|
-
* @memberof ReqGetTrades
|
|
110
|
-
*/
|
|
111
|
-
skip_ask_order_id?: string;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @type {string}
|
|
115
|
-
* @memberof ReqGetTrades
|
|
116
|
-
*/
|
|
117
|
-
skip_bid_order_id?: string;
|
|
118
106
|
}
|
|
119
107
|
|
|
120
108
|
|
|
@@ -202,8 +190,6 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
202
190
|
'type': json['type'] == null ? undefined : json['type'],
|
|
203
191
|
'limit': json['limit'],
|
|
204
192
|
'aggregate': json['aggregate'] == null ? undefined : json['aggregate'],
|
|
205
|
-
'skip_ask_order_id': json['skip_ask_order_id'] == null ? undefined : json['skip_ask_order_id'],
|
|
206
|
-
'skip_bid_order_id': json['skip_bid_order_id'] == null ? undefined : json['skip_bid_order_id'],
|
|
207
193
|
};
|
|
208
194
|
}
|
|
209
195
|
|
|
@@ -227,8 +213,6 @@ export function ReqGetTradesToJSON(value?: ReqGetTrades | null): any {
|
|
|
227
213
|
'type': value['type'],
|
|
228
214
|
'limit': value['limit'],
|
|
229
215
|
'aggregate': value['aggregate'],
|
|
230
|
-
'skip_ask_order_id': value['skip_ask_order_id'],
|
|
231
|
-
'skip_bid_order_id': value['skip_bid_order_id'],
|
|
232
216
|
};
|
|
233
217
|
}
|
|
234
218
|
|
package/models/RiskParameters.ts
CHANGED
|
@@ -30,31 +30,49 @@ export interface RiskParameters {
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof RiskParameters
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
total_account_value: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof RiskParameters
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
initial_margin_req: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {string}
|
|
43
43
|
* @memberof RiskParameters
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
maintenance_margin_req: string;
|
|
46
46
|
/**
|
|
47
47
|
*
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof RiskParameters
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
close_out_margin_req: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof RiskParameters
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
total_account_liquidation_threshold: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof RiskParameters
|
|
62
|
+
*/
|
|
63
|
+
collateral: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof RiskParameters
|
|
68
|
+
*/
|
|
69
|
+
usdc_collateral_with_funding: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof RiskParameters
|
|
74
|
+
*/
|
|
75
|
+
usdc_portfolio_value: string;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
/**
|
|
@@ -62,11 +80,14 @@ export interface RiskParameters {
|
|
|
62
80
|
*/
|
|
63
81
|
export function instanceOfRiskParameters(value: object): value is RiskParameters {
|
|
64
82
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
65
|
-
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
66
83
|
if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
|
|
67
84
|
if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
|
|
68
85
|
if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
|
|
69
86
|
if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
|
|
87
|
+
if (!('total_account_liquidation_threshold' in value) || value['total_account_liquidation_threshold'] === undefined) return false;
|
|
88
|
+
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
89
|
+
if (!('usdc_collateral_with_funding' in value) || value['usdc_collateral_with_funding'] === undefined) return false;
|
|
90
|
+
if (!('usdc_portfolio_value' in value) || value['usdc_portfolio_value'] === undefined) return false;
|
|
70
91
|
return true;
|
|
71
92
|
}
|
|
72
93
|
|
|
@@ -81,11 +102,14 @@ export function RiskParametersFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
81
102
|
return {
|
|
82
103
|
|
|
83
104
|
'market_id': json['market_id'],
|
|
84
|
-
'collateral': json['collateral'],
|
|
85
105
|
'total_account_value': json['total_account_value'],
|
|
86
106
|
'initial_margin_req': json['initial_margin_req'],
|
|
87
107
|
'maintenance_margin_req': json['maintenance_margin_req'],
|
|
88
108
|
'close_out_margin_req': json['close_out_margin_req'],
|
|
109
|
+
'total_account_liquidation_threshold': json['total_account_liquidation_threshold'],
|
|
110
|
+
'collateral': json['collateral'],
|
|
111
|
+
'usdc_collateral_with_funding': json['usdc_collateral_with_funding'],
|
|
112
|
+
'usdc_portfolio_value': json['usdc_portfolio_value'],
|
|
89
113
|
};
|
|
90
114
|
}
|
|
91
115
|
|
|
@@ -96,11 +120,14 @@ export function RiskParametersToJSON(value?: RiskParameters | null): any {
|
|
|
96
120
|
return {
|
|
97
121
|
|
|
98
122
|
'market_id': value['market_id'],
|
|
99
|
-
'collateral': value['collateral'],
|
|
100
123
|
'total_account_value': value['total_account_value'],
|
|
101
124
|
'initial_margin_req': value['initial_margin_req'],
|
|
102
125
|
'maintenance_margin_req': value['maintenance_margin_req'],
|
|
103
126
|
'close_out_margin_req': value['close_out_margin_req'],
|
|
127
|
+
'total_account_liquidation_threshold': value['total_account_liquidation_threshold'],
|
|
128
|
+
'collateral': value['collateral'],
|
|
129
|
+
'usdc_collateral_with_funding': value['usdc_collateral_with_funding'],
|
|
130
|
+
'usdc_portfolio_value': value['usdc_portfolio_value'],
|
|
104
131
|
};
|
|
105
132
|
}
|
|
106
133
|
|
package/models/index.ts
CHANGED
package/openapi.json
CHANGED
|
@@ -689,8 +689,7 @@
|
|
|
689
689
|
"in": "query",
|
|
690
690
|
"required": false,
|
|
691
691
|
"type": "integer",
|
|
692
|
-
"format": "int16"
|
|
693
|
-
"default": "0"
|
|
692
|
+
"format": "int16"
|
|
694
693
|
}
|
|
695
694
|
],
|
|
696
695
|
"tags": [
|
|
@@ -4300,18 +4299,6 @@
|
|
|
4300
4299
|
"type": "boolean",
|
|
4301
4300
|
"format": "boolean",
|
|
4302
4301
|
"default": "false"
|
|
4303
|
-
},
|
|
4304
|
-
{
|
|
4305
|
-
"name": "skip_ask_order_id",
|
|
4306
|
-
"in": "query",
|
|
4307
|
-
"required": false,
|
|
4308
|
-
"type": "string"
|
|
4309
|
-
},
|
|
4310
|
-
{
|
|
4311
|
-
"name": "skip_bid_order_id",
|
|
4312
|
-
"in": "query",
|
|
4313
|
-
"required": false,
|
|
4314
|
-
"type": "string"
|
|
4315
4302
|
}
|
|
4316
4303
|
],
|
|
4317
4304
|
"tags": [
|
|
@@ -4824,6 +4811,18 @@
|
|
|
4824
4811
|
"locked_balance": {
|
|
4825
4812
|
"type": "string",
|
|
4826
4813
|
"example": "1000"
|
|
4814
|
+
},
|
|
4815
|
+
"margin_mode": {
|
|
4816
|
+
"type": "string",
|
|
4817
|
+
"example": "enabled",
|
|
4818
|
+
"enum": [
|
|
4819
|
+
"enabled",
|
|
4820
|
+
"disabled"
|
|
4821
|
+
]
|
|
4822
|
+
},
|
|
4823
|
+
"margin_balance": {
|
|
4824
|
+
"type": "string",
|
|
4825
|
+
"example": "1000"
|
|
4827
4826
|
}
|
|
4828
4827
|
},
|
|
4829
4828
|
"title": "AccountAsset",
|
|
@@ -4831,7 +4830,9 @@
|
|
|
4831
4830
|
"symbol",
|
|
4832
4831
|
"asset_id",
|
|
4833
4832
|
"balance",
|
|
4834
|
-
"locked_balance"
|
|
4833
|
+
"locked_balance",
|
|
4834
|
+
"margin_mode",
|
|
4835
|
+
"margin_balance"
|
|
4835
4836
|
]
|
|
4836
4837
|
},
|
|
4837
4838
|
"AccountLimits": {
|
|
@@ -5583,9 +5584,42 @@
|
|
|
5583
5584
|
"type": "string",
|
|
5584
5585
|
"example": "3024.66"
|
|
5585
5586
|
},
|
|
5587
|
+
"price_decimals": {
|
|
5588
|
+
"type": "integer",
|
|
5589
|
+
"format": "uint8",
|
|
5590
|
+
"example": "4"
|
|
5591
|
+
},
|
|
5586
5592
|
"l1_address": {
|
|
5587
5593
|
"type": "string",
|
|
5588
5594
|
"example": "0x0000000000000000000000000000000000000000"
|
|
5595
|
+
},
|
|
5596
|
+
"loan_to_value": {
|
|
5597
|
+
"type": "string",
|
|
5598
|
+
"example": "0.5"
|
|
5599
|
+
},
|
|
5600
|
+
"liquidation_threshold": {
|
|
5601
|
+
"type": "string",
|
|
5602
|
+
"example": "0.8"
|
|
5603
|
+
},
|
|
5604
|
+
"liquidation_factor": {
|
|
5605
|
+
"type": "string",
|
|
5606
|
+
"example": "0.9"
|
|
5607
|
+
},
|
|
5608
|
+
"liquidation_fee": {
|
|
5609
|
+
"type": "string",
|
|
5610
|
+
"example": "0.01"
|
|
5611
|
+
},
|
|
5612
|
+
"global_supply_cap": {
|
|
5613
|
+
"type": "string",
|
|
5614
|
+
"example": "1000000"
|
|
5615
|
+
},
|
|
5616
|
+
"user_supply_cap": {
|
|
5617
|
+
"type": "string",
|
|
5618
|
+
"example": "1000"
|
|
5619
|
+
},
|
|
5620
|
+
"total_supplied": {
|
|
5621
|
+
"type": "string",
|
|
5622
|
+
"example": "100"
|
|
5589
5623
|
}
|
|
5590
5624
|
},
|
|
5591
5625
|
"title": "Asset",
|
|
@@ -5598,7 +5632,15 @@
|
|
|
5598
5632
|
"min_withdrawal_amount",
|
|
5599
5633
|
"margin_mode",
|
|
5600
5634
|
"index_price",
|
|
5601
|
-
"
|
|
5635
|
+
"price_decimals",
|
|
5636
|
+
"l1_address",
|
|
5637
|
+
"loan_to_value",
|
|
5638
|
+
"liquidation_threshold",
|
|
5639
|
+
"liquidation_factor",
|
|
5640
|
+
"liquidation_fee",
|
|
5641
|
+
"global_supply_cap",
|
|
5642
|
+
"user_supply_cap",
|
|
5643
|
+
"total_supplied"
|
|
5602
5644
|
]
|
|
5603
5645
|
},
|
|
5604
5646
|
"AssetDetails": {
|
|
@@ -5625,6 +5667,30 @@
|
|
|
5625
5667
|
"asset_details"
|
|
5626
5668
|
]
|
|
5627
5669
|
},
|
|
5670
|
+
"AssetStats": {
|
|
5671
|
+
"type": "object",
|
|
5672
|
+
"properties": {
|
|
5673
|
+
"asset_id": {
|
|
5674
|
+
"type": "integer",
|
|
5675
|
+
"format": "int16",
|
|
5676
|
+
"example": "1"
|
|
5677
|
+
},
|
|
5678
|
+
"index_price": {
|
|
5679
|
+
"type": "string",
|
|
5680
|
+
"example": "3024.66"
|
|
5681
|
+
},
|
|
5682
|
+
"total_supplied": {
|
|
5683
|
+
"type": "string",
|
|
5684
|
+
"example": "100"
|
|
5685
|
+
}
|
|
5686
|
+
},
|
|
5687
|
+
"title": "AssetStats",
|
|
5688
|
+
"required": [
|
|
5689
|
+
"asset_id",
|
|
5690
|
+
"index_price",
|
|
5691
|
+
"total_supplied"
|
|
5692
|
+
]
|
|
5693
|
+
},
|
|
5628
5694
|
"Auth": {
|
|
5629
5695
|
"type": "object",
|
|
5630
5696
|
"properties": {
|
|
@@ -7586,6 +7652,15 @@
|
|
|
7586
7652
|
"type": "number",
|
|
7587
7653
|
"format": "double"
|
|
7588
7654
|
}
|
|
7655
|
+
},
|
|
7656
|
+
"assets": {
|
|
7657
|
+
"type": "array",
|
|
7658
|
+
"items": {
|
|
7659
|
+
"$ref": "#/definitions/AccountAsset"
|
|
7660
|
+
}
|
|
7661
|
+
},
|
|
7662
|
+
"asset_index_prices": {
|
|
7663
|
+
"$ref": "#/definitions/mapint16string"
|
|
7589
7664
|
}
|
|
7590
7665
|
},
|
|
7591
7666
|
"title": "LiquidationInfo",
|
|
@@ -7593,7 +7668,9 @@
|
|
|
7593
7668
|
"positions",
|
|
7594
7669
|
"risk_info_before",
|
|
7595
7670
|
"risk_info_after",
|
|
7596
|
-
"mark_prices"
|
|
7671
|
+
"mark_prices",
|
|
7672
|
+
"assets",
|
|
7673
|
+
"asset_index_prices"
|
|
7597
7674
|
]
|
|
7598
7675
|
},
|
|
7599
7676
|
"LiquidationInfos": {
|
|
@@ -10001,8 +10078,7 @@
|
|
|
10001
10078
|
"properties": {
|
|
10002
10079
|
"asset_id": {
|
|
10003
10080
|
"type": "integer",
|
|
10004
|
-
"format": "int16"
|
|
10005
|
-
"default": "0"
|
|
10081
|
+
"format": "int16"
|
|
10006
10082
|
}
|
|
10007
10083
|
},
|
|
10008
10084
|
"title": "ReqGetAssetDetails"
|
|
@@ -10938,12 +11014,6 @@
|
|
|
10938
11014
|
"type": "boolean",
|
|
10939
11015
|
"format": "boolean",
|
|
10940
11016
|
"default": "false"
|
|
10941
|
-
},
|
|
10942
|
-
"skip_ask_order_id": {
|
|
10943
|
-
"type": "string"
|
|
10944
|
-
},
|
|
10945
|
-
"skip_bid_order_id": {
|
|
10946
|
-
"type": "string"
|
|
10947
11017
|
}
|
|
10948
11018
|
},
|
|
10949
11019
|
"title": "ReqGetTrades",
|
|
@@ -12434,9 +12504,6 @@
|
|
|
12434
12504
|
"type": "integer",
|
|
12435
12505
|
"format": "int16"
|
|
12436
12506
|
},
|
|
12437
|
-
"collateral": {
|
|
12438
|
-
"type": "string"
|
|
12439
|
-
},
|
|
12440
12507
|
"total_account_value": {
|
|
12441
12508
|
"type": "string"
|
|
12442
12509
|
},
|
|
@@ -12448,16 +12515,31 @@
|
|
|
12448
12515
|
},
|
|
12449
12516
|
"close_out_margin_req": {
|
|
12450
12517
|
"type": "string"
|
|
12518
|
+
},
|
|
12519
|
+
"total_account_liquidation_threshold": {
|
|
12520
|
+
"type": "string"
|
|
12521
|
+
},
|
|
12522
|
+
"collateral": {
|
|
12523
|
+
"type": "string"
|
|
12524
|
+
},
|
|
12525
|
+
"usdc_collateral_with_funding": {
|
|
12526
|
+
"type": "string"
|
|
12527
|
+
},
|
|
12528
|
+
"usdc_portfolio_value": {
|
|
12529
|
+
"type": "string"
|
|
12451
12530
|
}
|
|
12452
12531
|
},
|
|
12453
12532
|
"title": "RiskParameters",
|
|
12454
12533
|
"required": [
|
|
12455
12534
|
"market_id",
|
|
12456
|
-
"collateral",
|
|
12457
12535
|
"total_account_value",
|
|
12458
12536
|
"initial_margin_req",
|
|
12459
12537
|
"maintenance_margin_req",
|
|
12460
|
-
"close_out_margin_req"
|
|
12538
|
+
"close_out_margin_req",
|
|
12539
|
+
"total_account_liquidation_threshold",
|
|
12540
|
+
"collateral",
|
|
12541
|
+
"usdc_collateral_with_funding",
|
|
12542
|
+
"usdc_portfolio_value"
|
|
12461
12543
|
]
|
|
12462
12544
|
},
|
|
12463
12545
|
"SharePrice": {
|