zklighter-perps 1.0.230 → 1.0.232
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 +92 -17
- package/models/AccountAsset.ts +29 -0
- package/models/Asset.ts +54 -0
- package/models/RFQEntry.ts +13 -6
- package/models/RFQResponseEntry.ts +88 -0
- package/models/RespCreateRFQ.ts +13 -6
- package/models/RespGetRFQ.ts +13 -6
- package/models/RespRespondToRFQ.ts +157 -0
- package/models/Trade.ts +36 -0
- package/models/index.ts +2 -0
- package/openapi.json +275 -27
- 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/RFQResponseEntry.ts
|
|
110
111
|
models/Referral.ts
|
|
111
112
|
models/ReferralCode.ts
|
|
112
113
|
models/ReferralPointEntry.ts
|
|
@@ -183,6 +184,7 @@ models/RespGetRFQ.ts
|
|
|
183
184
|
models/RespListRFQs.ts
|
|
184
185
|
models/RespPostApiToken.ts
|
|
185
186
|
models/RespPublicPoolsMetadata.ts
|
|
187
|
+
models/RespRespondToRFQ.ts
|
|
186
188
|
models/RespRevokeApiToken.ts
|
|
187
189
|
models/RespSendTx.ts
|
|
188
190
|
models/RespSendTxBatch.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -36,6 +36,7 @@ import type {
|
|
|
36
36
|
RespListRFQs,
|
|
37
37
|
RespPostApiToken,
|
|
38
38
|
RespPublicPoolsMetadata,
|
|
39
|
+
RespRespondToRFQ,
|
|
39
40
|
RespRevokeApiToken,
|
|
40
41
|
RespSetMakerOnlyApiKeys,
|
|
41
42
|
ResultCode,
|
|
@@ -85,6 +86,8 @@ import {
|
|
|
85
86
|
RespPostApiTokenToJSON,
|
|
86
87
|
RespPublicPoolsMetadataFromJSON,
|
|
87
88
|
RespPublicPoolsMetadataToJSON,
|
|
89
|
+
RespRespondToRFQFromJSON,
|
|
90
|
+
RespRespondToRFQToJSON,
|
|
88
91
|
RespRevokeApiTokenFromJSON,
|
|
89
92
|
RespRevokeApiTokenToJSON,
|
|
90
93
|
RespSetMakerOnlyApiKeysFromJSON,
|
|
@@ -231,13 +234,11 @@ export interface PublicPoolsMetadataRequest {
|
|
|
231
234
|
}
|
|
232
235
|
|
|
233
236
|
export interface RfqCreateRequest {
|
|
234
|
-
account_index: number;
|
|
235
237
|
market_index: number;
|
|
236
238
|
base_amount: string;
|
|
237
239
|
direction: number;
|
|
238
240
|
authorization?: string;
|
|
239
241
|
auth?: string;
|
|
240
|
-
telegram_handle?: string;
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
export interface RfqGetRequest {
|
|
@@ -255,6 +256,13 @@ export interface RfqListRequest {
|
|
|
255
256
|
limit?: number;
|
|
256
257
|
}
|
|
257
258
|
|
|
259
|
+
export interface RfqRespondRequest {
|
|
260
|
+
rfq_id: number;
|
|
261
|
+
status: RfqRespondStatusEnum;
|
|
262
|
+
authorization?: string;
|
|
263
|
+
auth?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
258
266
|
export interface SetMakerOnlyApiKeysRequest {
|
|
259
267
|
account_index: number;
|
|
260
268
|
api_key_indexes: string;
|
|
@@ -1446,13 +1454,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1446
1454
|
* rfq_create
|
|
1447
1455
|
*/
|
|
1448
1456
|
async rfqCreateRaw(requestParameters: RfqCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespCreateRFQ>> {
|
|
1449
|
-
if (requestParameters['account_index'] == null) {
|
|
1450
|
-
throw new runtime.RequiredError(
|
|
1451
|
-
'account_index',
|
|
1452
|
-
'Required parameter "account_index" was null or undefined when calling rfqCreate().'
|
|
1453
|
-
);
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
1457
|
if (requestParameters['market_index'] == null) {
|
|
1457
1458
|
throw new runtime.RequiredError(
|
|
1458
1459
|
'market_index',
|
|
@@ -1500,10 +1501,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1500
1501
|
formParams.append('auth', requestParameters['auth'] as any);
|
|
1501
1502
|
}
|
|
1502
1503
|
|
|
1503
|
-
if (requestParameters['account_index'] != null) {
|
|
1504
|
-
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
1504
|
if (requestParameters['market_index'] != null) {
|
|
1508
1505
|
formParams.append('market_index', requestParameters['market_index'] as any);
|
|
1509
1506
|
}
|
|
@@ -1516,10 +1513,6 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1516
1513
|
formParams.append('direction', requestParameters['direction'] as any);
|
|
1517
1514
|
}
|
|
1518
1515
|
|
|
1519
|
-
if (requestParameters['telegram_handle'] != null) {
|
|
1520
|
-
formParams.append('telegram_handle', requestParameters['telegram_handle'] as any);
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
1516
|
const response = await this.request({
|
|
1524
1517
|
path: `/api/v1/rfq/create`,
|
|
1525
1518
|
method: 'POST',
|
|
@@ -1639,6 +1632,79 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1639
1632
|
return await response.value();
|
|
1640
1633
|
}
|
|
1641
1634
|
|
|
1635
|
+
/**
|
|
1636
|
+
* Respond to RFQ
|
|
1637
|
+
* rfq_respond
|
|
1638
|
+
*/
|
|
1639
|
+
async rfqRespondRaw(requestParameters: RfqRespondRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespRespondToRFQ>> {
|
|
1640
|
+
if (requestParameters['rfq_id'] == null) {
|
|
1641
|
+
throw new runtime.RequiredError(
|
|
1642
|
+
'rfq_id',
|
|
1643
|
+
'Required parameter "rfq_id" was null or undefined when calling rfqRespond().'
|
|
1644
|
+
);
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
if (requestParameters['status'] == null) {
|
|
1648
|
+
throw new runtime.RequiredError(
|
|
1649
|
+
'status',
|
|
1650
|
+
'Required parameter "status" was null or undefined when calling rfqRespond().'
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
const queryParameters: any = {};
|
|
1655
|
+
|
|
1656
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1657
|
+
|
|
1658
|
+
if (requestParameters['authorization'] != null) {
|
|
1659
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
const consumes: runtime.Consume[] = [
|
|
1663
|
+
{ contentType: 'multipart/form-data' },
|
|
1664
|
+
];
|
|
1665
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
1666
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
1667
|
+
|
|
1668
|
+
let formParams: { append(param: string, value: any): any };
|
|
1669
|
+
let useForm = false;
|
|
1670
|
+
if (useForm) {
|
|
1671
|
+
formParams = new FormData();
|
|
1672
|
+
} else {
|
|
1673
|
+
formParams = new URLSearchParams();
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
if (requestParameters['auth'] != null) {
|
|
1677
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
if (requestParameters['rfq_id'] != null) {
|
|
1681
|
+
formParams.append('rfq_id', requestParameters['rfq_id'] as any);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
if (requestParameters['status'] != null) {
|
|
1685
|
+
formParams.append('status', requestParameters['status'] as any);
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
const response = await this.request({
|
|
1689
|
+
path: `/api/v1/rfq/respond`,
|
|
1690
|
+
method: 'POST',
|
|
1691
|
+
headers: headerParameters,
|
|
1692
|
+
query: queryParameters,
|
|
1693
|
+
body: formParams,
|
|
1694
|
+
}, initOverrides);
|
|
1695
|
+
|
|
1696
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespRespondToRFQFromJSON(jsonValue));
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Respond to RFQ
|
|
1701
|
+
* rfq_respond
|
|
1702
|
+
*/
|
|
1703
|
+
async rfqRespond(requestParameters: RfqRespondRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespRespondToRFQ> {
|
|
1704
|
+
const response = await this.rfqRespondRaw(requestParameters, initOverrides);
|
|
1705
|
+
return await response.value();
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1642
1708
|
/**
|
|
1643
1709
|
* Set maker-only API key indexes
|
|
1644
1710
|
* setMakerOnlyApiKeys
|
|
@@ -1994,3 +2060,12 @@ export const RfqListStatusEnum = {
|
|
|
1994
2060
|
Closed: 'closed'
|
|
1995
2061
|
} as const;
|
|
1996
2062
|
export type RfqListStatusEnum = typeof RfqListStatusEnum[keyof typeof RfqListStatusEnum];
|
|
2063
|
+
/**
|
|
2064
|
+
* @export
|
|
2065
|
+
*/
|
|
2066
|
+
export const RfqRespondStatusEnum = {
|
|
2067
|
+
Acknowledged: 'acknowledged',
|
|
2068
|
+
LiquidityProvided: 'liquidity_provided',
|
|
2069
|
+
NotInterested: 'not_interested'
|
|
2070
|
+
} as const;
|
|
2071
|
+
export type RfqRespondStatusEnum = typeof RfqRespondStatusEnum[keyof typeof RfqRespondStatusEnum];
|
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
|
@@ -73,6 +73,42 @@ 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;
|
|
76
112
|
}
|
|
77
113
|
|
|
78
114
|
|
|
@@ -99,6 +135,12 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
99
135
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
100
136
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
101
137
|
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;
|
|
102
144
|
return true;
|
|
103
145
|
}
|
|
104
146
|
|
|
@@ -121,6 +163,12 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
121
163
|
'margin_mode': json['margin_mode'],
|
|
122
164
|
'index_price': json['index_price'],
|
|
123
165
|
'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'],
|
|
124
172
|
};
|
|
125
173
|
}
|
|
126
174
|
|
|
@@ -139,6 +187,12 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
139
187
|
'margin_mode': value['margin_mode'],
|
|
140
188
|
'index_price': value['index_price'],
|
|
141
189
|
'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'],
|
|
142
196
|
};
|
|
143
197
|
}
|
|
144
198
|
|
package/models/RFQEntry.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { RFQResponseEntry } from './RFQResponseEntry';
|
|
17
|
+
import {
|
|
18
|
+
RFQResponseEntryFromJSON,
|
|
19
|
+
RFQResponseEntryFromJSONTyped,
|
|
20
|
+
RFQResponseEntryToJSON,
|
|
21
|
+
} from './RFQResponseEntry';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -54,13 +61,13 @@ export interface RFQEntry {
|
|
|
54
61
|
* @type {string}
|
|
55
62
|
* @memberof RFQEntry
|
|
56
63
|
*/
|
|
57
|
-
|
|
64
|
+
status: string;
|
|
58
65
|
/**
|
|
59
66
|
*
|
|
60
|
-
* @type {
|
|
67
|
+
* @type {Array<RFQResponseEntry>}
|
|
61
68
|
* @memberof RFQEntry
|
|
62
69
|
*/
|
|
63
|
-
|
|
70
|
+
responses: Array<RFQResponseEntry>;
|
|
64
71
|
/**
|
|
65
72
|
*
|
|
66
73
|
* @type {number}
|
|
@@ -84,8 +91,8 @@ export function instanceOfRFQEntry(value: object): value is RFQEntry {
|
|
|
84
91
|
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
85
92
|
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
86
93
|
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
87
|
-
if (!('telegram_handle' in value) || value['telegram_handle'] === undefined) return false;
|
|
88
94
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
95
|
+
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
89
96
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
90
97
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
91
98
|
return true;
|
|
@@ -106,8 +113,8 @@ export function RFQEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
106
113
|
'market_index': json['market_index'],
|
|
107
114
|
'direction': json['direction'],
|
|
108
115
|
'base_amount': json['base_amount'],
|
|
109
|
-
'telegram_handle': json['telegram_handle'],
|
|
110
116
|
'status': json['status'],
|
|
117
|
+
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
111
118
|
'created_at': json['created_at'],
|
|
112
119
|
'updated_at': json['updated_at'],
|
|
113
120
|
};
|
|
@@ -124,8 +131,8 @@ export function RFQEntryToJSON(value?: RFQEntry | null): any {
|
|
|
124
131
|
'market_index': value['market_index'],
|
|
125
132
|
'direction': value['direction'],
|
|
126
133
|
'base_amount': value['base_amount'],
|
|
127
|
-
'telegram_handle': value['telegram_handle'],
|
|
128
134
|
'status': value['status'],
|
|
135
|
+
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
129
136
|
'created_at': value['created_at'],
|
|
130
137
|
'updated_at': value['updated_at'],
|
|
131
138
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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 RFQResponseEntry
|
|
20
|
+
*/
|
|
21
|
+
export interface RFQResponseEntry {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RFQResponseEntry
|
|
26
|
+
*/
|
|
27
|
+
account_index: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RFQResponseEntry
|
|
32
|
+
*/
|
|
33
|
+
status: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof RFQResponseEntry
|
|
38
|
+
*/
|
|
39
|
+
responded_at: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof RFQResponseEntry
|
|
44
|
+
*/
|
|
45
|
+
updated_at: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the RFQResponseEntry interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfRFQResponseEntry(value: object): value is RFQResponseEntry {
|
|
52
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
53
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
54
|
+
if (!('responded_at' in value) || value['responded_at'] === undefined) return false;
|
|
55
|
+
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function RFQResponseEntryFromJSON(json: any): RFQResponseEntry {
|
|
60
|
+
return RFQResponseEntryFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function RFQResponseEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RFQResponseEntry {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'account_index': json['account_index'],
|
|
70
|
+
'status': json['status'],
|
|
71
|
+
'responded_at': json['responded_at'],
|
|
72
|
+
'updated_at': json['updated_at'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function RFQResponseEntryToJSON(value?: RFQResponseEntry | null): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'account_index': value['account_index'],
|
|
83
|
+
'status': value['status'],
|
|
84
|
+
'responded_at': value['responded_at'],
|
|
85
|
+
'updated_at': value['updated_at'],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
package/models/RespCreateRFQ.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { RFQResponseEntry } from './RFQResponseEntry';
|
|
17
|
+
import {
|
|
18
|
+
RFQResponseEntryFromJSON,
|
|
19
|
+
RFQResponseEntryFromJSONTyped,
|
|
20
|
+
RFQResponseEntryToJSON,
|
|
21
|
+
} from './RFQResponseEntry';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -66,13 +73,13 @@ export interface RespCreateRFQ {
|
|
|
66
73
|
* @type {string}
|
|
67
74
|
* @memberof RespCreateRFQ
|
|
68
75
|
*/
|
|
69
|
-
|
|
76
|
+
status: string;
|
|
70
77
|
/**
|
|
71
78
|
*
|
|
72
|
-
* @type {
|
|
79
|
+
* @type {Array<RFQResponseEntry>}
|
|
73
80
|
* @memberof RespCreateRFQ
|
|
74
81
|
*/
|
|
75
|
-
|
|
82
|
+
responses: Array<RFQResponseEntry>;
|
|
76
83
|
/**
|
|
77
84
|
*
|
|
78
85
|
* @type {number}
|
|
@@ -97,8 +104,8 @@ export function instanceOfRespCreateRFQ(value: object): value is RespCreateRFQ {
|
|
|
97
104
|
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
98
105
|
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
99
106
|
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
100
|
-
if (!('telegram_handle' in value) || value['telegram_handle'] === undefined) return false;
|
|
101
107
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
108
|
+
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
102
109
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
103
110
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
104
111
|
return true;
|
|
@@ -121,8 +128,8 @@ export function RespCreateRFQFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
121
128
|
'market_index': json['market_index'],
|
|
122
129
|
'direction': json['direction'],
|
|
123
130
|
'base_amount': json['base_amount'],
|
|
124
|
-
'telegram_handle': json['telegram_handle'],
|
|
125
131
|
'status': json['status'],
|
|
132
|
+
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
126
133
|
'created_at': json['created_at'],
|
|
127
134
|
'updated_at': json['updated_at'],
|
|
128
135
|
};
|
|
@@ -141,8 +148,8 @@ export function RespCreateRFQToJSON(value?: RespCreateRFQ | null): any {
|
|
|
141
148
|
'market_index': value['market_index'],
|
|
142
149
|
'direction': value['direction'],
|
|
143
150
|
'base_amount': value['base_amount'],
|
|
144
|
-
'telegram_handle': value['telegram_handle'],
|
|
145
151
|
'status': value['status'],
|
|
152
|
+
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
146
153
|
'created_at': value['created_at'],
|
|
147
154
|
'updated_at': value['updated_at'],
|
|
148
155
|
};
|
package/models/RespGetRFQ.ts
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { RFQResponseEntry } from './RFQResponseEntry';
|
|
17
|
+
import {
|
|
18
|
+
RFQResponseEntryFromJSON,
|
|
19
|
+
RFQResponseEntryFromJSONTyped,
|
|
20
|
+
RFQResponseEntryToJSON,
|
|
21
|
+
} from './RFQResponseEntry';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -66,13 +73,13 @@ export interface RespGetRFQ {
|
|
|
66
73
|
* @type {string}
|
|
67
74
|
* @memberof RespGetRFQ
|
|
68
75
|
*/
|
|
69
|
-
|
|
76
|
+
status: string;
|
|
70
77
|
/**
|
|
71
78
|
*
|
|
72
|
-
* @type {
|
|
79
|
+
* @type {Array<RFQResponseEntry>}
|
|
73
80
|
* @memberof RespGetRFQ
|
|
74
81
|
*/
|
|
75
|
-
|
|
82
|
+
responses: Array<RFQResponseEntry>;
|
|
76
83
|
/**
|
|
77
84
|
*
|
|
78
85
|
* @type {number}
|
|
@@ -97,8 +104,8 @@ export function instanceOfRespGetRFQ(value: object): value is RespGetRFQ {
|
|
|
97
104
|
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
98
105
|
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
99
106
|
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
100
|
-
if (!('telegram_handle' in value) || value['telegram_handle'] === undefined) return false;
|
|
101
107
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
108
|
+
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
102
109
|
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
103
110
|
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
104
111
|
return true;
|
|
@@ -121,8 +128,8 @@ export function RespGetRFQFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
121
128
|
'market_index': json['market_index'],
|
|
122
129
|
'direction': json['direction'],
|
|
123
130
|
'base_amount': json['base_amount'],
|
|
124
|
-
'telegram_handle': json['telegram_handle'],
|
|
125
131
|
'status': json['status'],
|
|
132
|
+
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
126
133
|
'created_at': json['created_at'],
|
|
127
134
|
'updated_at': json['updated_at'],
|
|
128
135
|
};
|
|
@@ -141,8 +148,8 @@ export function RespGetRFQToJSON(value?: RespGetRFQ | null): any {
|
|
|
141
148
|
'market_index': value['market_index'],
|
|
142
149
|
'direction': value['direction'],
|
|
143
150
|
'base_amount': value['base_amount'],
|
|
144
|
-
'telegram_handle': value['telegram_handle'],
|
|
145
151
|
'status': value['status'],
|
|
152
|
+
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
146
153
|
'created_at': value['created_at'],
|
|
147
154
|
'updated_at': value['updated_at'],
|
|
148
155
|
};
|
|
@@ -0,0 +1,157 @@
|
|
|
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
|
+
import type { RFQResponseEntry } from './RFQResponseEntry';
|
|
17
|
+
import {
|
|
18
|
+
RFQResponseEntryFromJSON,
|
|
19
|
+
RFQResponseEntryFromJSONTyped,
|
|
20
|
+
RFQResponseEntryToJSON,
|
|
21
|
+
} from './RFQResponseEntry';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespRespondToRFQ
|
|
27
|
+
*/
|
|
28
|
+
export interface RespRespondToRFQ {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespRespondToRFQ
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespRespondToRFQ
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof RespRespondToRFQ
|
|
45
|
+
*/
|
|
46
|
+
id: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof RespRespondToRFQ
|
|
51
|
+
*/
|
|
52
|
+
account_index: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof RespRespondToRFQ
|
|
57
|
+
*/
|
|
58
|
+
market_index: number;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof RespRespondToRFQ
|
|
63
|
+
*/
|
|
64
|
+
direction: number;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof RespRespondToRFQ
|
|
69
|
+
*/
|
|
70
|
+
base_amount: string;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof RespRespondToRFQ
|
|
75
|
+
*/
|
|
76
|
+
status: string;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Array<RFQResponseEntry>}
|
|
80
|
+
* @memberof RespRespondToRFQ
|
|
81
|
+
*/
|
|
82
|
+
responses: Array<RFQResponseEntry>;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof RespRespondToRFQ
|
|
87
|
+
*/
|
|
88
|
+
created_at: number;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof RespRespondToRFQ
|
|
93
|
+
*/
|
|
94
|
+
updated_at: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Check if a given object implements the RespRespondToRFQ interface.
|
|
99
|
+
*/
|
|
100
|
+
export function instanceOfRespRespondToRFQ(value: object): value is RespRespondToRFQ {
|
|
101
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
102
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
103
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
104
|
+
if (!('market_index' in value) || value['market_index'] === undefined) return false;
|
|
105
|
+
if (!('direction' in value) || value['direction'] === undefined) return false;
|
|
106
|
+
if (!('base_amount' in value) || value['base_amount'] === undefined) return false;
|
|
107
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
108
|
+
if (!('responses' in value) || value['responses'] === undefined) return false;
|
|
109
|
+
if (!('created_at' in value) || value['created_at'] === undefined) return false;
|
|
110
|
+
if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function RespRespondToRFQFromJSON(json: any): RespRespondToRFQ {
|
|
115
|
+
return RespRespondToRFQFromJSONTyped(json, false);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function RespRespondToRFQFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespRespondToRFQ {
|
|
119
|
+
if (json == null) {
|
|
120
|
+
return json;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'code': json['code'],
|
|
125
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
126
|
+
'id': json['id'],
|
|
127
|
+
'account_index': json['account_index'],
|
|
128
|
+
'market_index': json['market_index'],
|
|
129
|
+
'direction': json['direction'],
|
|
130
|
+
'base_amount': json['base_amount'],
|
|
131
|
+
'status': json['status'],
|
|
132
|
+
'responses': ((json['responses'] as Array<any>).map(RFQResponseEntryFromJSON)),
|
|
133
|
+
'created_at': json['created_at'],
|
|
134
|
+
'updated_at': json['updated_at'],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function RespRespondToRFQToJSON(value?: RespRespondToRFQ | null): any {
|
|
139
|
+
if (value == null) {
|
|
140
|
+
return value;
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
|
|
144
|
+
'code': value['code'],
|
|
145
|
+
'message': value['message'],
|
|
146
|
+
'id': value['id'],
|
|
147
|
+
'account_index': value['account_index'],
|
|
148
|
+
'market_index': value['market_index'],
|
|
149
|
+
'direction': value['direction'],
|
|
150
|
+
'base_amount': value['base_amount'],
|
|
151
|
+
'status': value['status'],
|
|
152
|
+
'responses': ((value['responses'] as Array<any>).map(RFQResponseEntryToJSON)),
|
|
153
|
+
'created_at': value['created_at'],
|
|
154
|
+
'updated_at': value['updated_at'],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
package/models/Trade.ts
CHANGED
|
@@ -223,6 +223,30 @@ export interface Trade {
|
|
|
223
223
|
* @memberof Trade
|
|
224
224
|
*/
|
|
225
225
|
bid_account_pnl: string;
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
228
|
+
* @type {number}
|
|
229
|
+
* @memberof Trade
|
|
230
|
+
*/
|
|
231
|
+
integrator_taker_fee: number;
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @type {number}
|
|
235
|
+
* @memberof Trade
|
|
236
|
+
*/
|
|
237
|
+
integrator_taker_fee_collector_index: number;
|
|
238
|
+
/**
|
|
239
|
+
*
|
|
240
|
+
* @type {number}
|
|
241
|
+
* @memberof Trade
|
|
242
|
+
*/
|
|
243
|
+
integrator_maker_fee: number;
|
|
244
|
+
/**
|
|
245
|
+
*
|
|
246
|
+
* @type {number}
|
|
247
|
+
* @memberof Trade
|
|
248
|
+
*/
|
|
249
|
+
integrator_maker_fee_collector_index: number;
|
|
226
250
|
}
|
|
227
251
|
|
|
228
252
|
|
|
@@ -272,6 +296,10 @@ export function instanceOfTrade(value: object): value is Trade {
|
|
|
272
296
|
if (!('transaction_time' in value) || value['transaction_time'] === undefined) return false;
|
|
273
297
|
if (!('ask_account_pnl' in value) || value['ask_account_pnl'] === undefined) return false;
|
|
274
298
|
if (!('bid_account_pnl' in value) || value['bid_account_pnl'] === undefined) return false;
|
|
299
|
+
if (!('integrator_taker_fee' in value) || value['integrator_taker_fee'] === undefined) return false;
|
|
300
|
+
if (!('integrator_taker_fee_collector_index' in value) || value['integrator_taker_fee_collector_index'] === undefined) return false;
|
|
301
|
+
if (!('integrator_maker_fee' in value) || value['integrator_maker_fee'] === undefined) return false;
|
|
302
|
+
if (!('integrator_maker_fee_collector_index' in value) || value['integrator_maker_fee_collector_index'] === undefined) return false;
|
|
275
303
|
return true;
|
|
276
304
|
}
|
|
277
305
|
|
|
@@ -319,6 +347,10 @@ export function TradeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tra
|
|
|
319
347
|
'transaction_time': json['transaction_time'],
|
|
320
348
|
'ask_account_pnl': json['ask_account_pnl'],
|
|
321
349
|
'bid_account_pnl': json['bid_account_pnl'],
|
|
350
|
+
'integrator_taker_fee': json['integrator_taker_fee'],
|
|
351
|
+
'integrator_taker_fee_collector_index': json['integrator_taker_fee_collector_index'],
|
|
352
|
+
'integrator_maker_fee': json['integrator_maker_fee'],
|
|
353
|
+
'integrator_maker_fee_collector_index': json['integrator_maker_fee_collector_index'],
|
|
322
354
|
};
|
|
323
355
|
}
|
|
324
356
|
|
|
@@ -362,6 +394,10 @@ export function TradeToJSON(value?: Trade | null): any {
|
|
|
362
394
|
'transaction_time': value['transaction_time'],
|
|
363
395
|
'ask_account_pnl': value['ask_account_pnl'],
|
|
364
396
|
'bid_account_pnl': value['bid_account_pnl'],
|
|
397
|
+
'integrator_taker_fee': value['integrator_taker_fee'],
|
|
398
|
+
'integrator_taker_fee_collector_index': value['integrator_taker_fee_collector_index'],
|
|
399
|
+
'integrator_maker_fee': value['integrator_maker_fee'],
|
|
400
|
+
'integrator_maker_fee_collector_index': value['integrator_maker_fee_collector_index'],
|
|
365
401
|
};
|
|
366
402
|
}
|
|
367
403
|
|
package/models/index.ts
CHANGED
|
@@ -91,6 +91,7 @@ export * from './PublicPoolMetadata';
|
|
|
91
91
|
export * from './PublicPoolShare';
|
|
92
92
|
export * from './PushNotifDeliveryResult';
|
|
93
93
|
export * from './RFQEntry';
|
|
94
|
+
export * from './RFQResponseEntry';
|
|
94
95
|
export * from './Referral';
|
|
95
96
|
export * from './ReferralCode';
|
|
96
97
|
export * from './ReferralPointEntry';
|
|
@@ -167,6 +168,7 @@ export * from './RespGetRFQ';
|
|
|
167
168
|
export * from './RespListRFQs';
|
|
168
169
|
export * from './RespPostApiToken';
|
|
169
170
|
export * from './RespPublicPoolsMetadata';
|
|
171
|
+
export * from './RespRespondToRFQ';
|
|
170
172
|
export * from './RespRevokeApiToken';
|
|
171
173
|
export * from './RespSendTx';
|
|
172
174
|
export * from './RespSendTxBatch';
|
package/openapi.json
CHANGED
|
@@ -647,8 +647,7 @@
|
|
|
647
647
|
"in": "query",
|
|
648
648
|
"required": false,
|
|
649
649
|
"type": "integer",
|
|
650
|
-
"format": "int16"
|
|
651
|
-
"default": "0"
|
|
650
|
+
"format": "int16"
|
|
652
651
|
}
|
|
653
652
|
],
|
|
654
653
|
"tags": [
|
|
@@ -3586,6 +3585,49 @@
|
|
|
3586
3585
|
"description": "List RFQs"
|
|
3587
3586
|
}
|
|
3588
3587
|
},
|
|
3588
|
+
"/api/v1/rfq/respond": {
|
|
3589
|
+
"post": {
|
|
3590
|
+
"summary": "rfq_respond",
|
|
3591
|
+
"operationId": "rfq_respond",
|
|
3592
|
+
"responses": {
|
|
3593
|
+
"200": {
|
|
3594
|
+
"description": "A successful response.",
|
|
3595
|
+
"schema": {
|
|
3596
|
+
"$ref": "#/definitions/RespRespondToRFQ"
|
|
3597
|
+
}
|
|
3598
|
+
},
|
|
3599
|
+
"400": {
|
|
3600
|
+
"description": "Bad request",
|
|
3601
|
+
"schema": {
|
|
3602
|
+
"$ref": "#/definitions/ResultCode"
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
},
|
|
3606
|
+
"parameters": [
|
|
3607
|
+
{
|
|
3608
|
+
"name": "authorization",
|
|
3609
|
+
"in": "header",
|
|
3610
|
+
"required": false,
|
|
3611
|
+
"type": "string"
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
"name": "body",
|
|
3615
|
+
"in": "body",
|
|
3616
|
+
"required": true,
|
|
3617
|
+
"schema": {
|
|
3618
|
+
"$ref": "#/definitions/ReqRespondToRFQ"
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
],
|
|
3622
|
+
"tags": [
|
|
3623
|
+
"account"
|
|
3624
|
+
],
|
|
3625
|
+
"consumes": [
|
|
3626
|
+
"multipart/form-data"
|
|
3627
|
+
],
|
|
3628
|
+
"description": "Respond to RFQ"
|
|
3629
|
+
}
|
|
3630
|
+
},
|
|
3589
3631
|
"/api/v1/sendTx": {
|
|
3590
3632
|
"post": {
|
|
3591
3633
|
"summary": "sendTx",
|
|
@@ -4577,6 +4619,18 @@
|
|
|
4577
4619
|
"locked_balance": {
|
|
4578
4620
|
"type": "string",
|
|
4579
4621
|
"example": "1000"
|
|
4622
|
+
},
|
|
4623
|
+
"margin_mode": {
|
|
4624
|
+
"type": "string",
|
|
4625
|
+
"example": "enabled",
|
|
4626
|
+
"enum": [
|
|
4627
|
+
"enabled",
|
|
4628
|
+
"disabled"
|
|
4629
|
+
]
|
|
4630
|
+
},
|
|
4631
|
+
"margin_balance": {
|
|
4632
|
+
"type": "string",
|
|
4633
|
+
"example": "1000"
|
|
4580
4634
|
}
|
|
4581
4635
|
},
|
|
4582
4636
|
"title": "AccountAsset",
|
|
@@ -4584,7 +4638,9 @@
|
|
|
4584
4638
|
"symbol",
|
|
4585
4639
|
"asset_id",
|
|
4586
4640
|
"balance",
|
|
4587
|
-
"locked_balance"
|
|
4641
|
+
"locked_balance",
|
|
4642
|
+
"margin_mode",
|
|
4643
|
+
"margin_balance"
|
|
4588
4644
|
]
|
|
4589
4645
|
},
|
|
4590
4646
|
"AccountLimits": {
|
|
@@ -5336,6 +5392,30 @@
|
|
|
5336
5392
|
"l1_address": {
|
|
5337
5393
|
"type": "string",
|
|
5338
5394
|
"example": "0x0000000000000000000000000000000000000000"
|
|
5395
|
+
},
|
|
5396
|
+
"loan_to_value": {
|
|
5397
|
+
"type": "string",
|
|
5398
|
+
"example": "0.5"
|
|
5399
|
+
},
|
|
5400
|
+
"liquidation_threshold": {
|
|
5401
|
+
"type": "string",
|
|
5402
|
+
"example": "0.8"
|
|
5403
|
+
},
|
|
5404
|
+
"liquidation_fee": {
|
|
5405
|
+
"type": "string",
|
|
5406
|
+
"example": "0.01"
|
|
5407
|
+
},
|
|
5408
|
+
"global_supply_cap": {
|
|
5409
|
+
"type": "string",
|
|
5410
|
+
"example": "1000000"
|
|
5411
|
+
},
|
|
5412
|
+
"user_supply_cap": {
|
|
5413
|
+
"type": "string",
|
|
5414
|
+
"example": "1000"
|
|
5415
|
+
},
|
|
5416
|
+
"total_supplied": {
|
|
5417
|
+
"type": "string",
|
|
5418
|
+
"example": "100"
|
|
5339
5419
|
}
|
|
5340
5420
|
},
|
|
5341
5421
|
"title": "Asset",
|
|
@@ -5348,7 +5428,13 @@
|
|
|
5348
5428
|
"min_withdrawal_amount",
|
|
5349
5429
|
"margin_mode",
|
|
5350
5430
|
"index_price",
|
|
5351
|
-
"l1_address"
|
|
5431
|
+
"l1_address",
|
|
5432
|
+
"loan_to_value",
|
|
5433
|
+
"liquidation_threshold",
|
|
5434
|
+
"liquidation_fee",
|
|
5435
|
+
"global_supply_cap",
|
|
5436
|
+
"user_supply_cap",
|
|
5437
|
+
"total_supplied"
|
|
5352
5438
|
]
|
|
5353
5439
|
},
|
|
5354
5440
|
"AssetDetails": {
|
|
@@ -8823,12 +8909,21 @@
|
|
|
8823
8909
|
"base_amount": {
|
|
8824
8910
|
"type": "string"
|
|
8825
8911
|
},
|
|
8826
|
-
"telegram_handle": {
|
|
8827
|
-
"type": "string"
|
|
8828
|
-
},
|
|
8829
8912
|
"status": {
|
|
8830
8913
|
"type": "string"
|
|
8831
8914
|
},
|
|
8915
|
+
"responses": {
|
|
8916
|
+
"type": "array",
|
|
8917
|
+
"items": {
|
|
8918
|
+
"$ref": "#/definitions/RFQResponseEntry"
|
|
8919
|
+
},
|
|
8920
|
+
"400": {
|
|
8921
|
+
"description": "Bad request",
|
|
8922
|
+
"schema": {
|
|
8923
|
+
"$ref": "#/definitions/ResultCode"
|
|
8924
|
+
}
|
|
8925
|
+
}
|
|
8926
|
+
},
|
|
8832
8927
|
"created_at": {
|
|
8833
8928
|
"type": "integer",
|
|
8834
8929
|
"format": "int64"
|
|
@@ -8845,12 +8940,39 @@
|
|
|
8845
8940
|
"market_index",
|
|
8846
8941
|
"direction",
|
|
8847
8942
|
"base_amount",
|
|
8848
|
-
"telegram_handle",
|
|
8849
8943
|
"status",
|
|
8944
|
+
"responses",
|
|
8850
8945
|
"created_at",
|
|
8851
8946
|
"updated_at"
|
|
8852
8947
|
]
|
|
8853
8948
|
},
|
|
8949
|
+
"RFQResponseEntry": {
|
|
8950
|
+
"type": "object",
|
|
8951
|
+
"properties": {
|
|
8952
|
+
"account_index": {
|
|
8953
|
+
"type": "integer",
|
|
8954
|
+
"format": "int64"
|
|
8955
|
+
},
|
|
8956
|
+
"status": {
|
|
8957
|
+
"type": "string"
|
|
8958
|
+
},
|
|
8959
|
+
"responded_at": {
|
|
8960
|
+
"type": "integer",
|
|
8961
|
+
"format": "int64"
|
|
8962
|
+
},
|
|
8963
|
+
"updated_at": {
|
|
8964
|
+
"type": "integer",
|
|
8965
|
+
"format": "int64"
|
|
8966
|
+
}
|
|
8967
|
+
},
|
|
8968
|
+
"title": "RFQResponseEntry",
|
|
8969
|
+
"required": [
|
|
8970
|
+
"account_index",
|
|
8971
|
+
"status",
|
|
8972
|
+
"responded_at",
|
|
8973
|
+
"updated_at"
|
|
8974
|
+
]
|
|
8975
|
+
},
|
|
8854
8976
|
"Referral": {
|
|
8855
8977
|
"type": "object",
|
|
8856
8978
|
"properties": {
|
|
@@ -9089,10 +9211,6 @@
|
|
|
9089
9211
|
"auth": {
|
|
9090
9212
|
"type": "string"
|
|
9091
9213
|
},
|
|
9092
|
-
"account_index": {
|
|
9093
|
-
"type": "integer",
|
|
9094
|
-
"format": "int64"
|
|
9095
|
-
},
|
|
9096
9214
|
"market_index": {
|
|
9097
9215
|
"type": "integer",
|
|
9098
9216
|
"format": "int16"
|
|
@@ -9107,14 +9225,10 @@
|
|
|
9107
9225
|
"0",
|
|
9108
9226
|
"1"
|
|
9109
9227
|
]
|
|
9110
|
-
},
|
|
9111
|
-
"telegram_handle": {
|
|
9112
|
-
"type": "string"
|
|
9113
9228
|
}
|
|
9114
9229
|
},
|
|
9115
9230
|
"title": "ReqCreateRFQ",
|
|
9116
9231
|
"required": [
|
|
9117
|
-
"account_index",
|
|
9118
9232
|
"market_index",
|
|
9119
9233
|
"base_amount",
|
|
9120
9234
|
"direction"
|
|
@@ -9529,8 +9643,7 @@
|
|
|
9529
9643
|
"properties": {
|
|
9530
9644
|
"asset_id": {
|
|
9531
9645
|
"type": "integer",
|
|
9532
|
-
"format": "int16"
|
|
9533
|
-
"default": "0"
|
|
9646
|
+
"format": "int16"
|
|
9534
9647
|
}
|
|
9535
9648
|
},
|
|
9536
9649
|
"title": "ReqGetAssetDetails"
|
|
@@ -10681,6 +10794,31 @@
|
|
|
10681
10794
|
"platform"
|
|
10682
10795
|
]
|
|
10683
10796
|
},
|
|
10797
|
+
"ReqRespondToRFQ": {
|
|
10798
|
+
"type": "object",
|
|
10799
|
+
"properties": {
|
|
10800
|
+
"auth": {
|
|
10801
|
+
"type": "string"
|
|
10802
|
+
},
|
|
10803
|
+
"rfq_id": {
|
|
10804
|
+
"type": "integer",
|
|
10805
|
+
"format": "int64"
|
|
10806
|
+
},
|
|
10807
|
+
"status": {
|
|
10808
|
+
"type": "string",
|
|
10809
|
+
"enum": [
|
|
10810
|
+
"acknowledged",
|
|
10811
|
+
"liquidity_provided",
|
|
10812
|
+
"not_interested"
|
|
10813
|
+
]
|
|
10814
|
+
}
|
|
10815
|
+
},
|
|
10816
|
+
"title": "ReqRespondToRFQ",
|
|
10817
|
+
"required": [
|
|
10818
|
+
"rfq_id",
|
|
10819
|
+
"status"
|
|
10820
|
+
]
|
|
10821
|
+
},
|
|
10684
10822
|
"ReqRevokeApiToken": {
|
|
10685
10823
|
"type": "object",
|
|
10686
10824
|
"properties": {
|
|
@@ -10959,12 +11097,21 @@
|
|
|
10959
11097
|
"base_amount": {
|
|
10960
11098
|
"type": "string"
|
|
10961
11099
|
},
|
|
10962
|
-
"telegram_handle": {
|
|
10963
|
-
"type": "string"
|
|
10964
|
-
},
|
|
10965
11100
|
"status": {
|
|
10966
11101
|
"type": "string"
|
|
10967
11102
|
},
|
|
11103
|
+
"responses": {
|
|
11104
|
+
"type": "array",
|
|
11105
|
+
"items": {
|
|
11106
|
+
"$ref": "#/definitions/RFQResponseEntry"
|
|
11107
|
+
},
|
|
11108
|
+
"400": {
|
|
11109
|
+
"description": "Bad request",
|
|
11110
|
+
"schema": {
|
|
11111
|
+
"$ref": "#/definitions/ResultCode"
|
|
11112
|
+
}
|
|
11113
|
+
}
|
|
11114
|
+
},
|
|
10968
11115
|
"created_at": {
|
|
10969
11116
|
"type": "integer",
|
|
10970
11117
|
"format": "int64"
|
|
@@ -10982,8 +11129,8 @@
|
|
|
10982
11129
|
"market_index",
|
|
10983
11130
|
"direction",
|
|
10984
11131
|
"base_amount",
|
|
10985
|
-
"telegram_handle",
|
|
10986
11132
|
"status",
|
|
11133
|
+
"responses",
|
|
10987
11134
|
"created_at",
|
|
10988
11135
|
"updated_at"
|
|
10989
11136
|
]
|
|
@@ -11298,12 +11445,21 @@
|
|
|
11298
11445
|
"base_amount": {
|
|
11299
11446
|
"type": "string"
|
|
11300
11447
|
},
|
|
11301
|
-
"telegram_handle": {
|
|
11302
|
-
"type": "string"
|
|
11303
|
-
},
|
|
11304
11448
|
"status": {
|
|
11305
11449
|
"type": "string"
|
|
11306
11450
|
},
|
|
11451
|
+
"responses": {
|
|
11452
|
+
"type": "array",
|
|
11453
|
+
"items": {
|
|
11454
|
+
"$ref": "#/definitions/RFQResponseEntry"
|
|
11455
|
+
},
|
|
11456
|
+
"400": {
|
|
11457
|
+
"description": "Bad request",
|
|
11458
|
+
"schema": {
|
|
11459
|
+
"$ref": "#/definitions/ResultCode"
|
|
11460
|
+
}
|
|
11461
|
+
}
|
|
11462
|
+
},
|
|
11307
11463
|
"created_at": {
|
|
11308
11464
|
"type": "integer",
|
|
11309
11465
|
"format": "int64"
|
|
@@ -11321,8 +11477,8 @@
|
|
|
11321
11477
|
"market_index",
|
|
11322
11478
|
"direction",
|
|
11323
11479
|
"base_amount",
|
|
11324
|
-
"telegram_handle",
|
|
11325
11480
|
"status",
|
|
11481
|
+
"responses",
|
|
11326
11482
|
"created_at",
|
|
11327
11483
|
"updated_at"
|
|
11328
11484
|
]
|
|
@@ -11432,6 +11588,74 @@
|
|
|
11432
11588
|
"public_pools"
|
|
11433
11589
|
]
|
|
11434
11590
|
},
|
|
11591
|
+
"RespRespondToRFQ": {
|
|
11592
|
+
"type": "object",
|
|
11593
|
+
"properties": {
|
|
11594
|
+
"code": {
|
|
11595
|
+
"type": "integer",
|
|
11596
|
+
"format": "int32",
|
|
11597
|
+
"example": "200"
|
|
11598
|
+
},
|
|
11599
|
+
"message": {
|
|
11600
|
+
"type": "string"
|
|
11601
|
+
},
|
|
11602
|
+
"id": {
|
|
11603
|
+
"type": "integer",
|
|
11604
|
+
"format": "int64"
|
|
11605
|
+
},
|
|
11606
|
+
"account_index": {
|
|
11607
|
+
"type": "integer",
|
|
11608
|
+
"format": "int64"
|
|
11609
|
+
},
|
|
11610
|
+
"market_index": {
|
|
11611
|
+
"type": "integer",
|
|
11612
|
+
"format": "int16"
|
|
11613
|
+
},
|
|
11614
|
+
"direction": {
|
|
11615
|
+
"type": "integer",
|
|
11616
|
+
"format": "int16"
|
|
11617
|
+
},
|
|
11618
|
+
"base_amount": {
|
|
11619
|
+
"type": "string"
|
|
11620
|
+
},
|
|
11621
|
+
"status": {
|
|
11622
|
+
"type": "string"
|
|
11623
|
+
},
|
|
11624
|
+
"responses": {
|
|
11625
|
+
"type": "array",
|
|
11626
|
+
"items": {
|
|
11627
|
+
"$ref": "#/definitions/RFQResponseEntry"
|
|
11628
|
+
},
|
|
11629
|
+
"400": {
|
|
11630
|
+
"description": "Bad request",
|
|
11631
|
+
"schema": {
|
|
11632
|
+
"$ref": "#/definitions/ResultCode"
|
|
11633
|
+
}
|
|
11634
|
+
}
|
|
11635
|
+
},
|
|
11636
|
+
"created_at": {
|
|
11637
|
+
"type": "integer",
|
|
11638
|
+
"format": "int64"
|
|
11639
|
+
},
|
|
11640
|
+
"updated_at": {
|
|
11641
|
+
"type": "integer",
|
|
11642
|
+
"format": "int64"
|
|
11643
|
+
}
|
|
11644
|
+
},
|
|
11645
|
+
"title": "RespRespondToRFQ",
|
|
11646
|
+
"required": [
|
|
11647
|
+
"code",
|
|
11648
|
+
"id",
|
|
11649
|
+
"account_index",
|
|
11650
|
+
"market_index",
|
|
11651
|
+
"direction",
|
|
11652
|
+
"base_amount",
|
|
11653
|
+
"status",
|
|
11654
|
+
"responses",
|
|
11655
|
+
"created_at",
|
|
11656
|
+
"updated_at"
|
|
11657
|
+
]
|
|
11658
|
+
},
|
|
11435
11659
|
"RespRevokeApiToken": {
|
|
11436
11660
|
"type": "object",
|
|
11437
11661
|
"properties": {
|
|
@@ -12483,6 +12707,26 @@
|
|
|
12483
12707
|
"bid_account_pnl": {
|
|
12484
12708
|
"type": "string",
|
|
12485
12709
|
"example": "1967"
|
|
12710
|
+
},
|
|
12711
|
+
"integrator_taker_fee": {
|
|
12712
|
+
"type": "integer",
|
|
12713
|
+
"format": "int32",
|
|
12714
|
+
"example": "50"
|
|
12715
|
+
},
|
|
12716
|
+
"integrator_taker_fee_collector_index": {
|
|
12717
|
+
"type": "integer",
|
|
12718
|
+
"format": "int64",
|
|
12719
|
+
"example": "156"
|
|
12720
|
+
},
|
|
12721
|
+
"integrator_maker_fee": {
|
|
12722
|
+
"type": "integer",
|
|
12723
|
+
"format": "int32",
|
|
12724
|
+
"example": "50"
|
|
12725
|
+
},
|
|
12726
|
+
"integrator_maker_fee_collector_index": {
|
|
12727
|
+
"type": "integer",
|
|
12728
|
+
"format": "int64",
|
|
12729
|
+
"example": "156"
|
|
12486
12730
|
}
|
|
12487
12731
|
},
|
|
12488
12732
|
"title": "Trade",
|
|
@@ -12516,7 +12760,11 @@
|
|
|
12516
12760
|
"maker_position_sign_changed",
|
|
12517
12761
|
"transaction_time",
|
|
12518
12762
|
"ask_account_pnl",
|
|
12519
|
-
"bid_account_pnl"
|
|
12763
|
+
"bid_account_pnl",
|
|
12764
|
+
"integrator_taker_fee",
|
|
12765
|
+
"integrator_taker_fee_collector_index",
|
|
12766
|
+
"integrator_maker_fee",
|
|
12767
|
+
"integrator_maker_fee_collector_index"
|
|
12520
12768
|
]
|
|
12521
12769
|
},
|
|
12522
12770
|
"TradeStats": {
|