zklighter-perps 1.0.120 → 1.0.122
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 +10 -0
- package/apis/AccountApi.ts +231 -8
- package/apis/BridgeApi.ts +12 -16
- package/apis/NotificationApi.ts +6 -8
- package/apis/OrderApi.ts +17 -16
- package/apis/ReferralApi.ts +18 -24
- package/apis/TransactionApi.ts +17 -16
- package/models/AccountMetadata.ts +11 -11
- package/models/AccountMetadatas.ts +9 -9
- package/models/DetailedAccount.ts +11 -11
- package/models/L1Metadata.ts +79 -0
- package/models/LiqTrade.ts +88 -0
- package/models/Liquidation.ts +56 -23
- package/models/LiquidationInfo.ts +107 -0
- package/models/LiquidationInfos.ts +93 -0
- package/models/PublicPool.ts +11 -11
- package/models/ReqGetAccountActiveOrders.ts +3 -4
- package/models/ReqGetAccountInactiveOrders.ts +3 -4
- package/models/ReqGetAccountLimits.ts +3 -4
- package/models/ReqGetDepositHistory.ts +3 -4
- package/models/ReqGetFastWithdrawInfo.ts +3 -4
- package/models/ReqGetL1Metadata.ts +69 -0
- package/models/ReqGetLiquidationInfos.ts +94 -0
- package/models/ReqGetReferralCode.ts +3 -4
- package/models/ReqGetReferralPoints.ts +3 -4
- package/models/ReqGetWithdrawHistory.ts +3 -4
- package/models/RiskInfo.ts +97 -0
- package/models/index.ts +10 -0
- package/openapi.json +616 -57
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
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 { Liquidation } from './Liquidation';
|
|
17
|
+
import {
|
|
18
|
+
LiquidationFromJSON,
|
|
19
|
+
LiquidationFromJSONTyped,
|
|
20
|
+
LiquidationToJSON,
|
|
21
|
+
} from './Liquidation';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface LiquidationInfos
|
|
27
|
+
*/
|
|
28
|
+
export interface LiquidationInfos {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof LiquidationInfos
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof LiquidationInfos
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<Liquidation>}
|
|
44
|
+
* @memberof LiquidationInfos
|
|
45
|
+
*/
|
|
46
|
+
liquidations: Array<Liquidation>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof LiquidationInfos
|
|
51
|
+
*/
|
|
52
|
+
next_cursor?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the LiquidationInfos interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfLiquidationInfos(value: object): value is LiquidationInfos {
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('liquidations' in value) || value['liquidations'] === undefined) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function LiquidationInfosFromJSON(json: any): LiquidationInfos {
|
|
65
|
+
return LiquidationInfosFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function LiquidationInfosFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiquidationInfos {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'code': json['code'],
|
|
75
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
76
|
+
'liquidations': ((json['liquidations'] as Array<any>).map(LiquidationFromJSON)),
|
|
77
|
+
'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function LiquidationInfosToJSON(value?: LiquidationInfos | null): any {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'code': value['code'],
|
|
88
|
+
'message': value['message'],
|
|
89
|
+
'liquidations': ((value['liquidations'] as Array<any>).map(LiquidationToJSON)),
|
|
90
|
+
'next_cursor': value['next_cursor'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
package/models/PublicPool.ts
CHANGED
|
@@ -92,6 +92,12 @@ export interface PublicPool {
|
|
|
92
92
|
* @memberof PublicPool
|
|
93
93
|
*/
|
|
94
94
|
collateral: string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {number}
|
|
98
|
+
* @memberof PublicPool
|
|
99
|
+
*/
|
|
100
|
+
account_index: number;
|
|
95
101
|
/**
|
|
96
102
|
*
|
|
97
103
|
* @type {string}
|
|
@@ -105,23 +111,17 @@ export interface PublicPool {
|
|
|
105
111
|
*/
|
|
106
112
|
description: string;
|
|
107
113
|
/**
|
|
108
|
-
*
|
|
114
|
+
* Remove After FE uses L1 meta endpoint
|
|
109
115
|
* @type {boolean}
|
|
110
116
|
* @memberof PublicPool
|
|
111
117
|
*/
|
|
112
118
|
can_invite: boolean;
|
|
113
119
|
/**
|
|
114
|
-
*
|
|
120
|
+
* Remove After FE uses L1 meta endpoint
|
|
115
121
|
* @type {string}
|
|
116
122
|
* @memberof PublicPool
|
|
117
123
|
*/
|
|
118
124
|
referral_points_percentage: string;
|
|
119
|
-
/**
|
|
120
|
-
*
|
|
121
|
-
* @type {number}
|
|
122
|
-
* @memberof PublicPool
|
|
123
|
-
*/
|
|
124
|
-
max_referral_usage_limit: number;
|
|
125
125
|
/**
|
|
126
126
|
*
|
|
127
127
|
* @type {string}
|
|
@@ -155,11 +155,11 @@ export function instanceOfPublicPool(value: object): value is PublicPool {
|
|
|
155
155
|
if (!('pending_order_count' in value) || value['pending_order_count'] === undefined) return false;
|
|
156
156
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
157
157
|
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
158
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
158
159
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
159
160
|
if (!('description' in value) || value['description'] === undefined) return false;
|
|
160
161
|
if (!('can_invite' in value) || value['can_invite'] === undefined) return false;
|
|
161
162
|
if (!('referral_points_percentage' in value) || value['referral_points_percentage'] === undefined) return false;
|
|
162
|
-
if (!('max_referral_usage_limit' in value) || value['max_referral_usage_limit'] === undefined) return false;
|
|
163
163
|
if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
|
|
164
164
|
if (!('pool_info' in value) || value['pool_info'] === undefined) return false;
|
|
165
165
|
return true;
|
|
@@ -185,11 +185,11 @@ export function PublicPoolFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
185
185
|
'pending_order_count': json['pending_order_count'],
|
|
186
186
|
'status': json['status'],
|
|
187
187
|
'collateral': json['collateral'],
|
|
188
|
+
'account_index': json['account_index'],
|
|
188
189
|
'name': json['name'],
|
|
189
190
|
'description': json['description'],
|
|
190
191
|
'can_invite': json['can_invite'],
|
|
191
192
|
'referral_points_percentage': json['referral_points_percentage'],
|
|
192
|
-
'max_referral_usage_limit': json['max_referral_usage_limit'],
|
|
193
193
|
'total_asset_value': json['total_asset_value'],
|
|
194
194
|
'pool_info': PublicPoolInfoFromJSON(json['pool_info']),
|
|
195
195
|
'account_share': json['account_share'] == null ? undefined : PublicPoolShareFromJSON(json['account_share']),
|
|
@@ -212,11 +212,11 @@ export function PublicPoolToJSON(value?: PublicPool | null): any {
|
|
|
212
212
|
'pending_order_count': value['pending_order_count'],
|
|
213
213
|
'status': value['status'],
|
|
214
214
|
'collateral': value['collateral'],
|
|
215
|
+
'account_index': value['account_index'],
|
|
215
216
|
'name': value['name'],
|
|
216
217
|
'description': value['description'],
|
|
217
218
|
'can_invite': value['can_invite'],
|
|
218
219
|
'referral_points_percentage': value['referral_points_percentage'],
|
|
219
|
-
'max_referral_usage_limit': value['max_referral_usage_limit'],
|
|
220
220
|
'total_asset_value': value['total_asset_value'],
|
|
221
221
|
'pool_info': PublicPoolInfoToJSON(value['pool_info']),
|
|
222
222
|
'account_share': PublicPoolShareToJSON(value['account_share']),
|
|
@@ -32,11 +32,11 @@ export interface ReqGetAccountActiveOrders {
|
|
|
32
32
|
*/
|
|
33
33
|
market_id: number;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* made optional to support header auth clients
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof ReqGetAccountActiveOrders
|
|
38
38
|
*/
|
|
39
|
-
auth
|
|
39
|
+
auth?: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -45,7 +45,6 @@ export interface ReqGetAccountActiveOrders {
|
|
|
45
45
|
export function instanceOfReqGetAccountActiveOrders(value: object): value is ReqGetAccountActiveOrders {
|
|
46
46
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
47
47
|
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
48
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
49
48
|
return true;
|
|
50
49
|
}
|
|
51
50
|
|
|
@@ -61,7 +60,7 @@ export function ReqGetAccountActiveOrdersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
61
60
|
|
|
62
61
|
'account_index': json['account_index'],
|
|
63
62
|
'market_id': json['market_id'],
|
|
64
|
-
'auth': json['auth'],
|
|
63
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -20,11 +20,11 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetAccountInactiveOrders {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* made optional to support header auth clients
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetAccountInactiveOrders
|
|
26
26
|
*/
|
|
27
|
-
auth
|
|
27
|
+
auth?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
@@ -67,7 +67,6 @@ export interface ReqGetAccountInactiveOrders {
|
|
|
67
67
|
* Check if a given object implements the ReqGetAccountInactiveOrders interface.
|
|
68
68
|
*/
|
|
69
69
|
export function instanceOfReqGetAccountInactiveOrders(value: object): value is ReqGetAccountInactiveOrders {
|
|
70
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
71
70
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
72
71
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
73
72
|
return true;
|
|
@@ -83,7 +82,7 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
|
|
|
83
82
|
}
|
|
84
83
|
return {
|
|
85
84
|
|
|
86
|
-
'auth': json['auth'],
|
|
85
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
87
86
|
'account_index': json['account_index'],
|
|
88
87
|
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
89
88
|
'ask_filter': json['ask_filter'] == null ? undefined : json['ask_filter'],
|
|
@@ -26,11 +26,11 @@ export interface ReqGetAccountLimits {
|
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* made optional to support header auth clients
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ReqGetAccountLimits
|
|
32
32
|
*/
|
|
33
|
-
auth
|
|
33
|
+
auth?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -38,7 +38,6 @@ export interface ReqGetAccountLimits {
|
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfReqGetAccountLimits(value: object): value is ReqGetAccountLimits {
|
|
40
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
41
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -53,7 +52,7 @@ export function ReqGetAccountLimitsFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
53
52
|
return {
|
|
54
53
|
|
|
55
54
|
'account_index': json['account_index'],
|
|
56
|
-
'auth': json['auth'],
|
|
55
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -26,11 +26,11 @@ export interface ReqGetDepositHistory {
|
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* made optional to support header auth clients
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ReqGetDepositHistory
|
|
32
32
|
*/
|
|
33
|
-
auth
|
|
33
|
+
auth?: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -68,7 +68,6 @@ export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEn
|
|
|
68
68
|
*/
|
|
69
69
|
export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
|
|
70
70
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
71
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
72
71
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
73
72
|
return true;
|
|
74
73
|
}
|
|
@@ -84,7 +83,7 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
84
83
|
return {
|
|
85
84
|
|
|
86
85
|
'account_index': json['account_index'],
|
|
87
|
-
'auth': json['auth'],
|
|
86
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
88
87
|
'l1_address': json['l1_address'],
|
|
89
88
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
90
89
|
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
@@ -26,11 +26,11 @@ export interface ReqGetFastWithdrawInfo {
|
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* made optional to support header auth clients
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ReqGetFastWithdrawInfo
|
|
32
32
|
*/
|
|
33
|
-
auth
|
|
33
|
+
auth?: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -38,7 +38,6 @@ export interface ReqGetFastWithdrawInfo {
|
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfReqGetFastWithdrawInfo(value: object): value is ReqGetFastWithdrawInfo {
|
|
40
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
41
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -53,7 +52,7 @@ export function ReqGetFastWithdrawInfoFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
53
52
|
return {
|
|
54
53
|
|
|
55
54
|
'account_index': json['account_index'],
|
|
56
|
-
'auth': json['auth'],
|
|
55
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -0,0 +1,69 @@
|
|
|
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 ReqGetL1Metadata
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetL1Metadata {
|
|
22
|
+
/**
|
|
23
|
+
* made optional to support header auth clients
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetL1Metadata
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetL1Metadata
|
|
32
|
+
*/
|
|
33
|
+
l1_address: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ReqGetL1Metadata interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfReqGetL1Metadata(value: object): value is ReqGetL1Metadata {
|
|
40
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ReqGetL1MetadataFromJSON(json: any): ReqGetL1Metadata {
|
|
45
|
+
return ReqGetL1MetadataFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ReqGetL1MetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetL1Metadata {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
55
|
+
'l1_address': json['l1_address'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ReqGetL1MetadataToJSON(value?: ReqGetL1Metadata | null): any {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'auth': value['auth'],
|
|
66
|
+
'l1_address': value['l1_address'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
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 ReqGetLiquidationInfos
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetLiquidationInfos {
|
|
22
|
+
/**
|
|
23
|
+
* made optional to support header auth clients
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetLiquidationInfos
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ReqGetLiquidationInfos
|
|
32
|
+
*/
|
|
33
|
+
account_index: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqGetLiquidationInfos
|
|
38
|
+
*/
|
|
39
|
+
market_id?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ReqGetLiquidationInfos
|
|
44
|
+
*/
|
|
45
|
+
cursor?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ReqGetLiquidationInfos
|
|
50
|
+
*/
|
|
51
|
+
limit: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the ReqGetLiquidationInfos interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfReqGetLiquidationInfos(value: object): value is ReqGetLiquidationInfos {
|
|
58
|
+
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
59
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ReqGetLiquidationInfosFromJSON(json: any): ReqGetLiquidationInfos {
|
|
64
|
+
return ReqGetLiquidationInfosFromJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ReqGetLiquidationInfosFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetLiquidationInfos {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
74
|
+
'account_index': json['account_index'],
|
|
75
|
+
'market_id': json['market_id'] == null ? undefined : json['market_id'],
|
|
76
|
+
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
77
|
+
'limit': json['limit'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ReqGetLiquidationInfosToJSON(value?: ReqGetLiquidationInfos | null): any {
|
|
82
|
+
if (value == null) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'auth': value['auth'],
|
|
88
|
+
'account_index': value['account_index'],
|
|
89
|
+
'market_id': value['market_id'],
|
|
90
|
+
'cursor': value['cursor'],
|
|
91
|
+
'limit': value['limit'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -20,11 +20,11 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetReferralCode {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* made optional to support header auth clients
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetReferralCode
|
|
26
26
|
*/
|
|
27
|
-
auth
|
|
27
|
+
auth?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
@@ -37,7 +37,6 @@ export interface ReqGetReferralCode {
|
|
|
37
37
|
* Check if a given object implements the ReqGetReferralCode interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfReqGetReferralCode(value: object): value is ReqGetReferralCode {
|
|
40
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
41
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
@@ -52,7 +51,7 @@ export function ReqGetReferralCodeFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
52
51
|
}
|
|
53
52
|
return {
|
|
54
53
|
|
|
55
|
-
'auth': json['auth'],
|
|
54
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
56
55
|
'account_index': json['account_index'],
|
|
57
56
|
};
|
|
58
57
|
}
|
|
@@ -20,11 +20,11 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ReqGetReferralPoints {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* made optional to support header auth clients
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof ReqGetReferralPoints
|
|
26
26
|
*/
|
|
27
|
-
auth
|
|
27
|
+
auth?: string;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {number}
|
|
@@ -37,7 +37,6 @@ export interface ReqGetReferralPoints {
|
|
|
37
37
|
* Check if a given object implements the ReqGetReferralPoints interface.
|
|
38
38
|
*/
|
|
39
39
|
export function instanceOfReqGetReferralPoints(value: object): value is ReqGetReferralPoints {
|
|
40
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
41
40
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
@@ -52,7 +51,7 @@ export function ReqGetReferralPointsFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
52
51
|
}
|
|
53
52
|
return {
|
|
54
53
|
|
|
55
|
-
'auth': json['auth'],
|
|
54
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
56
55
|
'account_index': json['account_index'],
|
|
57
56
|
};
|
|
58
57
|
}
|
|
@@ -26,11 +26,11 @@ export interface ReqGetWithdrawHistory {
|
|
|
26
26
|
*/
|
|
27
27
|
account_index: number;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* made optional to support header auth clients
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof ReqGetWithdrawHistory
|
|
32
32
|
*/
|
|
33
|
-
auth
|
|
33
|
+
auth?: string;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
@@ -62,7 +62,6 @@ export type ReqGetWithdrawHistoryFilterEnum = typeof ReqGetWithdrawHistoryFilter
|
|
|
62
62
|
*/
|
|
63
63
|
export function instanceOfReqGetWithdrawHistory(value: object): value is ReqGetWithdrawHistory {
|
|
64
64
|
if (!('account_index' in value) || value['account_index'] === undefined) return false;
|
|
65
|
-
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
66
65
|
return true;
|
|
67
66
|
}
|
|
68
67
|
|
|
@@ -77,7 +76,7 @@ export function ReqGetWithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
77
76
|
return {
|
|
78
77
|
|
|
79
78
|
'account_index': json['account_index'],
|
|
80
|
-
'auth': json['auth'],
|
|
79
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
81
80
|
'cursor': json['cursor'] == null ? undefined : json['cursor'],
|
|
82
81
|
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
83
82
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
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 RiskInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface RiskInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RiskInfo
|
|
26
|
+
*/
|
|
27
|
+
collateral: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RiskInfo
|
|
32
|
+
*/
|
|
33
|
+
total_account_value: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof RiskInfo
|
|
38
|
+
*/
|
|
39
|
+
initial_margin_req: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof RiskInfo
|
|
44
|
+
*/
|
|
45
|
+
maintenance_margin_req: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof RiskInfo
|
|
50
|
+
*/
|
|
51
|
+
close_out_margin_req: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the RiskInfo interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfRiskInfo(value: object): value is RiskInfo {
|
|
58
|
+
if (!('collateral' in value) || value['collateral'] === undefined) return false;
|
|
59
|
+
if (!('total_account_value' in value) || value['total_account_value'] === undefined) return false;
|
|
60
|
+
if (!('initial_margin_req' in value) || value['initial_margin_req'] === undefined) return false;
|
|
61
|
+
if (!('maintenance_margin_req' in value) || value['maintenance_margin_req'] === undefined) return false;
|
|
62
|
+
if (!('close_out_margin_req' in value) || value['close_out_margin_req'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function RiskInfoFromJSON(json: any): RiskInfo {
|
|
67
|
+
return RiskInfoFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function RiskInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RiskInfo {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'collateral': json['collateral'],
|
|
77
|
+
'total_account_value': json['total_account_value'],
|
|
78
|
+
'initial_margin_req': json['initial_margin_req'],
|
|
79
|
+
'maintenance_margin_req': json['maintenance_margin_req'],
|
|
80
|
+
'close_out_margin_req': json['close_out_margin_req'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function RiskInfoToJSON(value?: RiskInfo | null): any {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'collateral': value['collateral'],
|
|
91
|
+
'total_account_value': value['total_account_value'],
|
|
92
|
+
'initial_margin_req': value['initial_margin_req'],
|
|
93
|
+
'maintenance_margin_req': value['maintenance_margin_req'],
|
|
94
|
+
'close_out_margin_req': value['close_out_margin_req'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|