zklighter-perps 1.0.238 → 1.0.240
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 +6 -0
- package/apis/AccountApi.ts +56 -0
- package/apis/OrderApi.ts +65 -0
- package/models/AccountAsset.ts +29 -0
- package/models/Asset.ts +63 -0
- package/models/MarketMetricData.ts +70 -0
- package/models/OrderBook.ts +18 -0
- package/models/PartnerStats.ts +159 -0
- package/models/PerpsMarketStats.ts +9 -0
- package/models/PerpsOrderBookDetail.ts +18 -0
- package/models/ReqGetMarketMetrics.ts +80 -0
- package/models/ReqGetPartnerStats.ts +77 -0
- package/models/RespGetMarketMetrics.ts +85 -0
- package/models/SpotOrderBookDetail.ts +18 -0
- package/models/index.ts +6 -0
- package/openapi.json +352 -6
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -37,6 +37,7 @@ models/ApiToken.ts
|
|
|
37
37
|
models/ApprovedIntegrator.ts
|
|
38
38
|
models/Asset.ts
|
|
39
39
|
models/AssetDetails.ts
|
|
40
|
+
models/AssetStats.ts
|
|
40
41
|
models/Auth.ts
|
|
41
42
|
models/Block.ts
|
|
42
43
|
models/Blocks.ts
|
|
@@ -85,6 +86,7 @@ models/Liquidation.ts
|
|
|
85
86
|
models/LiquidationInfo.ts
|
|
86
87
|
models/LiquidationInfos.ts
|
|
87
88
|
models/MarketConfig.ts
|
|
89
|
+
models/MarketMetricData.ts
|
|
88
90
|
models/NextNonce.ts
|
|
89
91
|
models/Order.ts
|
|
90
92
|
models/OrderBook.ts
|
|
@@ -95,6 +97,7 @@ models/OrderBookOrders.ts
|
|
|
95
97
|
models/OrderBookStats.ts
|
|
96
98
|
models/OrderBooks.ts
|
|
97
99
|
models/Orders.ts
|
|
100
|
+
models/PartnerStats.ts
|
|
98
101
|
models/PendingUnlock.ts
|
|
99
102
|
models/PerpsMarketStats.ts
|
|
100
103
|
models/PerpsOrderBookDetail.ts
|
|
@@ -146,10 +149,12 @@ models/ReqGetLeaderboard.ts
|
|
|
146
149
|
models/ReqGetLeases.ts
|
|
147
150
|
models/ReqGetLiquidationInfos.ts
|
|
148
151
|
models/ReqGetMakerOnlyApiKeys.ts
|
|
152
|
+
models/ReqGetMarketMetrics.ts
|
|
149
153
|
models/ReqGetNextNonce.ts
|
|
150
154
|
models/ReqGetOrderBookDetails.ts
|
|
151
155
|
models/ReqGetOrderBookOrders.ts
|
|
152
156
|
models/ReqGetOrderBooks.ts
|
|
157
|
+
models/ReqGetPartnerStats.ts
|
|
153
158
|
models/ReqGetPositionFunding.ts
|
|
154
159
|
models/ReqGetPublicPoolsMetadata.ts
|
|
155
160
|
models/ReqGetPushNotifSettings.ts
|
|
@@ -180,6 +185,7 @@ models/RespGetIsNextBridgeFast.ts
|
|
|
180
185
|
models/RespGetLeaseOptions.ts
|
|
181
186
|
models/RespGetLeases.ts
|
|
182
187
|
models/RespGetMakerOnlyApiKeys.ts
|
|
188
|
+
models/RespGetMarketMetrics.ts
|
|
183
189
|
models/RespGetPushNotifSettings.ts
|
|
184
190
|
models/RespGetRFQ.ts
|
|
185
191
|
models/RespListRFQs.ts
|
package/apis/AccountApi.ts
CHANGED
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
L1Metadata,
|
|
26
26
|
Leaderboard,
|
|
27
27
|
LiquidationInfos,
|
|
28
|
+
PartnerStats,
|
|
28
29
|
PositionFundings,
|
|
29
30
|
RespChangeAccountTier,
|
|
30
31
|
RespCreateRFQ,
|
|
@@ -65,6 +66,8 @@ import {
|
|
|
65
66
|
LeaderboardToJSON,
|
|
66
67
|
LiquidationInfosFromJSON,
|
|
67
68
|
LiquidationInfosToJSON,
|
|
69
|
+
PartnerStatsFromJSON,
|
|
70
|
+
PartnerStatsToJSON,
|
|
68
71
|
PositionFundingsFromJSON,
|
|
69
72
|
PositionFundingsToJSON,
|
|
70
73
|
RespChangeAccountTierFromJSON,
|
|
@@ -208,6 +211,12 @@ export interface LitLeaseRequest {
|
|
|
208
211
|
authorization?: string;
|
|
209
212
|
}
|
|
210
213
|
|
|
214
|
+
export interface PartnerStatsRequest {
|
|
215
|
+
account_index: number;
|
|
216
|
+
start_timestamp?: number;
|
|
217
|
+
end_timestamp?: number;
|
|
218
|
+
}
|
|
219
|
+
|
|
211
220
|
export interface PnlRequest {
|
|
212
221
|
by: PnlByEnum;
|
|
213
222
|
value: string;
|
|
@@ -1234,6 +1243,53 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
1234
1243
|
return await response.value();
|
|
1235
1244
|
}
|
|
1236
1245
|
|
|
1246
|
+
/**
|
|
1247
|
+
* Get partner stats
|
|
1248
|
+
* partnerStats
|
|
1249
|
+
*/
|
|
1250
|
+
async partnerStatsRaw(requestParameters: PartnerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PartnerStats>> {
|
|
1251
|
+
if (requestParameters['account_index'] == null) {
|
|
1252
|
+
throw new runtime.RequiredError(
|
|
1253
|
+
'account_index',
|
|
1254
|
+
'Required parameter "account_index" was null or undefined when calling partnerStats().'
|
|
1255
|
+
);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
const queryParameters: any = {};
|
|
1259
|
+
|
|
1260
|
+
if (requestParameters['account_index'] != null) {
|
|
1261
|
+
queryParameters['account_index'] = requestParameters['account_index'];
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
if (requestParameters['start_timestamp'] != null) {
|
|
1265
|
+
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
if (requestParameters['end_timestamp'] != null) {
|
|
1269
|
+
queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1273
|
+
|
|
1274
|
+
const response = await this.request({
|
|
1275
|
+
path: `/api/v1/partnerStats`,
|
|
1276
|
+
method: 'GET',
|
|
1277
|
+
headers: headerParameters,
|
|
1278
|
+
query: queryParameters,
|
|
1279
|
+
}, initOverrides);
|
|
1280
|
+
|
|
1281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PartnerStatsFromJSON(jsonValue));
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Get partner stats
|
|
1286
|
+
* partnerStats
|
|
1287
|
+
*/
|
|
1288
|
+
async partnerStats(requestParameters: PartnerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PartnerStats> {
|
|
1289
|
+
const response = await this.partnerStatsRaw(requestParameters, initOverrides);
|
|
1290
|
+
return await response.value();
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1237
1293
|
/**
|
|
1238
1294
|
* Get account PnL chart
|
|
1239
1295
|
* pnl
|
package/apis/OrderApi.ts
CHANGED
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
Orders,
|
|
25
25
|
RespGetExchangeMetrics,
|
|
26
26
|
RespGetExecuteStats,
|
|
27
|
+
RespGetMarketMetrics,
|
|
27
28
|
ResultCode,
|
|
28
29
|
Trades,
|
|
29
30
|
} from '../models/index';
|
|
@@ -46,6 +47,8 @@ import {
|
|
|
46
47
|
RespGetExchangeMetricsToJSON,
|
|
47
48
|
RespGetExecuteStatsFromJSON,
|
|
48
49
|
RespGetExecuteStatsToJSON,
|
|
50
|
+
RespGetMarketMetricsFromJSON,
|
|
51
|
+
RespGetMarketMetricsToJSON,
|
|
49
52
|
ResultCodeFromJSON,
|
|
50
53
|
ResultCodeToJSON,
|
|
51
54
|
TradesFromJSON,
|
|
@@ -100,6 +103,11 @@ export interface ExecuteStatsRequest {
|
|
|
100
103
|
period: ExecuteStatsPeriodEnum;
|
|
101
104
|
}
|
|
102
105
|
|
|
106
|
+
export interface MarketMetricsRequest {
|
|
107
|
+
timestamp: number;
|
|
108
|
+
kind: MarketMetricsKindEnum;
|
|
109
|
+
}
|
|
110
|
+
|
|
103
111
|
export interface OrderBookDetailsRequest {
|
|
104
112
|
market_id?: number;
|
|
105
113
|
filter?: OrderBookDetailsFilterEnum;
|
|
@@ -508,6 +516,56 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
508
516
|
return await response.value();
|
|
509
517
|
}
|
|
510
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Get market metrics for a specific timestamp, returns data for all markets
|
|
521
|
+
* marketMetrics
|
|
522
|
+
*/
|
|
523
|
+
async marketMetricsRaw(requestParameters: MarketMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetMarketMetrics>> {
|
|
524
|
+
if (requestParameters['timestamp'] == null) {
|
|
525
|
+
throw new runtime.RequiredError(
|
|
526
|
+
'timestamp',
|
|
527
|
+
'Required parameter "timestamp" was null or undefined when calling marketMetrics().'
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (requestParameters['kind'] == null) {
|
|
532
|
+
throw new runtime.RequiredError(
|
|
533
|
+
'kind',
|
|
534
|
+
'Required parameter "kind" was null or undefined when calling marketMetrics().'
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
const queryParameters: any = {};
|
|
539
|
+
|
|
540
|
+
if (requestParameters['timestamp'] != null) {
|
|
541
|
+
queryParameters['timestamp'] = requestParameters['timestamp'];
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
if (requestParameters['kind'] != null) {
|
|
545
|
+
queryParameters['kind'] = requestParameters['kind'];
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
549
|
+
|
|
550
|
+
const response = await this.request({
|
|
551
|
+
path: `/api/v1/marketMetrics`,
|
|
552
|
+
method: 'GET',
|
|
553
|
+
headers: headerParameters,
|
|
554
|
+
query: queryParameters,
|
|
555
|
+
}, initOverrides);
|
|
556
|
+
|
|
557
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetMarketMetricsFromJSON(jsonValue));
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Get market metrics for a specific timestamp, returns data for all markets
|
|
562
|
+
* marketMetrics
|
|
563
|
+
*/
|
|
564
|
+
async marketMetrics(requestParameters: MarketMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetMarketMetrics> {
|
|
565
|
+
const response = await this.marketMetricsRaw(requestParameters, initOverrides);
|
|
566
|
+
return await response.value();
|
|
567
|
+
}
|
|
568
|
+
|
|
511
569
|
/**
|
|
512
570
|
* Get order books metadata
|
|
513
571
|
* orderBookDetails
|
|
@@ -893,6 +951,13 @@ export const ExecuteStatsPeriodEnum = {
|
|
|
893
951
|
All: 'all'
|
|
894
952
|
} as const;
|
|
895
953
|
export type ExecuteStatsPeriodEnum = typeof ExecuteStatsPeriodEnum[keyof typeof ExecuteStatsPeriodEnum];
|
|
954
|
+
/**
|
|
955
|
+
* @export
|
|
956
|
+
*/
|
|
957
|
+
export const MarketMetricsKindEnum = {
|
|
958
|
+
Volume: 'volume'
|
|
959
|
+
} as const;
|
|
960
|
+
export type MarketMetricsKindEnum = typeof MarketMetricsKindEnum[keyof typeof MarketMetricsKindEnum];
|
|
896
961
|
/**
|
|
897
962
|
* @export
|
|
898
963
|
*/
|
package/models/AccountAsset.ts
CHANGED
|
@@ -43,8 +43,31 @@ export interface AccountAsset {
|
|
|
43
43
|
* @memberof AccountAsset
|
|
44
44
|
*/
|
|
45
45
|
locked_balance: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof AccountAsset
|
|
50
|
+
*/
|
|
51
|
+
margin_mode: AccountAssetMarginModeEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof AccountAsset
|
|
56
|
+
*/
|
|
57
|
+
margin_balance: string;
|
|
46
58
|
}
|
|
47
59
|
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const AccountAssetMarginModeEnum = {
|
|
65
|
+
Enabled: 'enabled',
|
|
66
|
+
Disabled: 'disabled'
|
|
67
|
+
} as const;
|
|
68
|
+
export type AccountAssetMarginModeEnum = typeof AccountAssetMarginModeEnum[keyof typeof AccountAssetMarginModeEnum];
|
|
69
|
+
|
|
70
|
+
|
|
48
71
|
/**
|
|
49
72
|
* Check if a given object implements the AccountAsset interface.
|
|
50
73
|
*/
|
|
@@ -53,6 +76,8 @@ export function instanceOfAccountAsset(value: object): value is AccountAsset {
|
|
|
53
76
|
if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
|
|
54
77
|
if (!('balance' in value) || value['balance'] === undefined) return false;
|
|
55
78
|
if (!('locked_balance' in value) || value['locked_balance'] === undefined) return false;
|
|
79
|
+
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
80
|
+
if (!('margin_balance' in value) || value['margin_balance'] === undefined) return false;
|
|
56
81
|
return true;
|
|
57
82
|
}
|
|
58
83
|
|
|
@@ -70,6 +95,8 @@ export function AccountAssetFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
70
95
|
'asset_id': json['asset_id'],
|
|
71
96
|
'balance': json['balance'],
|
|
72
97
|
'locked_balance': json['locked_balance'],
|
|
98
|
+
'margin_mode': json['margin_mode'],
|
|
99
|
+
'margin_balance': json['margin_balance'],
|
|
73
100
|
};
|
|
74
101
|
}
|
|
75
102
|
|
|
@@ -83,6 +110,8 @@ export function AccountAssetToJSON(value?: AccountAsset | null): any {
|
|
|
83
110
|
'asset_id': value['asset_id'],
|
|
84
111
|
'balance': value['balance'],
|
|
85
112
|
'locked_balance': value['locked_balance'],
|
|
113
|
+
'margin_mode': value['margin_mode'],
|
|
114
|
+
'margin_balance': value['margin_balance'],
|
|
86
115
|
};
|
|
87
116
|
}
|
|
88
117
|
|
package/models/Asset.ts
CHANGED
|
@@ -67,12 +67,54 @@ export interface Asset {
|
|
|
67
67
|
* @memberof Asset
|
|
68
68
|
*/
|
|
69
69
|
index_price: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof Asset
|
|
74
|
+
*/
|
|
75
|
+
price_decimals: number;
|
|
70
76
|
/**
|
|
71
77
|
*
|
|
72
78
|
* @type {string}
|
|
73
79
|
* @memberof Asset
|
|
74
80
|
*/
|
|
75
81
|
l1_address: string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof Asset
|
|
86
|
+
*/
|
|
87
|
+
loan_to_value: string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Asset
|
|
92
|
+
*/
|
|
93
|
+
liquidation_threshold: string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @memberof Asset
|
|
98
|
+
*/
|
|
99
|
+
liquidation_fee: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof Asset
|
|
104
|
+
*/
|
|
105
|
+
global_supply_cap: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof Asset
|
|
110
|
+
*/
|
|
111
|
+
user_supply_cap: string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Asset
|
|
116
|
+
*/
|
|
117
|
+
total_supplied: string;
|
|
76
118
|
}
|
|
77
119
|
|
|
78
120
|
|
|
@@ -98,7 +140,14 @@ export function instanceOfAsset(value: object): value is Asset {
|
|
|
98
140
|
if (!('min_withdrawal_amount' in value) || value['min_withdrawal_amount'] === undefined) return false;
|
|
99
141
|
if (!('margin_mode' in value) || value['margin_mode'] === undefined) return false;
|
|
100
142
|
if (!('index_price' in value) || value['index_price'] === undefined) return false;
|
|
143
|
+
if (!('price_decimals' in value) || value['price_decimals'] === undefined) return false;
|
|
101
144
|
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
145
|
+
if (!('loan_to_value' in value) || value['loan_to_value'] === undefined) return false;
|
|
146
|
+
if (!('liquidation_threshold' in value) || value['liquidation_threshold'] === undefined) return false;
|
|
147
|
+
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
148
|
+
if (!('global_supply_cap' in value) || value['global_supply_cap'] === undefined) return false;
|
|
149
|
+
if (!('user_supply_cap' in value) || value['user_supply_cap'] === undefined) return false;
|
|
150
|
+
if (!('total_supplied' in value) || value['total_supplied'] === undefined) return false;
|
|
102
151
|
return true;
|
|
103
152
|
}
|
|
104
153
|
|
|
@@ -120,7 +169,14 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
|
|
|
120
169
|
'min_withdrawal_amount': json['min_withdrawal_amount'],
|
|
121
170
|
'margin_mode': json['margin_mode'],
|
|
122
171
|
'index_price': json['index_price'],
|
|
172
|
+
'price_decimals': json['price_decimals'],
|
|
123
173
|
'l1_address': json['l1_address'],
|
|
174
|
+
'loan_to_value': json['loan_to_value'],
|
|
175
|
+
'liquidation_threshold': json['liquidation_threshold'],
|
|
176
|
+
'liquidation_fee': json['liquidation_fee'],
|
|
177
|
+
'global_supply_cap': json['global_supply_cap'],
|
|
178
|
+
'user_supply_cap': json['user_supply_cap'],
|
|
179
|
+
'total_supplied': json['total_supplied'],
|
|
124
180
|
};
|
|
125
181
|
}
|
|
126
182
|
|
|
@@ -138,7 +194,14 @@ export function AssetToJSON(value?: Asset | null): any {
|
|
|
138
194
|
'min_withdrawal_amount': value['min_withdrawal_amount'],
|
|
139
195
|
'margin_mode': value['margin_mode'],
|
|
140
196
|
'index_price': value['index_price'],
|
|
197
|
+
'price_decimals': value['price_decimals'],
|
|
141
198
|
'l1_address': value['l1_address'],
|
|
199
|
+
'loan_to_value': value['loan_to_value'],
|
|
200
|
+
'liquidation_threshold': value['liquidation_threshold'],
|
|
201
|
+
'liquidation_fee': value['liquidation_fee'],
|
|
202
|
+
'global_supply_cap': value['global_supply_cap'],
|
|
203
|
+
'user_supply_cap': value['user_supply_cap'],
|
|
204
|
+
'total_supplied': value['total_supplied'],
|
|
142
205
|
};
|
|
143
206
|
}
|
|
144
207
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface MarketMetricData
|
|
20
|
+
*/
|
|
21
|
+
export interface MarketMetricData {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof MarketMetricData
|
|
26
|
+
*/
|
|
27
|
+
market: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MarketMetricData
|
|
32
|
+
*/
|
|
33
|
+
data: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the MarketMetricData interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfMarketMetricData(value: object): value is MarketMetricData {
|
|
40
|
+
if (!('market' in value) || value['market'] === undefined) return false;
|
|
41
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function MarketMetricDataFromJSON(json: any): MarketMetricData {
|
|
46
|
+
return MarketMetricDataFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function MarketMetricDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketMetricData {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'market': json['market'],
|
|
56
|
+
'data': json['data'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function MarketMetricDataToJSON(value?: MarketMetricData | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'market': value['market'],
|
|
67
|
+
'data': value['data'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/models/OrderBook.ts
CHANGED
|
@@ -61,12 +61,24 @@ export interface OrderBook {
|
|
|
61
61
|
* @memberof OrderBook
|
|
62
62
|
*/
|
|
63
63
|
taker_fee: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {boolean}
|
|
67
|
+
* @memberof OrderBook
|
|
68
|
+
*/
|
|
69
|
+
is_taker_fee_enabled: boolean;
|
|
64
70
|
/**
|
|
65
71
|
*
|
|
66
72
|
* @type {string}
|
|
67
73
|
* @memberof OrderBook
|
|
68
74
|
*/
|
|
69
75
|
maker_fee: string;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof OrderBook
|
|
80
|
+
*/
|
|
81
|
+
is_maker_fee_enabled: boolean;
|
|
70
82
|
/**
|
|
71
83
|
*
|
|
72
84
|
* @type {string}
|
|
@@ -142,7 +154,9 @@ export function instanceOfOrderBook(value: object): value is OrderBook {
|
|
|
142
154
|
if (!('quote_asset_id' in value) || value['quote_asset_id'] === undefined) return false;
|
|
143
155
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
144
156
|
if (!('taker_fee' in value) || value['taker_fee'] === undefined) return false;
|
|
157
|
+
if (!('is_taker_fee_enabled' in value) || value['is_taker_fee_enabled'] === undefined) return false;
|
|
145
158
|
if (!('maker_fee' in value) || value['maker_fee'] === undefined) return false;
|
|
159
|
+
if (!('is_maker_fee_enabled' in value) || value['is_maker_fee_enabled'] === undefined) return false;
|
|
146
160
|
if (!('liquidation_fee' in value) || value['liquidation_fee'] === undefined) return false;
|
|
147
161
|
if (!('min_base_amount' in value) || value['min_base_amount'] === undefined) return false;
|
|
148
162
|
if (!('min_quote_amount' in value) || value['min_quote_amount'] === undefined) return false;
|
|
@@ -170,7 +184,9 @@ export function OrderBookFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
170
184
|
'quote_asset_id': json['quote_asset_id'],
|
|
171
185
|
'status': json['status'],
|
|
172
186
|
'taker_fee': json['taker_fee'],
|
|
187
|
+
'is_taker_fee_enabled': json['is_taker_fee_enabled'],
|
|
173
188
|
'maker_fee': json['maker_fee'],
|
|
189
|
+
'is_maker_fee_enabled': json['is_maker_fee_enabled'],
|
|
174
190
|
'liquidation_fee': json['liquidation_fee'],
|
|
175
191
|
'min_base_amount': json['min_base_amount'],
|
|
176
192
|
'min_quote_amount': json['min_quote_amount'],
|
|
@@ -194,7 +210,9 @@ export function OrderBookToJSON(value?: OrderBook | null): any {
|
|
|
194
210
|
'quote_asset_id': value['quote_asset_id'],
|
|
195
211
|
'status': value['status'],
|
|
196
212
|
'taker_fee': value['taker_fee'],
|
|
213
|
+
'is_taker_fee_enabled': value['is_taker_fee_enabled'],
|
|
197
214
|
'maker_fee': value['maker_fee'],
|
|
215
|
+
'is_maker_fee_enabled': value['is_maker_fee_enabled'],
|
|
198
216
|
'liquidation_fee': value['liquidation_fee'],
|
|
199
217
|
'min_base_amount': value['min_base_amount'],
|
|
200
218
|
'min_quote_amount': value['min_quote_amount'],
|
|
@@ -0,0 +1,159 @@
|
|
|
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 PartnerStats
|
|
20
|
+
*/
|
|
21
|
+
export interface PartnerStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PartnerStats
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PartnerStats
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PartnerStats
|
|
38
|
+
*/
|
|
39
|
+
total_fees_earned: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PartnerStats
|
|
44
|
+
*/
|
|
45
|
+
total_taker_fees_earned: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof PartnerStats
|
|
50
|
+
*/
|
|
51
|
+
total_maker_fees_earned: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof PartnerStats
|
|
56
|
+
*/
|
|
57
|
+
total_volume: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof PartnerStats
|
|
62
|
+
*/
|
|
63
|
+
total_taker_volume: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof PartnerStats
|
|
68
|
+
*/
|
|
69
|
+
total_maker_volume: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof PartnerStats
|
|
74
|
+
*/
|
|
75
|
+
total_trades: number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof PartnerStats
|
|
80
|
+
*/
|
|
81
|
+
total_taker_trades: number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof PartnerStats
|
|
86
|
+
*/
|
|
87
|
+
total_maker_trades: number;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof PartnerStats
|
|
92
|
+
*/
|
|
93
|
+
unique_clients: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the PartnerStats interface.
|
|
98
|
+
*/
|
|
99
|
+
export function instanceOfPartnerStats(value: object): value is PartnerStats {
|
|
100
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
101
|
+
if (!('total_fees_earned' in value) || value['total_fees_earned'] === undefined) return false;
|
|
102
|
+
if (!('total_taker_fees_earned' in value) || value['total_taker_fees_earned'] === undefined) return false;
|
|
103
|
+
if (!('total_maker_fees_earned' in value) || value['total_maker_fees_earned'] === undefined) return false;
|
|
104
|
+
if (!('total_volume' in value) || value['total_volume'] === undefined) return false;
|
|
105
|
+
if (!('total_taker_volume' in value) || value['total_taker_volume'] === undefined) return false;
|
|
106
|
+
if (!('total_maker_volume' in value) || value['total_maker_volume'] === undefined) return false;
|
|
107
|
+
if (!('total_trades' in value) || value['total_trades'] === undefined) return false;
|
|
108
|
+
if (!('total_taker_trades' in value) || value['total_taker_trades'] === undefined) return false;
|
|
109
|
+
if (!('total_maker_trades' in value) || value['total_maker_trades'] === undefined) return false;
|
|
110
|
+
if (!('unique_clients' in value) || value['unique_clients'] === undefined) return false;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function PartnerStatsFromJSON(json: any): PartnerStats {
|
|
115
|
+
return PartnerStatsFromJSONTyped(json, false);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function PartnerStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PartnerStats {
|
|
119
|
+
if (json == null) {
|
|
120
|
+
return json;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
|
|
124
|
+
'code': json['code'],
|
|
125
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
126
|
+
'total_fees_earned': json['total_fees_earned'],
|
|
127
|
+
'total_taker_fees_earned': json['total_taker_fees_earned'],
|
|
128
|
+
'total_maker_fees_earned': json['total_maker_fees_earned'],
|
|
129
|
+
'total_volume': json['total_volume'],
|
|
130
|
+
'total_taker_volume': json['total_taker_volume'],
|
|
131
|
+
'total_maker_volume': json['total_maker_volume'],
|
|
132
|
+
'total_trades': json['total_trades'],
|
|
133
|
+
'total_taker_trades': json['total_taker_trades'],
|
|
134
|
+
'total_maker_trades': json['total_maker_trades'],
|
|
135
|
+
'unique_clients': json['unique_clients'],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function PartnerStatsToJSON(value?: PartnerStats | null): any {
|
|
140
|
+
if (value == null) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
|
|
145
|
+
'code': value['code'],
|
|
146
|
+
'message': value['message'],
|
|
147
|
+
'total_fees_earned': value['total_fees_earned'],
|
|
148
|
+
'total_taker_fees_earned': value['total_taker_fees_earned'],
|
|
149
|
+
'total_maker_fees_earned': value['total_maker_fees_earned'],
|
|
150
|
+
'total_volume': value['total_volume'],
|
|
151
|
+
'total_taker_volume': value['total_taker_volume'],
|
|
152
|
+
'total_maker_volume': value['total_maker_volume'],
|
|
153
|
+
'total_trades': value['total_trades'],
|
|
154
|
+
'total_taker_trades': value['total_taker_trades'],
|
|
155
|
+
'total_maker_trades': value['total_maker_trades'],
|
|
156
|
+
'unique_clients': value['unique_clients'],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|