zklighter-perps 1.0.234 → 1.0.235
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 -2
- package/apis/AccountApi.ts +0 -96
- package/apis/OrderApi.ts +0 -42
- package/models/AccountAsset.ts +29 -0
- package/models/Asset.ts +63 -0
- package/models/AssetStats.ts +70 -0
- package/models/MarketConfig.ts +0 -9
- package/models/RFQEntry.ts +0 -15
- package/models/RFQResponseEntry.ts +1 -13
- package/models/ReqGetAccountActiveOrders.ts +0 -20
- package/models/ReqGetAccountInactiveOrders.ts +0 -20
- package/models/ReqGetTrades.ts +0 -18
- package/models/RespCreateRFQ.ts +0 -15
- package/models/RespGetRFQ.ts +0 -15
- package/models/RespRespondToRFQ.ts +0 -15
- package/models/index.ts +1 -2
- package/openapi.json +75 -259
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -37,6 +37,7 @@ models/ApiToken.ts
|
|
|
37
37
|
models/ApprovedIntegrator.ts
|
|
38
38
|
models/Asset.ts
|
|
39
39
|
models/AssetDetails.ts
|
|
40
|
+
models/AssetStats.ts
|
|
40
41
|
models/Auth.ts
|
|
41
42
|
models/Block.ts
|
|
42
43
|
models/Blocks.ts
|
|
@@ -107,7 +108,6 @@ models/PublicPoolMetadata.ts
|
|
|
107
108
|
models/PublicPoolShare.ts
|
|
108
109
|
models/PushNotifDeliveryResult.ts
|
|
109
110
|
models/RFQEntry.ts
|
|
110
|
-
models/RFQMetadata.ts
|
|
111
111
|
models/RFQResponseEntry.ts
|
|
112
112
|
models/Referral.ts
|
|
113
113
|
models/ReferralCode.ts
|
|
@@ -191,7 +191,6 @@ models/RespSendTx.ts
|
|
|
191
191
|
models/RespSendTxBatch.ts
|
|
192
192
|
models/RespSetMakerOnlyApiKeys.ts
|
|
193
193
|
models/RespUpdateKickback.ts
|
|
194
|
-
models/RespUpdateRFQ.ts
|
|
195
194
|
models/RespUpdateReferralCode.ts
|
|
196
195
|
models/RespWithdrawalDelay.ts
|
|
197
196
|
models/ResultCode.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -39,7 +39,6 @@ import type {
|
|
|
39
39
|
RespRespondToRFQ,
|
|
40
40
|
RespRevokeApiToken,
|
|
41
41
|
RespSetMakerOnlyApiKeys,
|
|
42
|
-
RespUpdateRFQ,
|
|
43
42
|
ResultCode,
|
|
44
43
|
SubAccounts,
|
|
45
44
|
TxHash,
|
|
@@ -93,8 +92,6 @@ import {
|
|
|
93
92
|
RespRevokeApiTokenToJSON,
|
|
94
93
|
RespSetMakerOnlyApiKeysFromJSON,
|
|
95
94
|
RespSetMakerOnlyApiKeysToJSON,
|
|
96
|
-
RespUpdateRFQFromJSON,
|
|
97
|
-
RespUpdateRFQToJSON,
|
|
98
95
|
ResultCodeFromJSON,
|
|
99
96
|
ResultCodeToJSON,
|
|
100
97
|
SubAccountsFromJSON,
|
|
@@ -242,7 +239,6 @@ export interface RfqCreateRequest {
|
|
|
242
239
|
direction: number;
|
|
243
240
|
authorization?: string;
|
|
244
241
|
auth?: string;
|
|
245
|
-
metadata?: string;
|
|
246
242
|
}
|
|
247
243
|
|
|
248
244
|
export interface RfqGetRequest {
|
|
@@ -267,13 +263,6 @@ export interface RfqRespondRequest {
|
|
|
267
263
|
auth?: string;
|
|
268
264
|
}
|
|
269
265
|
|
|
270
|
-
export interface RfqUpdateRequest {
|
|
271
|
-
rfq_id: number;
|
|
272
|
-
status: RfqUpdateStatusEnum;
|
|
273
|
-
authorization?: string;
|
|
274
|
-
auth?: string;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
266
|
export interface SetMakerOnlyApiKeysRequest {
|
|
278
267
|
account_index: number;
|
|
279
268
|
api_key_indexes: string;
|
|
@@ -1524,10 +1513,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1524
1513
|
formParams.append('direction', requestParameters['direction'] as any);
|
|
1525
1514
|
}
|
|
1526
1515
|
|
|
1527
|
-
if (requestParameters['metadata'] != null) {
|
|
1528
|
-
formParams.append('metadata', requestParameters['metadata'] as any);
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
1516
|
const response = await this.request({
|
|
1532
1517
|
path: `/api/v1/rfq/create`,
|
|
1533
1518
|
method: 'POST',
|
|
@@ -1720,79 +1705,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1720
1705
|
return await response.value();
|
|
1721
1706
|
}
|
|
1722
1707
|
|
|
1723
|
-
/**
|
|
1724
|
-
* Update RFQ status
|
|
1725
|
-
* rfq_update
|
|
1726
|
-
*/
|
|
1727
|
-
async rfqUpdateRaw(requestParameters: RfqUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespUpdateRFQ>> {
|
|
1728
|
-
if (requestParameters['rfq_id'] == null) {
|
|
1729
|
-
throw new runtime.RequiredError(
|
|
1730
|
-
'rfq_id',
|
|
1731
|
-
'Required parameter "rfq_id" was null or undefined when calling rfqUpdate().'
|
|
1732
|
-
);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
if (requestParameters['status'] == null) {
|
|
1736
|
-
throw new runtime.RequiredError(
|
|
1737
|
-
'status',
|
|
1738
|
-
'Required parameter "status" was null or undefined when calling rfqUpdate().'
|
|
1739
|
-
);
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
const queryParameters: any = {};
|
|
1743
|
-
|
|
1744
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
1745
|
-
|
|
1746
|
-
if (requestParameters['authorization'] != null) {
|
|
1747
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
const consumes: runtime.Consume[] = [
|
|
1751
|
-
{ contentType: 'multipart/form-data' },
|
|
1752
|
-
];
|
|
1753
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
1754
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
1755
|
-
|
|
1756
|
-
let formParams: { append(param: string, value: any): any };
|
|
1757
|
-
let useForm = false;
|
|
1758
|
-
if (useForm) {
|
|
1759
|
-
formParams = new FormData();
|
|
1760
|
-
} else {
|
|
1761
|
-
formParams = new URLSearchParams();
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
if (requestParameters['auth'] != null) {
|
|
1765
|
-
formParams.append('auth', requestParameters['auth'] as any);
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
if (requestParameters['rfq_id'] != null) {
|
|
1769
|
-
formParams.append('rfq_id', requestParameters['rfq_id'] as any);
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
if (requestParameters['status'] != null) {
|
|
1773
|
-
formParams.append('status', requestParameters['status'] as any);
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
const response = await this.request({
|
|
1777
|
-
path: `/api/v1/rfq/update`,
|
|
1778
|
-
method: 'POST',
|
|
1779
|
-
headers: headerParameters,
|
|
1780
|
-
query: queryParameters,
|
|
1781
|
-
body: formParams,
|
|
1782
|
-
}, initOverrides);
|
|
1783
|
-
|
|
1784
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => RespUpdateRFQFromJSON(jsonValue));
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
/**
|
|
1788
|
-
* Update RFQ status
|
|
1789
|
-
* rfq_update
|
|
1790
|
-
*/
|
|
1791
|
-
async rfqUpdate(requestParameters: RfqUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespUpdateRFQ> {
|
|
1792
|
-
const response = await this.rfqUpdateRaw(requestParameters, initOverrides);
|
|
1793
|
-
return await response.value();
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
1708
|
/**
|
|
1797
1709
|
* Set maker-only API key indexes
|
|
1798
1710
|
* setMakerOnlyApiKeys
|
|
@@ -2157,11 +2069,3 @@ export const RfqRespondStatusEnum = {
|
|
|
2157
2069
|
NotInterested: 'not_interested'
|
|
2158
2070
|
} as const;
|
|
2159
2071
|
export type RfqRespondStatusEnum = typeof RfqRespondStatusEnum[keyof typeof RfqRespondStatusEnum];
|
|
2160
|
-
/**
|
|
2161
|
-
* @export
|
|
2162
|
-
*/
|
|
2163
|
-
export const RfqUpdateStatusEnum = {
|
|
2164
|
-
OrderCreated: 'order_created',
|
|
2165
|
-
Closed: 'closed'
|
|
2166
|
-
} as const;
|
|
2167
|
-
export type RfqUpdateStatusEnum = typeof RfqUpdateStatusEnum[keyof typeof RfqUpdateStatusEnum];
|
package/apis/OrderApi.ts
CHANGED
|
@@ -70,7 +70,6 @@ export interface AccountActiveOrdersRequest {
|
|
|
70
70
|
authorization?: string;
|
|
71
71
|
auth?: string;
|
|
72
72
|
market_id?: number;
|
|
73
|
-
market_type?: AccountActiveOrdersMarketTypeEnum;
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
export interface AccountInactiveOrdersRequest {
|
|
@@ -79,7 +78,6 @@ export interface AccountInactiveOrdersRequest {
|
|
|
79
78
|
authorization?: string;
|
|
80
79
|
auth?: string;
|
|
81
80
|
market_id?: number;
|
|
82
|
-
market_type?: AccountInactiveOrdersMarketTypeEnum;
|
|
83
81
|
ask_filter?: number;
|
|
84
82
|
between_timestamps?: string;
|
|
85
83
|
cursor?: string;
|
|
@@ -126,7 +124,6 @@ export interface TradesRequest {
|
|
|
126
124
|
authorization?: string;
|
|
127
125
|
auth?: string;
|
|
128
126
|
market_id?: number;
|
|
129
|
-
market_type?: TradesMarketTypeEnum;
|
|
130
127
|
account_index?: number;
|
|
131
128
|
order_index?: number;
|
|
132
129
|
sort_dir?: TradesSortDirEnum;
|
|
@@ -248,10 +245,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
248
245
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
249
246
|
}
|
|
250
247
|
|
|
251
|
-
if (requestParameters['market_type'] != null) {
|
|
252
|
-
queryParameters['market_type'] = requestParameters['market_type'];
|
|
253
|
-
}
|
|
254
|
-
|
|
255
248
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
256
249
|
|
|
257
250
|
const response = await this.request({
|
|
@@ -310,10 +303,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
310
303
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
311
304
|
}
|
|
312
305
|
|
|
313
|
-
if (requestParameters['market_type'] != null) {
|
|
314
|
-
queryParameters['market_type'] = requestParameters['market_type'];
|
|
315
|
-
}
|
|
316
|
-
|
|
317
306
|
if (requestParameters['ask_filter'] != null) {
|
|
318
307
|
queryParameters['ask_filter'] = requestParameters['ask_filter'];
|
|
319
308
|
}
|
|
@@ -713,10 +702,6 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
713
702
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
714
703
|
}
|
|
715
704
|
|
|
716
|
-
if (requestParameters['market_type'] != null) {
|
|
717
|
-
queryParameters['market_type'] = requestParameters['market_type'];
|
|
718
|
-
}
|
|
719
|
-
|
|
720
705
|
if (requestParameters['account_index'] != null) {
|
|
721
706
|
queryParameters['account_index'] = requestParameters['account_index'];
|
|
722
707
|
}
|
|
@@ -821,24 +806,6 @@ export const ExportTradeTypeEnum = {
|
|
|
821
806
|
MarketSettlement: 'market-settlement'
|
|
822
807
|
} as const;
|
|
823
808
|
export type ExportTradeTypeEnum = typeof ExportTradeTypeEnum[keyof typeof ExportTradeTypeEnum];
|
|
824
|
-
/**
|
|
825
|
-
* @export
|
|
826
|
-
*/
|
|
827
|
-
export const AccountActiveOrdersMarketTypeEnum = {
|
|
828
|
-
All: 'all',
|
|
829
|
-
Spot: 'spot',
|
|
830
|
-
Perp: 'perp'
|
|
831
|
-
} as const;
|
|
832
|
-
export type AccountActiveOrdersMarketTypeEnum = typeof AccountActiveOrdersMarketTypeEnum[keyof typeof AccountActiveOrdersMarketTypeEnum];
|
|
833
|
-
/**
|
|
834
|
-
* @export
|
|
835
|
-
*/
|
|
836
|
-
export const AccountInactiveOrdersMarketTypeEnum = {
|
|
837
|
-
All: 'all',
|
|
838
|
-
Spot: 'spot',
|
|
839
|
-
Perp: 'perp'
|
|
840
|
-
} as const;
|
|
841
|
-
export type AccountInactiveOrdersMarketTypeEnum = typeof AccountInactiveOrdersMarketTypeEnum[keyof typeof AccountInactiveOrdersMarketTypeEnum];
|
|
842
809
|
/**
|
|
843
810
|
* @export
|
|
844
811
|
*/
|
|
@@ -920,15 +887,6 @@ export const TradesSortByEnum = {
|
|
|
920
887
|
TradeId: 'trade_id'
|
|
921
888
|
} as const;
|
|
922
889
|
export type TradesSortByEnum = typeof TradesSortByEnum[keyof typeof TradesSortByEnum];
|
|
923
|
-
/**
|
|
924
|
-
* @export
|
|
925
|
-
*/
|
|
926
|
-
export const TradesMarketTypeEnum = {
|
|
927
|
-
All: 'all',
|
|
928
|
-
Spot: 'spot',
|
|
929
|
-
Perp: 'perp'
|
|
930
|
-
} as const;
|
|
931
|
-
export type TradesMarketTypeEnum = typeof TradesMarketTypeEnum[keyof typeof TradesMarketTypeEnum];
|
|
932
890
|
/**
|
|
933
891
|
* @export
|
|
934
892
|
*/
|
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,54 @@ 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_fee: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof Asset
|
|
104
|
+
*/
|
|
105
|
+
global_supply_cap: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof Asset
|
|
110
|
+
*/
|
|
111
|
+
user_supply_cap: string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Asset
|
|
116
|
+
*/
|
|
117
|
+
total_supplied: string;
|
|
76
118
|
}
|
|
77
119
|
|
|
78
120
|
|
|
@@ -98,7 +140,14 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
98
140
|
if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false;
|
|
99
141
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
100
142
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
143
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
101
144
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
145
|
+
if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
|
|
146
|
+
if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
|
|
147
|
+
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
148
|
+
if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
|
|
149
|
+
if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
|
|
150
|
+
if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
|
|
102
151
|
return true;
|
|
103
152
|
}
|
|
104
153
|
|
|
@@ -120,7 +169,14 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
120
169
|
'min_withdrawal_amount': json['min_withdrawal_amount'],
|
|
121
170
|
'margin_mode': json['margin_mode'],
|
|
122
171
|
'index_price': json['index_price'],
|
|
172
|
+
'price_decimals': json['price_decimals'],
|
|
123
173
|
'l1_address': json['l1_address'],
|
|
174
|
+
'loan_to_value': json['loan_to_value'],
|
|
175
|
+
'liquidation_threshold': json['liquidation_threshold'],
|
|
176
|
+
'liquidation_fee': json['liquidation_fee'],
|
|
177
|
+
'global_supply_cap': json['global_supply_cap'],
|
|
178
|
+
'user_supply_cap': json['user_supply_cap'],
|
|
179
|
+
'total_supplied': json['total_supplied'],
|
|
124
180
|
};
|
|
125
181
|
}
|
|
126
182
|
|
|
@@ -138,7 +194,14 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
138
194
|
'min_withdrawal_amount': value['min_withdrawal_amount'],
|
|
139
195
|
'margin_mode': value['margin_mode'],
|
|
140
196
|
'index_price': value['index_price'],
|
|
197
|
+
'price_decimals': value['price_decimals'],
|
|
141
198
|
'l1_address': value['l1_address'],
|
|
199
|
+
'loan_to_value': value['loan_to_value'],
|
|
200
|
+
'liquidation_threshold': value['liquidation_threshold'],
|
|
201
|
+
'liquidation_fee': value['liquidation_fee'],
|
|
202
|
+
'global_supply_cap': value['global_supply_cap'],
|
|
203
|
+
'user_supply_cap': value['user_supply_cap'],
|
|
204
|
+
'total_supplied': value['total_supplied'],
|
|
142
205
|
};
|
|
143
206
|
}
|
|
144
207
|
|
|
@@ -0,0 +1,70 @@
|
|
|
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 AssetStats
|
|
20
|
+
*/
|
|
21
|
+
export interface AssetStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof AssetStats
|
|
26
|
+
*/
|
|
27
|
+
asset_id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AssetStats
|
|
32
|
+
*/
|
|
33
|
+
index_price: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the AssetStats interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfAssetStats(value: object): value is AssetStats {
|
|
40
|
+
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
41
|
+
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function AssetStatsFromJSON(json: any): AssetStats {
|
|
46
|
+
return AssetStatsFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function AssetStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssetStats {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'asset_id': json['asset_id'],
|
|
56
|
+
'index_price': json['index_price'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function AssetStatsToJSON(value?: AssetStats | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'asset_id': value['asset_id'],
|
|
67
|
+
'index_price': value['index_price'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/models/MarketConfig.ts
CHANGED
|
@@ -61,12 +61,6 @@ export interface MarketConfig {
|
|
|
61
61
|
* @memberof MarketConfig
|
|
62
62
|
*/
|
|
63
63
|
hidden?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @type {boolean}
|
|
67
|
-
* @memberof MarketConfig
|
|
68
|
-
*/
|
|
69
|
-
rfq_enabled: boolean;
|
|
70
64
|
}
|
|
71
65
|
|
|
72
66
|
/**
|
|
@@ -78,7 +72,6 @@ export function instanceOfMarketConfig(value: object): value is MarketConfig {
|
|
|
78
72
|
if (!('liquidation_mode' in value) || value['liquidation_mode'] === undefined) return false;
|
|
79
73
|
if (!('force_reduce_only' in value) || value['force_reduce_only'] === undefined) return false;
|
|
80
74
|
if (!('trading_hours' in value) || value['trading_hours'] === undefined) return false;
|
|
81
|
-
if (!('rfq_enabled' in value) || value['rfq_enabled'] === undefined) return false;
|
|
82
75
|
return true;
|
|
83
76
|
}
|
|
84
77
|
|
|
@@ -99,7 +92,6 @@ export function MarketConfigFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
99
92
|
'trading_hours': json['trading_hours'],
|
|
100
93
|
'funding_fee_discounts_enabled': json['funding_fee_discounts_enabled'] == null ? undefined : json['funding_fee_discounts_enabled'],
|
|
101
94
|
'hidden': json['hidden'] == null ? undefined : json['hidden'],
|
|
102
|
-
'rfq_enabled': json['rfq_enabled'],
|
|
103
95
|
};
|
|
104
96
|
}
|
|
105
97
|
|
|
@@ -116,7 +108,6 @@ export function MarketConfigToJSON(value?: MarketConfig | null): any {
|
|
|
116
108
|
'trading_hours': value['trading_hours'],
|
|
117
109
|
'funding_fee_discounts_enabled': value['funding_fee_discounts_enabled'],
|
|
118
110
|
'hidden': value['hidden'],
|
|
119
|
-
'rfq_enabled': value['rfq_enabled'],
|
|
120
111
|
};
|
|
121
112
|
}
|
|
122
113
|
|
package/models/RFQEntry.ts
CHANGED
|
@@ -19,12 +19,6 @@ import {
|
|
|
19
19
|
RFQResponseEntryFromJSONTyped,
|
|
20
20
|
RFQResponseEntryToJSON,
|
|
21
21
|
} from './RFQResponseEntry';
|
|
22
|
-
import type { RFQMetadata } from './RFQMetadata';
|
|
23
|
-
import {
|
|
24
|
-
RFQMetadataFromJSON,
|
|
25
|
-
RFQMetadataFromJSONTyped,
|
|
26
|
-
RFQMetadataToJSON,
|
|
27
|
-
} from './RFQMetadata';
|
|
28
22
|
|
|
29
23
|
/**
|
|
30
24
|
*
|
|
@@ -68,12 +62,6 @@ export interface RFQEntry {
|
|
|
68
62
|
* @memberof RFQEntry
|
|
69
63
|
*/
|
|
70
64
|
status: string;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
* @type {RFQMetadata}
|
|
74
|
-
* @memberof RFQEntry
|
|
75
|
-
*/
|
|
76
|
-
metadata: RFQMetadata;
|
|
77
65
|
/**
|
|
78
66
|
*
|
|
79
67
|
* @type {Array<RFQResponseEntry>}
|
|
@@ -104,7 +92,6 @@ export function instanceOfRFQEntry(value: object): value is RFQEntry {
|
|
|
104
92
|
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
105
93
|
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
106
94
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
107
|
-
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
108
95
|
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
109
96
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
110
97
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
@@ -127,7 +114,6 @@ export function RFQEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
127
114
|
'direction': json['direction'],
|
|
128
115
|
'base_amount': json['base_amount'],
|
|
129
116
|
'status': json['status'],
|
|
130
|
-
'metadata': RFQMetadataFromJSON(json['metadata']),
|
|
131
117
|
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
132
118
|
'created_at': json['created_at'],
|
|
133
119
|
'updated_at': json['updated_at'],
|
|
@@ -146,7 +132,6 @@ export function RFQEntryToJSON(value?: RFQEntry | null): any {
|
|
|
146
132
|
'direction': value['direction'],
|
|
147
133
|
'base_amount': value['base_amount'],
|
|
148
134
|
'status': value['status'],
|
|
149
|
-
'metadata': RFQMetadataToJSON(value['metadata']),
|
|
150
135
|
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
151
136
|
'created_at': value['created_at'],
|
|
152
137
|
'updated_at': value['updated_at'],
|
|
@@ -30,7 +30,7 @@ export interface RFQResponseEntry {
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof RFQResponseEntry
|
|
32
32
|
*/
|
|
33
|
-
status:
|
|
33
|
+
status: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
@@ -45,18 +45,6 @@ export interface RFQResponseEntry {
|
|
|
45
45
|
updated_at: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @export
|
|
51
|
-
*/
|
|
52
|
-
export const RFQResponseEntryStatusEnum = {
|
|
53
|
-
Acknowledged: 'acknowledged',
|
|
54
|
-
LiquidityProvided: 'liquidity_provided',
|
|
55
|
-
NotInterested: 'not_interested'
|
|
56
|
-
} as const;
|
|
57
|
-
export type RFQResponseEntryStatusEnum = typeof RFQResponseEntryStatusEnum[keyof typeof RFQResponseEntryStatusEnum];
|
|
58
|
-
|
|
59
|
-
|
|
60
48
|
/**
|
|
61
49
|
* Check if a given object implements the RFQResponseEntry interface.
|
|
62
50
|
*/
|
|
@@ -37,26 +37,8 @@ export interface ReqGetAccountActiveOrders {
|
|
|
37
37
|
* @memberof ReqGetAccountActiveOrders
|
|
38
38
|
*/
|
|
39
39
|
market_id?: number;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof ReqGetAccountActiveOrders
|
|
44
|
-
*/
|
|
45
|
-
market_type?: ReqGetAccountActiveOrdersMarketTypeEnum;
|
|
46
40
|
}
|
|
47
41
|
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @export
|
|
51
|
-
*/
|
|
52
|
-
export const ReqGetAccountActiveOrdersMarketTypeEnum = {
|
|
53
|
-
All: 'all',
|
|
54
|
-
Spot: 'spot',
|
|
55
|
-
Perp: 'perp'
|
|
56
|
-
} as const;
|
|
57
|
-
export type ReqGetAccountActiveOrdersMarketTypeEnum = typeof ReqGetAccountActiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountActiveOrdersMarketTypeEnum];
|
|
58
|
-
|
|
59
|
-
|
|
60
42
|
/**
|
|
61
43
|
* Check if a given object implements the ReqGetAccountActiveOrders interface.
|
|
62
44
|
*/
|
|
@@ -78,7 +60,6 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
78
60
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
79
61
|
'account_index': json['account_index'],
|
|
80
62
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
81
|
-
'market_type': json['market_type'] == null ? undefined : json['market_type'],
|
|
82
63
|
};
|
|
83
64
|
}
|
|
84
65
|
|
|
@@ -91,7 +72,6 @@ export function ReqGetAccountActiveOrdersToJSON(value?: ReqGetAccountActiveOrder
|
|
|
91
72
|
'auth': value['auth'],
|
|
92
73
|
'account_index': value['account_index'],
|
|
93
74
|
'market_id': value['market_id'],
|
|
94
|
-
'market_type': value['market_type'],
|
|
95
75
|
};
|
|
96
76
|
}
|
|
97
77
|
|
|
@@ -37,12 +37,6 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
37
37
|
* @memberof ReqGetAccountInactiveOrders
|
|
38
38
|
*/
|
|
39
39
|
market_id?: number;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof ReqGetAccountInactiveOrders
|
|
44
|
-
*/
|
|
45
|
-
market_type?: ReqGetAccountInactiveOrdersMarketTypeEnum;
|
|
46
40
|
/**
|
|
47
41
|
*
|
|
48
42
|
* @type {number}
|
|
@@ -69,18 +63,6 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
69
63
|
limit: number;
|
|
70
64
|
}
|
|
71
65
|
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @export
|
|
75
|
-
*/
|
|
76
|
-
export const ReqGetAccountInactiveOrdersMarketTypeEnum = {
|
|
77
|
-
All: 'all',
|
|
78
|
-
Spot: 'spot',
|
|
79
|
-
Perp: 'perp'
|
|
80
|
-
} as const;
|
|
81
|
-
export type ReqGetAccountInactiveOrdersMarketTypeEnum = typeof ReqGetAccountInactiveOrdersMarketTypeEnum[keyof typeof ReqGetAccountInactiveOrdersMarketTypeEnum];
|
|
82
|
-
|
|
83
|
-
|
|
84
66
|
/**
|
|
85
67
|
* Check if a given object implements the ReqGetAccountInactiveOrders interface.
|
|
86
68
|
*/
|
|
@@ -103,7 +85,6 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
|
|
|
103
85
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
104
86
|
'account_index': json['account_index'],
|
|
105
87
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
106
|
-
'market_type': json['market_type'] == null ? undefined : json['market_type'],
|
|
107
88
|
'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
|
|
108
89
|
'between_timestamps': json['between_timestamps'] == null ? undefined : json['between_timestamps'],
|
|
109
90
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
@@ -120,7 +101,6 @@ export function ReqGetAccountInactiveOrdersToJSON(value?: ReqGetAccountInactiveO
|
|
|
120
101
|
'auth': value['auth'],
|
|
121
102
|
'account_index': value['account_index'],
|
|
122
103
|
'market_id': value['market_id'],
|
|
123
|
-
'market_type': value['market_type'],
|
|
124
104
|
'ask_filter': value['ask_filter'],
|
|
125
105
|
'between_timestamps': value['between_timestamps'],
|
|
126
106
|
'cursor': value['cursor'],
|