zklighter-perps 1.0.232 → 1.0.234
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 +2 -0
- package/apis/AccountApi.ts +96 -0
- package/apis/OrderApi.ts +42 -0
- package/models/AccountAsset.ts +0 -29
- package/models/Asset.ts +0 -54
- package/models/MarketConfig.ts +9 -0
- package/models/RFQEntry.ts +15 -0
- package/models/RFQMetadata.ts +79 -0
- package/models/RFQResponseEntry.ts +13 -1
- package/models/ReqGetAccountActiveOrders.ts +20 -0
- package/models/ReqGetAccountInactiveOrders.ts +20 -0
- package/models/ReqGetTrades.ts +18 -0
- package/models/RespCreateRFQ.ts +15 -0
- package/models/RespGetRFQ.ts +15 -0
- package/models/RespRespondToRFQ.ts +15 -0
- package/models/RespUpdateRFQ.ts +172 -0
- package/models/index.ts +2 -0
- package/openapi.json +259 -50
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -107,6 +107,7 @@ models/PublicPoolMetadata.ts
|
|
|
107
107
|
models/PublicPoolShare.ts
|
|
108
108
|
models/PushNotifDeliveryResult.ts
|
|
109
109
|
models/RFQEntry.ts
|
|
110
|
+
models/RFQMetadata.ts
|
|
110
111
|
models/RFQResponseEntry.ts
|
|
111
112
|
models/Referral.ts
|
|
112
113
|
models/ReferralCode.ts
|
|
@@ -190,6 +191,7 @@ models/RespSendTx.ts
|
|
|
190
191
|
models/RespSendTxBatch.ts
|
|
191
192
|
models/RespSetMakerOnlyApiKeys.ts
|
|
192
193
|
models/RespUpdateKickback.ts
|
|
194
|
+
models/RespUpdateRFQ.ts
|
|
193
195
|
models/RespUpdateReferralCode.ts
|
|
194
196
|
models/RespWithdrawalDelay.ts
|
|
195
197
|
models/ResultCode.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type {
|
|
|
39
39
|
RespRespondToRFQ,
|
|
40
40
|
RespRevokeApiToken,
|
|
41
41
|
RespSetMakerOnlyApiKeys,
|
|
42
|
+
RespUpdateRFQ,
|
|
42
43
|
ResultCode,
|
|
43
44
|
SubAccounts,
|
|
44
45
|
TxHash,
|
|
@@ -92,6 +93,8 @@ import {
|
|
|
92
93
|
RespRevokeApiTokenToJSON,
|
|
93
94
|
RespSetMakerOnlyApiKeysFromJSON,
|
|
94
95
|
RespSetMakerOnlyApiKeysToJSON,
|
|
96
|
+
RespUpdateRFQFromJSON,
|
|
97
|
+
RespUpdateRFQToJSON,
|
|
95
98
|
ResultCodeFromJSON,
|
|
96
99
|
ResultCodeToJSON,
|
|
97
100
|
SubAccountsFromJSON,
|
|
@@ -239,6 +242,7 @@ export interface RfqCreateRequest {
|
|
|
239
242
|
direction: number;
|
|
240
243
|
authorization?: string;
|
|
241
244
|
auth?: string;
|
|
245
|
+
metadata?: string;
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
export interface RfqGetRequest {
|
|
@@ -263,6 +267,13 @@ export interface RfqRespondRequest {
|
|
|
263
267
|
auth?: string;
|
|
264
268
|
}
|
|
265
269
|
|
|
270
|
+
export interface RfqUpdateRequest {
|
|
271
|
+
rfq_id: number;
|
|
272
|
+
status: RfqUpdateStatusEnum;
|
|
273
|
+
authorization?: string;
|
|
274
|
+
auth?: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
266
277
|
export interface SetMakerOnlyApiKeysRequest {
|
|
267
278
|
account_index: number;
|
|
268
279
|
api_key_indexes: string;
|
|
@@ -1513,6 +1524,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1513
1524
|
formParams.append('direction', requestParameters['direction'] as any);
|
|
1514
1525
|
}
|
|
1515
1526
|
|
|
1527
|
+
if (requestParameters['metadata'] != null) {
|
|
1528
|
+
formParams.append('metadata', requestParameters['metadata'] as any);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1516
1531
|
const response = await this.request({
|
|
1517
1532
|
path: `/api/v1/rfq/create`,
|
|
1518
1533
|
method: 'POST',
|
|
@@ -1705,6 +1720,79 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1705
1720
|
return await response.value();
|
|
1706
1721
|
}
|
|
1707
1722
|
|
|
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
|
+
|
|
1708
1796
|
/**
|
|
1709
1797
|
* Set maker-only API key indexes
|
|
1710
1798
|
* setMakerOnlyApiKeys
|
|
@@ -2069,3 +2157,11 @@ export const RfqRespondStatusEnum = {
|
|
|
2069
2157
|
NotInterested: 'not_interested'
|
|
2070
2158
|
} as const;
|
|
2071
2159
|
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,6 +70,7 @@ export interface AccountActiveOrdersRequest {
|
|
|
70
70
|
authorization?: string;
|
|
71
71
|
auth?: string;
|
|
72
72
|
market_id?: number;
|
|
73
|
+
market_type?: AccountActiveOrdersMarketTypeEnum;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
export interface AccountInactiveOrdersRequest {
|
|
@@ -78,6 +79,7 @@ export interface AccountInactiveOrdersRequest {
|
|
|
78
79
|
authorization?: string;
|
|
79
80
|
auth?: string;
|
|
80
81
|
market_id?: number;
|
|
82
|
+
market_type?: AccountInactiveOrdersMarketTypeEnum;
|
|
81
83
|
ask_filter?: number;
|
|
82
84
|
between_timestamps?: string;
|
|
83
85
|
cursor?: string;
|
|
@@ -124,6 +126,7 @@ export interface TradesRequest {
|
|
|
124
126
|
authorization?: string;
|
|
125
127
|
auth?: string;
|
|
126
128
|
market_id?: number;
|
|
129
|
+
market_type?: TradesMarketTypeEnum;
|
|
127
130
|
account_index?: number;
|
|
128
131
|
order_index?: number;
|
|
129
132
|
sort_dir?: TradesSortDirEnum;
|
|
@@ -245,6 +248,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
245
248
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
246
249
|
}
|
|
247
250
|
|
|
251
|
+
if (requestParameters['market_type'] != null) {
|
|
252
|
+
queryParameters['market_type'] = requestParameters['market_type'];
|
|
253
|
+
}
|
|
254
|
+
|
|
248
255
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
249
256
|
|
|
250
257
|
const response = await this.request({
|
|
@@ -303,6 +310,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
303
310
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
304
311
|
}
|
|
305
312
|
|
|
313
|
+
if (requestParameters['market_type'] != null) {
|
|
314
|
+
queryParameters['market_type'] = requestParameters['market_type'];
|
|
315
|
+
}
|
|
316
|
+
|
|
306
317
|
if (requestParameters['ask_filter'] != null) {
|
|
307
318
|
queryParameters['ask_filter'] = requestParameters['ask_filter'];
|
|
308
319
|
}
|
|
@@ -702,6 +713,10 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
702
713
|
queryParameters['market_id'] = requestParameters['market_id'];
|
|
703
714
|
}
|
|
704
715
|
|
|
716
|
+
if (requestParameters['market_type'] != null) {
|
|
717
|
+
queryParameters['market_type'] = requestParameters['market_type'];
|
|
718
|
+
}
|
|
719
|
+
|
|
705
720
|
if (requestParameters['account_index'] != null) {
|
|
706
721
|
queryParameters['account_index'] = requestParameters['account_index'];
|
|
707
722
|
}
|
|
@@ -806,6 +821,24 @@ export const ExportTradeTypeEnum = {
|
|
|
806
821
|
MarketSettlement: 'market-settlement'
|
|
807
822
|
} as const;
|
|
808
823
|
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];
|
|
809
842
|
/**
|
|
810
843
|
* @export
|
|
811
844
|
*/
|
|
@@ -887,6 +920,15 @@ export const TradesSortByEnum = {
|
|
|
887
920
|
TradeId: 'trade_id'
|
|
888
921
|
} as const;
|
|
889
922
|
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];
|
|
890
932
|
/**
|
|
891
933
|
* @export
|
|
892
934
|
*/
|
package/models/AccountAsset.ts
CHANGED
|
@@ -43,31 +43,8 @@ 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;
|
|
58
46
|
}
|
|
59
47
|
|
|
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
|
-
|
|
71
48
|
/**
|
|
72
49
|
* Check if a given object implements the AccountAsset interface.
|
|
73
50
|
*/
|
|
@@ -76,8 +53,6 @@ export function instanceOfAccountAsset(value: object): value is AccountAsset {
|
|
|
76
53
|
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
77
54
|
if (!('balance' in value) || value['balance'] === undefined) return false;
|
|
78
55
|
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;
|
|
81
56
|
return true;
|
|
82
57
|
}
|
|
83
58
|
|
|
@@ -95,8 +70,6 @@ export function AccountAssetFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
95
70
|
'asset_id': json['asset_id'],
|
|
96
71
|
'balance': json['balance'],
|
|
97
72
|
'locked_balance': json['locked_balance'],
|
|
98
|
-
'margin_mode': json['margin_mode'],
|
|
99
|
-
'margin_balance': json['margin_balance'],
|
|
100
73
|
};
|
|
101
74
|
}
|
|
102
75
|
|
|
@@ -110,8 +83,6 @@ export function AccountAssetToJSON(value?: AccountAsset | null): any {
|
|
|
110
83
|
'asset_id': value['asset_id'],
|
|
111
84
|
'balance': value['balance'],
|
|
112
85
|
'locked_balance': value['locked_balance'],
|
|
113
|
-
'margin_mode': value['margin_mode'],
|
|
114
|
-
'margin_balance': value['margin_balance'],
|
|
115
86
|
};
|
|
116
87
|
}
|
|
117
88
|
|
package/models/Asset.ts
CHANGED
|
@@ -73,42 +73,6 @@ export interface Asset {
|
|
|
73
73
|
* @memberof Asset
|
|
74
74
|
*/
|
|
75
75
|
l1_address: string;
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @type {string}
|
|
79
|
-
* @memberof Asset
|
|
80
|
-
*/
|
|
81
|
-
loan_to_value: string;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {string}
|
|
85
|
-
* @memberof Asset
|
|
86
|
-
*/
|
|
87
|
-
liquidation_threshold: string;
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @memberof Asset
|
|
92
|
-
*/
|
|
93
|
-
liquidation_fee: string;
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
* @type {string}
|
|
97
|
-
* @memberof Asset
|
|
98
|
-
*/
|
|
99
|
-
global_supply_cap: string;
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @type {string}
|
|
103
|
-
* @memberof Asset
|
|
104
|
-
*/
|
|
105
|
-
user_supply_cap: string;
|
|
106
|
-
/**
|
|
107
|
-
*
|
|
108
|
-
* @type {string}
|
|
109
|
-
* @memberof Asset
|
|
110
|
-
*/
|
|
111
|
-
total_supplied: string;
|
|
112
76
|
}
|
|
113
77
|
|
|
114
78
|
|
|
@@ -135,12 +99,6 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
135
99
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
136
100
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
137
101
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
138
|
-
if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
|
|
139
|
-
if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
|
|
140
|
-
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
141
|
-
if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
|
|
142
|
-
if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
|
|
143
|
-
if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
|
|
144
102
|
return true;
|
|
145
103
|
}
|
|
146
104
|
|
|
@@ -163,12 +121,6 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
163
121
|
'margin_mode': json['margin_mode'],
|
|
164
122
|
'index_price': json['index_price'],
|
|
165
123
|
'l1_address': json['l1_address'],
|
|
166
|
-
'loan_to_value': json['loan_to_value'],
|
|
167
|
-
'liquidation_threshold': json['liquidation_threshold'],
|
|
168
|
-
'liquidation_fee': json['liquidation_fee'],
|
|
169
|
-
'global_supply_cap': json['global_supply_cap'],
|
|
170
|
-
'user_supply_cap': json['user_supply_cap'],
|
|
171
|
-
'total_supplied': json['total_supplied'],
|
|
172
124
|
};
|
|
173
125
|
}
|
|
174
126
|
|
|
@@ -187,12 +139,6 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
187
139
|
'margin_mode': value['margin_mode'],
|
|
188
140
|
'index_price': value['index_price'],
|
|
189
141
|
'l1_address': value['l1_address'],
|
|
190
|
-
'loan_to_value': value['loan_to_value'],
|
|
191
|
-
'liquidation_threshold': value['liquidation_threshold'],
|
|
192
|
-
'liquidation_fee': value['liquidation_fee'],
|
|
193
|
-
'global_supply_cap': value['global_supply_cap'],
|
|
194
|
-
'user_supply_cap': value['user_supply_cap'],
|
|
195
|
-
'total_supplied': value['total_supplied'],
|
|
196
142
|
};
|
|
197
143
|
}
|
|
198
144
|
|
package/models/MarketConfig.ts
CHANGED
|
@@ -61,6 +61,12 @@ 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;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
/**
|
|
@@ -72,6 +78,7 @@ export function instanceOfMarketConfig(value: object): value is MarketConfig {
|
|
|
72
78
|
if (!('liquidation_mode' in value) || value['liquidation_mode'] === undefined) return false;
|
|
73
79
|
if (!('force_reduce_only' in value) || value['force_reduce_only'] === undefined) return false;
|
|
74
80
|
if (!('trading_hours' in value) || value['trading_hours'] === undefined) return false;
|
|
81
|
+
if (!('rfq_enabled' in value) || value['rfq_enabled'] === undefined) return false;
|
|
75
82
|
return true;
|
|
76
83
|
}
|
|
77
84
|
|
|
@@ -92,6 +99,7 @@ export function MarketConfigFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
92
99
|
'trading_hours': json['trading_hours'],
|
|
93
100
|
'funding_fee_discounts_enabled': json['funding_fee_discounts_enabled'] == null ? undefined : json['funding_fee_discounts_enabled'],
|
|
94
101
|
'hidden': json['hidden'] == null ? undefined : json['hidden'],
|
|
102
|
+
'rfq_enabled': json['rfq_enabled'],
|
|
95
103
|
};
|
|
96
104
|
}
|
|
97
105
|
|
|
@@ -108,6 +116,7 @@ export function MarketConfigToJSON(value?: MarketConfig | null): any {
|
|
|
108
116
|
'trading_hours': value['trading_hours'],
|
|
109
117
|
'funding_fee_discounts_enabled': value['funding_fee_discounts_enabled'],
|
|
110
118
|
'hidden': value['hidden'],
|
|
119
|
+
'rfq_enabled': value['rfq_enabled'],
|
|
111
120
|
};
|
|
112
121
|
}
|
|
113
122
|
|
package/models/RFQEntry.ts
CHANGED
|
@@ -19,6 +19,12 @@ 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';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
*
|
|
@@ -62,6 +68,12 @@ export interface RFQEntry {
|
|
|
62
68
|
* @memberof RFQEntry
|
|
63
69
|
*/
|
|
64
70
|
status: string;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {RFQMetadata}
|
|
74
|
+
* @memberof RFQEntry
|
|
75
|
+
*/
|
|
76
|
+
metadata: RFQMetadata;
|
|
65
77
|
/**
|
|
66
78
|
*
|
|
67
79
|
* @type {Array<RFQResponseEntry>}
|
|
@@ -92,6 +104,7 @@ export function instanceOfRFQEntry(value: object): value is RFQEntry {
|
|
|
92
104
|
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
93
105
|
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
94
106
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
107
|
+
if (!('metadata' in value) || value['metadata'] === undefined) return false;
|
|
95
108
|
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
96
109
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
97
110
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
@@ -114,6 +127,7 @@ export function RFQEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
114
127
|
'direction': json['direction'],
|
|
115
128
|
'base_amount': json['base_amount'],
|
|
116
129
|
'status': json['status'],
|
|
130
|
+
'metadata': RFQMetadataFromJSON(json['metadata']),
|
|
117
131
|
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
118
132
|
'created_at': json['created_at'],
|
|
119
133
|
'updated_at': json['updated_at'],
|
|
@@ -132,6 +146,7 @@ export function RFQEntryToJSON(value?: RFQEntry | null): any {
|
|
|
132
146
|
'direction': value['direction'],
|
|
133
147
|
'base_amount': value['base_amount'],
|
|
134
148
|
'status': value['status'],
|
|
149
|
+
'metadata': RFQMetadataToJSON(value['metadata']),
|
|
135
150
|
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
136
151
|
'created_at': value['created_at'],
|
|
137
152
|
'updated_at': value['updated_at'],
|
|
@@ -0,0 +1,79 @@
|
|
|
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 RFQMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface RFQMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RFQMetadata
|
|
26
|
+
*/
|
|
27
|
+
requested_est_price: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RFQMetadata
|
|
32
|
+
*/
|
|
33
|
+
requested_max_slippage: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof RFQMetadata
|
|
38
|
+
*/
|
|
39
|
+
requested_slippage: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the RFQMetadata interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfRFQMetadata(value: object): value is RFQMetadata {
|
|
46
|
+
if (!('requested_est_price' in value) || value['requested_est_price'] === undefined) return false;
|
|
47
|
+
if (!('requested_max_slippage' in value) || value['requested_max_slippage'] === undefined) return false;
|
|
48
|
+
if (!('requested_slippage' in value) || value['requested_slippage'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function RFQMetadataFromJSON(json: any): RFQMetadata {
|
|
53
|
+
return RFQMetadataFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function RFQMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RFQMetadata {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'requested_est_price': json['requested_est_price'],
|
|
63
|
+
'requested_max_slippage': json['requested_max_slippage'],
|
|
64
|
+
'requested_slippage': json['requested_slippage'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function RFQMetadataToJSON(value?: RFQMetadata | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'requested_est_price': value['requested_est_price'],
|
|
75
|
+
'requested_max_slippage': value['requested_max_slippage'],
|
|
76
|
+
'requested_slippage': value['requested_slippage'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -30,7 +30,7 @@ export interface RFQResponseEntry {
|
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof RFQResponseEntry
|
|
32
32
|
*/
|
|
33
|
-
status:
|
|
33
|
+
status: RFQResponseEntryStatusEnum;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {number}
|
|
@@ -45,6 +45,18 @@ 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
|
+
|
|
48
60
|
/**
|
|
49
61
|
* Check if a given object implements the RFQResponseEntry interface.
|
|
50
62
|
*/
|
|
@@ -37,8 +37,26 @@ 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;
|
|
40
46
|
}
|
|
41
47
|
|
|
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
|
+
|
|
42
60
|
/**
|
|
43
61
|
* Check if a given object implements the ReqGetAccountActiveOrders interface.
|
|
44
62
|
*/
|
|
@@ -60,6 +78,7 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
60
78
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
61
79
|
'account_index': json['account_index'],
|
|
62
80
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
81
|
+
'market_type': json['market_type'] == null ? undefined : json['market_type'],
|
|
63
82
|
};
|
|
64
83
|
}
|
|
65
84
|
|
|
@@ -72,6 +91,7 @@ export function ReqGetAccountActiveOrdersToJSON(value?: ReqGetAccountActiveOrder
|
|
|
72
91
|
'auth': value['auth'],
|
|
73
92
|
'account_index': value['account_index'],
|
|
74
93
|
'market_id': value['market_id'],
|
|
94
|
+
'market_type': value['market_type'],
|
|
75
95
|
};
|
|
76
96
|
}
|
|
77
97
|
|
|
@@ -37,6 +37,12 @@ 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;
|
|
40
46
|
/**
|
|
41
47
|
*
|
|
42
48
|
* @type {number}
|
|
@@ -63,6 +69,18 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
63
69
|
limit: number;
|
|
64
70
|
}
|
|
65
71
|
|
|
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
|
+
|
|
66
84
|
/**
|
|
67
85
|
* Check if a given object implements the ReqGetAccountInactiveOrders interface.
|
|
68
86
|
*/
|
|
@@ -85,6 +103,7 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
|
|
|
85
103
|
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
86
104
|
'account_index': json['account_index'],
|
|
87
105
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
106
|
+
'market_type': json['market_type'] == null ? undefined : json['market_type'],
|
|
88
107
|
'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
|
|
89
108
|
'between_timestamps': json['between_timestamps'] == null ? undefined : json['between_timestamps'],
|
|
90
109
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
@@ -101,6 +120,7 @@ export function ReqGetAccountInactiveOrdersToJSON(value?: ReqGetAccountInactiveO
|
|
|
101
120
|
'auth': value['auth'],
|
|
102
121
|
'account_index': value['account_index'],
|
|
103
122
|
'market_id': value['market_id'],
|
|
123
|
+
'market_type': value['market_type'],
|
|
104
124
|
'ask_filter': value['ask_filter'],
|
|
105
125
|
'between_timestamps': value['between_timestamps'],
|
|
106
126
|
'cursor': value['cursor'],
|