zklighter-perps 1.0.242 → 1.0.244
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/.circleci/openapi_postprocess.py +8 -6
- 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 +24 -0
- package/models/ReqGetTrades.ts +0 -16
- package/models/RiskParameters.ts +35 -8
- package/models/index.ts +1 -0
- package/openapi.json +115 -30
- package/package.json +1 -1
|
@@ -38,21 +38,23 @@ with open(FILE, "r") as f:
|
|
|
38
38
|
else:
|
|
39
39
|
data["paths"][path][method]["operationId"] = "status"
|
|
40
40
|
|
|
41
|
-
# Replace $ref to int16 with inline
|
|
42
|
-
# int16
|
|
43
|
-
# broken
|
|
41
|
+
# Replace $ref to int16 types with inline equivalents across all definitions.
|
|
42
|
+
# int16 and derived map types are not standard OpenAPI and cause the generator
|
|
43
|
+
# to emit broken model references.
|
|
44
44
|
def replace_int16_refs(obj):
|
|
45
45
|
if isinstance(obj, dict):
|
|
46
46
|
if obj.get("$ref") == "#/definitions/int16":
|
|
47
47
|
return {"type": "integer", "format": "int64"}
|
|
48
|
+
if obj.get("$ref") == "#/definitions/mapint16string":
|
|
49
|
+
return {"type": "object", "additionalProperties": {"type": "string"}}
|
|
48
50
|
return {k: replace_int16_refs(v) for k, v in obj.items()}
|
|
49
51
|
if isinstance(obj, list):
|
|
50
52
|
return [replace_int16_refs(i) for i in obj]
|
|
51
53
|
return obj
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
data["definitions"][
|
|
55
|
-
data["definitions"][
|
|
55
|
+
for defn_name in list(data["definitions"]):
|
|
56
|
+
data["definitions"][defn_name] = replace_int16_refs(
|
|
57
|
+
data["definitions"][defn_name]
|
|
56
58
|
)
|
|
57
59
|
|
|
58
60
|
# Fix enum placement for array types: move enum from array level into items
|
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,6 +13,12 @@
|
|
|
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,
|
|
@@ -56,6 +62,18 @@ export interface LiquidationInfo {
|
|
|
56
62
|
* @memberof LiquidationInfo
|
|
57
63
|
*/
|
|
58
64
|
mark_prices: { [key: string]: number; };
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Array<AccountAsset>}
|
|
68
|
+
* @memberof LiquidationInfo
|
|
69
|
+
*/
|
|
70
|
+
assets: Array<AccountAsset>;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {{ [key: string]: string; }}
|
|
74
|
+
* @memberof LiquidationInfo
|
|
75
|
+
*/
|
|
76
|
+
asset_index_prices: { [key: string]: string; };
|
|
59
77
|
}
|
|
60
78
|
|
|
61
79
|
/**
|
|
@@ -66,6 +84,8 @@ export function instanceOfLiquidationInfo(value: object): value is LiquidationIn
|
|
|
66
84
|
if (!('risk_info_before' in value) || value['risk_info_before'] === undefined) return false;
|
|
67
85
|
if (!('risk_info_after' in value) || value['risk_info_after'] === undefined) return false;
|
|
68
86
|
if (!('mark_prices' in value) || value['mark_prices'] === undefined) return false;
|
|
87
|
+
if (!('assets' in value) || value['assets'] === undefined) return false;
|
|
88
|
+
if (!('asset_index_prices' in value) || value['asset_index_prices'] === undefined) return false;
|
|
69
89
|
return true;
|
|
70
90
|
}
|
|
71
91
|
|
|
@@ -83,6 +103,8 @@ export function LiquidationInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
83
103
|
'risk_info_before': RiskInfoFromJSON(json['risk_info_before']),
|
|
84
104
|
'risk_info_after': RiskInfoFromJSON(json['risk_info_after']),
|
|
85
105
|
'mark_prices': json['mark_prices'],
|
|
106
|
+
'assets': ((json['assets'] as Array<any>).map(AccountAssetFromJSON)),
|
|
107
|
+
'asset_index_prices': json['asset_index_prices'],
|
|
86
108
|
};
|
|
87
109
|
}
|
|
88
110
|
|
|
@@ -96,6 +118,8 @@ export function LiquidationInfoToJSON(value?: LiquidationInfo | null): any {
|
|
|
96
118
|
'risk_info_before': RiskInfoToJSON(value['risk_info_before']),
|
|
97
119
|
'risk_info_after': RiskInfoToJSON(value['risk_info_after']),
|
|
98
120
|
'mark_prices': value['mark_prices'],
|
|
121
|
+
'assets': ((value['assets'] as Array<any>).map(AccountAssetToJSON)),
|
|
122
|
+
'asset_index_prices': value['asset_index_prices'],
|
|
99
123
|
};
|
|
100
124
|
}
|
|
101
125
|
|
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,18 @@
|
|
|
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
|
+
"type": "object",
|
|
7664
|
+
"additionalProperties": {
|
|
7665
|
+
"type": "string"
|
|
7666
|
+
}
|
|
7589
7667
|
}
|
|
7590
7668
|
},
|
|
7591
7669
|
"title": "LiquidationInfo",
|
|
@@ -7593,7 +7671,9 @@
|
|
|
7593
7671
|
"positions",
|
|
7594
7672
|
"risk_info_before",
|
|
7595
7673
|
"risk_info_after",
|
|
7596
|
-
"mark_prices"
|
|
7674
|
+
"mark_prices",
|
|
7675
|
+
"assets",
|
|
7676
|
+
"asset_index_prices"
|
|
7597
7677
|
]
|
|
7598
7678
|
},
|
|
7599
7679
|
"LiquidationInfos": {
|
|
@@ -10001,8 +10081,7 @@
|
|
|
10001
10081
|
"properties": {
|
|
10002
10082
|
"asset_id": {
|
|
10003
10083
|
"type": "integer",
|
|
10004
|
-
"format": "int16"
|
|
10005
|
-
"default": "0"
|
|
10084
|
+
"format": "int16"
|
|
10006
10085
|
}
|
|
10007
10086
|
},
|
|
10008
10087
|
"title": "ReqGetAssetDetails"
|
|
@@ -10938,12 +11017,6 @@
|
|
|
10938
11017
|
"type": "boolean",
|
|
10939
11018
|
"format": "boolean",
|
|
10940
11019
|
"default": "false"
|
|
10941
|
-
},
|
|
10942
|
-
"skip_ask_order_id": {
|
|
10943
|
-
"type": "string"
|
|
10944
|
-
},
|
|
10945
|
-
"skip_bid_order_id": {
|
|
10946
|
-
"type": "string"
|
|
10947
11020
|
}
|
|
10948
11021
|
},
|
|
10949
11022
|
"title": "ReqGetTrades",
|
|
@@ -12434,9 +12507,6 @@
|
|
|
12434
12507
|
"type": "integer",
|
|
12435
12508
|
"format": "int16"
|
|
12436
12509
|
},
|
|
12437
|
-
"collateral": {
|
|
12438
|
-
"type": "string"
|
|
12439
|
-
},
|
|
12440
12510
|
"total_account_value": {
|
|
12441
12511
|
"type": "string"
|
|
12442
12512
|
},
|
|
@@ -12448,16 +12518,31 @@
|
|
|
12448
12518
|
},
|
|
12449
12519
|
"close_out_margin_req": {
|
|
12450
12520
|
"type": "string"
|
|
12521
|
+
},
|
|
12522
|
+
"total_account_liquidation_threshold": {
|
|
12523
|
+
"type": "string"
|
|
12524
|
+
},
|
|
12525
|
+
"collateral": {
|
|
12526
|
+
"type": "string"
|
|
12527
|
+
},
|
|
12528
|
+
"usdc_collateral_with_funding": {
|
|
12529
|
+
"type": "string"
|
|
12530
|
+
},
|
|
12531
|
+
"usdc_portfolio_value": {
|
|
12532
|
+
"type": "string"
|
|
12451
12533
|
}
|
|
12452
12534
|
},
|
|
12453
12535
|
"title": "RiskParameters",
|
|
12454
12536
|
"required": [
|
|
12455
12537
|
"market_id",
|
|
12456
|
-
"collateral",
|
|
12457
12538
|
"total_account_value",
|
|
12458
12539
|
"initial_margin_req",
|
|
12459
12540
|
"maintenance_margin_req",
|
|
12460
|
-
"close_out_margin_req"
|
|
12541
|
+
"close_out_margin_req",
|
|
12542
|
+
"total_account_liquidation_threshold",
|
|
12543
|
+
"collateral",
|
|
12544
|
+
"usdc_collateral_with_funding",
|
|
12545
|
+
"usdc_portfolio_value"
|
|
12461
12546
|
]
|
|
12462
12547
|
},
|
|
12463
12548
|
"SharePrice": {
|