zklighter-perps 1.0.193 → 1.0.195
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 +7 -0
- package/apis/OrderApi.ts +164 -0
- package/models/ExchangeMetric.ts +70 -0
- package/models/ExecuteStat.ts +77 -0
- package/models/ReqGetExchangeMetrics.ts +129 -0
- package/models/ReqGetExecuteStats.ts +76 -0
- package/models/RespGetExchangeMetrics.ts +85 -0
- package/models/RespGetExecuteStats.ts +92 -0
- package/models/SlippageResult.ts +70 -0
- package/models/index.ts +7 -0
- package/openapi.json +299 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -56,7 +56,9 @@ models/DetailedAccount.ts
|
|
|
56
56
|
models/DetailedAccounts.ts
|
|
57
57
|
models/DetailedCandlestick.ts
|
|
58
58
|
models/EnrichedTx.ts
|
|
59
|
+
models/ExchangeMetric.ts
|
|
59
60
|
models/ExchangeStats.ts
|
|
61
|
+
models/ExecuteStat.ts
|
|
60
62
|
models/ExportData.ts
|
|
61
63
|
models/Funding.ts
|
|
62
64
|
models/FundingRate.ts
|
|
@@ -121,6 +123,8 @@ models/ReqGetByAccount.ts
|
|
|
121
123
|
models/ReqGetCandles.ts
|
|
122
124
|
models/ReqGetCandlesticks.ts
|
|
123
125
|
models/ReqGetDepositHistory.ts
|
|
126
|
+
models/ReqGetExchangeMetrics.ts
|
|
127
|
+
models/ReqGetExecuteStats.ts
|
|
124
128
|
models/ReqGetFastWithdrawInfo.ts
|
|
125
129
|
models/ReqGetFundings.ts
|
|
126
130
|
models/ReqGetGeckoOrderbook.ts
|
|
@@ -150,6 +154,8 @@ models/ReqIsWhitelisted.ts
|
|
|
150
154
|
models/RespChangeAccountTier.ts
|
|
151
155
|
models/RespGetApiTokens.ts
|
|
152
156
|
models/RespGetBridgesByL1Addr.ts
|
|
157
|
+
models/RespGetExchangeMetrics.ts
|
|
158
|
+
models/RespGetExecuteStats.ts
|
|
153
159
|
models/RespGetFastBridgeInfo.ts
|
|
154
160
|
models/RespGetFastwithdrawalInfo.ts
|
|
155
161
|
models/RespGetIsNextBridgeFast.ts
|
|
@@ -166,6 +172,7 @@ models/RiskInfo.ts
|
|
|
166
172
|
models/RiskParameters.ts
|
|
167
173
|
models/SharePrice.ts
|
|
168
174
|
models/SimpleOrder.ts
|
|
175
|
+
models/SlippageResult.ts
|
|
169
176
|
models/SpotMarketStats.ts
|
|
170
177
|
models/SpotOrderBookDetail.ts
|
|
171
178
|
models/Status.ts
|
package/apis/OrderApi.ts
CHANGED
|
@@ -22,6 +22,8 @@ import type {
|
|
|
22
22
|
OrderBookOrders,
|
|
23
23
|
OrderBooks,
|
|
24
24
|
Orders,
|
|
25
|
+
RespGetExchangeMetrics,
|
|
26
|
+
RespGetExecuteStats,
|
|
25
27
|
ResultCode,
|
|
26
28
|
Trades,
|
|
27
29
|
} from '../models/index';
|
|
@@ -40,6 +42,10 @@ import {
|
|
|
40
42
|
OrderBooksToJSON,
|
|
41
43
|
OrdersFromJSON,
|
|
42
44
|
OrdersToJSON,
|
|
45
|
+
RespGetExchangeMetricsFromJSON,
|
|
46
|
+
RespGetExchangeMetricsToJSON,
|
|
47
|
+
RespGetExecuteStatsFromJSON,
|
|
48
|
+
RespGetExecuteStatsToJSON,
|
|
43
49
|
ResultCodeFromJSON,
|
|
44
50
|
ResultCodeToJSON,
|
|
45
51
|
TradesFromJSON,
|
|
@@ -76,6 +82,17 @@ export interface AssetDetailsRequest {
|
|
|
76
82
|
asset_id?: number;
|
|
77
83
|
}
|
|
78
84
|
|
|
85
|
+
export interface ExchangeMetricsRequest {
|
|
86
|
+
period: ExchangeMetricsPeriodEnum;
|
|
87
|
+
kind: ExchangeMetricsKindEnum;
|
|
88
|
+
filter?: ExchangeMetricsFilterEnum;
|
|
89
|
+
value?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ExecuteStatsRequest {
|
|
93
|
+
period: ExecuteStatsPeriodEnum;
|
|
94
|
+
}
|
|
95
|
+
|
|
79
96
|
export interface OrderBookDetailsRequest {
|
|
80
97
|
market_id?: number;
|
|
81
98
|
filter?: OrderBookDetailsFilterEnum;
|
|
@@ -337,6 +354,64 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
337
354
|
return await response.value();
|
|
338
355
|
}
|
|
339
356
|
|
|
357
|
+
/**
|
|
358
|
+
* Get exchange metrics
|
|
359
|
+
* exchangeMetrics
|
|
360
|
+
*/
|
|
361
|
+
async exchangeMetricsRaw(requestParameters: ExchangeMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetExchangeMetrics>> {
|
|
362
|
+
if (requestParameters['period'] == null) {
|
|
363
|
+
throw new runtime.RequiredError(
|
|
364
|
+
'period',
|
|
365
|
+
'Required parameter "period" was null or undefined when calling exchangeMetrics().'
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (requestParameters['kind'] == null) {
|
|
370
|
+
throw new runtime.RequiredError(
|
|
371
|
+
'kind',
|
|
372
|
+
'Required parameter "kind" was null or undefined when calling exchangeMetrics().'
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
const queryParameters: any = {};
|
|
377
|
+
|
|
378
|
+
if (requestParameters['period'] != null) {
|
|
379
|
+
queryParameters['period'] = requestParameters['period'];
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (requestParameters['kind'] != null) {
|
|
383
|
+
queryParameters['kind'] = requestParameters['kind'];
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (requestParameters['filter'] != null) {
|
|
387
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (requestParameters['value'] != null) {
|
|
391
|
+
queryParameters['value'] = requestParameters['value'];
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
395
|
+
|
|
396
|
+
const response = await this.request({
|
|
397
|
+
path: `/api/v1/exchangeMetrics`,
|
|
398
|
+
method: 'GET',
|
|
399
|
+
headers: headerParameters,
|
|
400
|
+
query: queryParameters,
|
|
401
|
+
}, initOverrides);
|
|
402
|
+
|
|
403
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetExchangeMetricsFromJSON(jsonValue));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Get exchange metrics
|
|
408
|
+
* exchangeMetrics
|
|
409
|
+
*/
|
|
410
|
+
async exchangeMetrics(requestParameters: ExchangeMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetExchangeMetrics> {
|
|
411
|
+
const response = await this.exchangeMetricsRaw(requestParameters, initOverrides);
|
|
412
|
+
return await response.value();
|
|
413
|
+
}
|
|
414
|
+
|
|
340
415
|
/**
|
|
341
416
|
* Get exchange stats
|
|
342
417
|
* exchangeStats
|
|
@@ -365,6 +440,45 @@ export class OrderApi extends runtime.BaseAPI {
|
|
|
365
440
|
return await response.value();
|
|
366
441
|
}
|
|
367
442
|
|
|
443
|
+
/**
|
|
444
|
+
* Get execute stats
|
|
445
|
+
* executeStats
|
|
446
|
+
*/
|
|
447
|
+
async executeStatsRaw(requestParameters: ExecuteStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetExecuteStats>> {
|
|
448
|
+
if (requestParameters['period'] == null) {
|
|
449
|
+
throw new runtime.RequiredError(
|
|
450
|
+
'period',
|
|
451
|
+
'Required parameter "period" was null or undefined when calling executeStats().'
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const queryParameters: any = {};
|
|
456
|
+
|
|
457
|
+
if (requestParameters['period'] != null) {
|
|
458
|
+
queryParameters['period'] = requestParameters['period'];
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
462
|
+
|
|
463
|
+
const response = await this.request({
|
|
464
|
+
path: `/api/v1/executeStats`,
|
|
465
|
+
method: 'GET',
|
|
466
|
+
headers: headerParameters,
|
|
467
|
+
query: queryParameters,
|
|
468
|
+
}, initOverrides);
|
|
469
|
+
|
|
470
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespGetExecuteStatsFromJSON(jsonValue));
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Get execute stats
|
|
475
|
+
* executeStats
|
|
476
|
+
*/
|
|
477
|
+
async executeStats(requestParameters: ExecuteStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetExecuteStats> {
|
|
478
|
+
const response = await this.executeStatsRaw(requestParameters, initOverrides);
|
|
479
|
+
return await response.value();
|
|
480
|
+
}
|
|
481
|
+
|
|
368
482
|
/**
|
|
369
483
|
* Get order books metadata
|
|
370
484
|
* orderBookDetails
|
|
@@ -645,6 +759,56 @@ export const ExportTypeEnum = {
|
|
|
645
759
|
Trade: 'trade'
|
|
646
760
|
} as const;
|
|
647
761
|
export type ExportTypeEnum = typeof ExportTypeEnum[keyof typeof ExportTypeEnum];
|
|
762
|
+
/**
|
|
763
|
+
* @export
|
|
764
|
+
*/
|
|
765
|
+
export const ExchangeMetricsPeriodEnum = {
|
|
766
|
+
W: 'w',
|
|
767
|
+
M: 'm',
|
|
768
|
+
Q: 'q',
|
|
769
|
+
Y: 'y',
|
|
770
|
+
All: 'all'
|
|
771
|
+
} as const;
|
|
772
|
+
export type ExchangeMetricsPeriodEnum = typeof ExchangeMetricsPeriodEnum[keyof typeof ExchangeMetricsPeriodEnum];
|
|
773
|
+
/**
|
|
774
|
+
* @export
|
|
775
|
+
*/
|
|
776
|
+
export const ExchangeMetricsKindEnum = {
|
|
777
|
+
Volume: 'volume',
|
|
778
|
+
MakerFee: 'maker_fee',
|
|
779
|
+
TakerFee: 'taker_fee',
|
|
780
|
+
LiquidationFee: 'liquidation_fee',
|
|
781
|
+
TradeCount: 'trade_count',
|
|
782
|
+
LiquidationCount: 'liquidation_count',
|
|
783
|
+
LiquidationVolume: 'liquidation_volume',
|
|
784
|
+
Inflow: 'inflow',
|
|
785
|
+
Outflow: 'outflow',
|
|
786
|
+
TransferFee: 'transfer_fee',
|
|
787
|
+
WithdrawFee: 'withdraw_fee',
|
|
788
|
+
OpenInterest: 'open_interest',
|
|
789
|
+
AccountCount: 'account_count',
|
|
790
|
+
ActiveAccountCount: 'active_account_count'
|
|
791
|
+
} as const;
|
|
792
|
+
export type ExchangeMetricsKindEnum = typeof ExchangeMetricsKindEnum[keyof typeof ExchangeMetricsKindEnum];
|
|
793
|
+
/**
|
|
794
|
+
* @export
|
|
795
|
+
*/
|
|
796
|
+
export const ExchangeMetricsFilterEnum = {
|
|
797
|
+
ByMarket: 'byMarket'
|
|
798
|
+
} as const;
|
|
799
|
+
export type ExchangeMetricsFilterEnum = typeof ExchangeMetricsFilterEnum[keyof typeof ExchangeMetricsFilterEnum];
|
|
800
|
+
/**
|
|
801
|
+
* @export
|
|
802
|
+
*/
|
|
803
|
+
export const ExecuteStatsPeriodEnum = {
|
|
804
|
+
D: 'd',
|
|
805
|
+
W: 'w',
|
|
806
|
+
M: 'm',
|
|
807
|
+
Q: 'q',
|
|
808
|
+
Y: 'y',
|
|
809
|
+
All: 'all'
|
|
810
|
+
} as const;
|
|
811
|
+
export type ExecuteStatsPeriodEnum = typeof ExecuteStatsPeriodEnum[keyof typeof ExecuteStatsPeriodEnum];
|
|
648
812
|
/**
|
|
649
813
|
* @export
|
|
650
814
|
*/
|
|
@@ -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 ExchangeMetric
|
|
20
|
+
*/
|
|
21
|
+
export interface ExchangeMetric {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ExchangeMetric
|
|
26
|
+
*/
|
|
27
|
+
timestamp: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ExchangeMetric
|
|
32
|
+
*/
|
|
33
|
+
data: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ExchangeMetric interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfExchangeMetric(value: object): value is ExchangeMetric {
|
|
40
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
41
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ExchangeMetricFromJSON(json: any): ExchangeMetric {
|
|
46
|
+
return ExchangeMetricFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ExchangeMetricFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExchangeMetric {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'timestamp': json['timestamp'],
|
|
56
|
+
'data': json['data'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ExchangeMetricToJSON(value?: ExchangeMetric | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'timestamp': value['timestamp'],
|
|
67
|
+
'data': value['data'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { MapstringmapStringmapInt64SlippageResult } from './MapstringmapStringmapInt64SlippageResult';
|
|
17
|
+
import {
|
|
18
|
+
MapstringmapStringmapInt64SlippageResultFromJSON,
|
|
19
|
+
MapstringmapStringmapInt64SlippageResultFromJSONTyped,
|
|
20
|
+
MapstringmapStringmapInt64SlippageResultToJSON,
|
|
21
|
+
} from './MapstringmapStringmapInt64SlippageResult';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ExecuteStat
|
|
27
|
+
*/
|
|
28
|
+
export interface ExecuteStat {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof ExecuteStat
|
|
33
|
+
*/
|
|
34
|
+
timestamp: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {MapstringmapStringmapInt64SlippageResult}
|
|
38
|
+
* @memberof ExecuteStat
|
|
39
|
+
*/
|
|
40
|
+
slippage: MapstringmapStringmapInt64SlippageResult;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ExecuteStat interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfExecuteStat(value: object): value is ExecuteStat {
|
|
47
|
+
if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
|
|
48
|
+
if (!('slippage' in value) || value['slippage'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ExecuteStatFromJSON(json: any): ExecuteStat {
|
|
53
|
+
return ExecuteStatFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ExecuteStatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExecuteStat {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'timestamp': json['timestamp'],
|
|
63
|
+
'slippage': MapstringmapStringmapInt64SlippageResultFromJSON(json['slippage']),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ExecuteStatToJSON(value?: ExecuteStat | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'timestamp': value['timestamp'],
|
|
74
|
+
'slippage': MapstringmapStringmapInt64SlippageResultToJSON(value['slippage']),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
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 ReqGetExchangeMetrics
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetExchangeMetrics {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetExchangeMetrics
|
|
26
|
+
*/
|
|
27
|
+
period: ReqGetExchangeMetricsPeriodEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetExchangeMetrics
|
|
32
|
+
*/
|
|
33
|
+
kind: ReqGetExchangeMetricsKindEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ReqGetExchangeMetrics
|
|
38
|
+
*/
|
|
39
|
+
filter?: ReqGetExchangeMetricsFilterEnum;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ReqGetExchangeMetrics
|
|
44
|
+
*/
|
|
45
|
+
value?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const ReqGetExchangeMetricsPeriodEnum = {
|
|
53
|
+
W: 'w',
|
|
54
|
+
M: 'm',
|
|
55
|
+
Q: 'q',
|
|
56
|
+
Y: 'y',
|
|
57
|
+
All: 'all'
|
|
58
|
+
} as const;
|
|
59
|
+
export type ReqGetExchangeMetricsPeriodEnum = typeof ReqGetExchangeMetricsPeriodEnum[keyof typeof ReqGetExchangeMetricsPeriodEnum];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const ReqGetExchangeMetricsKindEnum = {
|
|
65
|
+
Volume: 'volume',
|
|
66
|
+
MakerFee: 'maker_fee',
|
|
67
|
+
TakerFee: 'taker_fee',
|
|
68
|
+
LiquidationFee: 'liquidation_fee',
|
|
69
|
+
TradeCount: 'trade_count',
|
|
70
|
+
LiquidationCount: 'liquidation_count',
|
|
71
|
+
LiquidationVolume: 'liquidation_volume',
|
|
72
|
+
Inflow: 'inflow',
|
|
73
|
+
Outflow: 'outflow',
|
|
74
|
+
TransferFee: 'transfer_fee',
|
|
75
|
+
WithdrawFee: 'withdraw_fee',
|
|
76
|
+
OpenInterest: 'open_interest',
|
|
77
|
+
AccountCount: 'account_count',
|
|
78
|
+
ActiveAccountCount: 'active_account_count'
|
|
79
|
+
} as const;
|
|
80
|
+
export type ReqGetExchangeMetricsKindEnum = typeof ReqGetExchangeMetricsKindEnum[keyof typeof ReqGetExchangeMetricsKindEnum];
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @export
|
|
84
|
+
*/
|
|
85
|
+
export const ReqGetExchangeMetricsFilterEnum = {
|
|
86
|
+
ByMarket: 'byMarket'
|
|
87
|
+
} as const;
|
|
88
|
+
export type ReqGetExchangeMetricsFilterEnum = typeof ReqGetExchangeMetricsFilterEnum[keyof typeof ReqGetExchangeMetricsFilterEnum];
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the ReqGetExchangeMetrics interface.
|
|
93
|
+
*/
|
|
94
|
+
export function instanceOfReqGetExchangeMetrics(value: object): value is ReqGetExchangeMetrics {
|
|
95
|
+
if (!('period' in value) || value['period'] === undefined) return false;
|
|
96
|
+
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function ReqGetExchangeMetricsFromJSON(json: any): ReqGetExchangeMetrics {
|
|
101
|
+
return ReqGetExchangeMetricsFromJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ReqGetExchangeMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetExchangeMetrics {
|
|
105
|
+
if (json == null) {
|
|
106
|
+
return json;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'period': json['period'],
|
|
111
|
+
'kind': json['kind'],
|
|
112
|
+
'filter': json['filter'] == null ? undefined : json['filter'],
|
|
113
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function ReqGetExchangeMetricsToJSON(value?: ReqGetExchangeMetrics | null): any {
|
|
118
|
+
if (value == null) {
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'period': value['period'],
|
|
124
|
+
'kind': value['kind'],
|
|
125
|
+
'filter': value['filter'],
|
|
126
|
+
'value': value['value'],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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 ReqGetExecuteStats
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetExecuteStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetExecuteStats
|
|
26
|
+
*/
|
|
27
|
+
period: ReqGetExecuteStatsPeriodEnum;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const ReqGetExecuteStatsPeriodEnum = {
|
|
35
|
+
D: 'd',
|
|
36
|
+
W: 'w',
|
|
37
|
+
M: 'm',
|
|
38
|
+
Q: 'q',
|
|
39
|
+
Y: 'y',
|
|
40
|
+
All: 'all'
|
|
41
|
+
} as const;
|
|
42
|
+
export type ReqGetExecuteStatsPeriodEnum = typeof ReqGetExecuteStatsPeriodEnum[keyof typeof ReqGetExecuteStatsPeriodEnum];
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Check if a given object implements the ReqGetExecuteStats interface.
|
|
47
|
+
*/
|
|
48
|
+
export function instanceOfReqGetExecuteStats(value: object): value is ReqGetExecuteStats {
|
|
49
|
+
if (!('period' in value) || value['period'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ReqGetExecuteStatsFromJSON(json: any): ReqGetExecuteStats {
|
|
54
|
+
return ReqGetExecuteStatsFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ReqGetExecuteStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetExecuteStats {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'period': json['period'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ReqGetExecuteStatsToJSON(value?: ReqGetExecuteStats | null): any {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'period': value['period'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { ExchangeMetric } from './ExchangeMetric';
|
|
17
|
+
import {
|
|
18
|
+
ExchangeMetricFromJSON,
|
|
19
|
+
ExchangeMetricFromJSONTyped,
|
|
20
|
+
ExchangeMetricToJSON,
|
|
21
|
+
} from './ExchangeMetric';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespGetExchangeMetrics
|
|
27
|
+
*/
|
|
28
|
+
export interface RespGetExchangeMetrics {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespGetExchangeMetrics
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespGetExchangeMetrics
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<ExchangeMetric>}
|
|
44
|
+
* @memberof RespGetExchangeMetrics
|
|
45
|
+
*/
|
|
46
|
+
metrics: Array<ExchangeMetric>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the RespGetExchangeMetrics interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfRespGetExchangeMetrics(value: object): value is RespGetExchangeMetrics {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('metrics' in value) || value['metrics'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function RespGetExchangeMetricsFromJSON(json: any): RespGetExchangeMetrics {
|
|
59
|
+
return RespGetExchangeMetricsFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function RespGetExchangeMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetExchangeMetrics {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'metrics': ((json['metrics'] as Array<any>).map(ExchangeMetricFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function RespGetExchangeMetricsToJSON(value?: RespGetExchangeMetrics | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'metrics': ((value['metrics'] as Array<any>).map(ExchangeMetricToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { ExecuteStat } from './ExecuteStat';
|
|
17
|
+
import {
|
|
18
|
+
ExecuteStatFromJSON,
|
|
19
|
+
ExecuteStatFromJSONTyped,
|
|
20
|
+
ExecuteStatToJSON,
|
|
21
|
+
} from './ExecuteStat';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespGetExecuteStats
|
|
27
|
+
*/
|
|
28
|
+
export interface RespGetExecuteStats {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof RespGetExecuteStats
|
|
33
|
+
*/
|
|
34
|
+
period: RespGetExecuteStatsPeriodEnum;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {Array<ExecuteStat>}
|
|
38
|
+
* @memberof RespGetExecuteStats
|
|
39
|
+
*/
|
|
40
|
+
result: Array<ExecuteStat>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
export const RespGetExecuteStatsPeriodEnum = {
|
|
48
|
+
D: 'd',
|
|
49
|
+
W: 'w',
|
|
50
|
+
M: 'm',
|
|
51
|
+
Q: 'q',
|
|
52
|
+
Y: 'y',
|
|
53
|
+
All: 'all'
|
|
54
|
+
} as const;
|
|
55
|
+
export type RespGetExecuteStatsPeriodEnum = typeof RespGetExecuteStatsPeriodEnum[keyof typeof RespGetExecuteStatsPeriodEnum];
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the RespGetExecuteStats interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfRespGetExecuteStats(value: object): value is RespGetExecuteStats {
|
|
62
|
+
if (!('period' in value) || value['period'] === undefined) return false;
|
|
63
|
+
if (!('result' in value) || value['result'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function RespGetExecuteStatsFromJSON(json: any): RespGetExecuteStats {
|
|
68
|
+
return RespGetExecuteStatsFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function RespGetExecuteStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespGetExecuteStats {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'period': json['period'],
|
|
78
|
+
'result': ((json['result'] as Array<any>).map(ExecuteStatFromJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function RespGetExecuteStatsToJSON(value?: RespGetExecuteStats | null): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'period': value['period'],
|
|
89
|
+
'result': ((value['result'] as Array<any>).map(ExecuteStatToJSON)),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
@@ -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 SlippageResult
|
|
20
|
+
*/
|
|
21
|
+
export interface SlippageResult {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof SlippageResult
|
|
26
|
+
*/
|
|
27
|
+
avg_slippage: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SlippageResult
|
|
32
|
+
*/
|
|
33
|
+
data_count: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the SlippageResult interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfSlippageResult(value: object): value is SlippageResult {
|
|
40
|
+
if (!('avg_slippage' in value) || value['avg_slippage'] === undefined) return false;
|
|
41
|
+
if (!('data_count' in value) || value['data_count'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function SlippageResultFromJSON(json: any): SlippageResult {
|
|
46
|
+
return SlippageResultFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function SlippageResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlippageResult {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'avg_slippage': json['avg_slippage'],
|
|
56
|
+
'data_count': json['data_count'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function SlippageResultToJSON(value?: SlippageResult | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'avg_slippage': value['avg_slippage'],
|
|
67
|
+
'data_count': value['data_count'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/models/index.ts
CHANGED
|
@@ -42,7 +42,9 @@ export * from './DetailedAccount';
|
|
|
42
42
|
export * from './DetailedAccounts';
|
|
43
43
|
export * from './DetailedCandlestick';
|
|
44
44
|
export * from './EnrichedTx';
|
|
45
|
+
export * from './ExchangeMetric';
|
|
45
46
|
export * from './ExchangeStats';
|
|
47
|
+
export * from './ExecuteStat';
|
|
46
48
|
export * from './ExportData';
|
|
47
49
|
export * from './Funding';
|
|
48
50
|
export * from './FundingRate';
|
|
@@ -107,6 +109,8 @@ export * from './ReqGetByAccount';
|
|
|
107
109
|
export * from './ReqGetCandles';
|
|
108
110
|
export * from './ReqGetCandlesticks';
|
|
109
111
|
export * from './ReqGetDepositHistory';
|
|
112
|
+
export * from './ReqGetExchangeMetrics';
|
|
113
|
+
export * from './ReqGetExecuteStats';
|
|
110
114
|
export * from './ReqGetFastWithdrawInfo';
|
|
111
115
|
export * from './ReqGetFundings';
|
|
112
116
|
export * from './ReqGetGeckoOrderbook';
|
|
@@ -136,6 +140,8 @@ export * from './ReqIsWhitelisted';
|
|
|
136
140
|
export * from './RespChangeAccountTier';
|
|
137
141
|
export * from './RespGetApiTokens';
|
|
138
142
|
export * from './RespGetBridgesByL1Addr';
|
|
143
|
+
export * from './RespGetExchangeMetrics';
|
|
144
|
+
export * from './RespGetExecuteStats';
|
|
139
145
|
export * from './RespGetFastBridgeInfo';
|
|
140
146
|
export * from './RespGetFastwithdrawalInfo';
|
|
141
147
|
export * from './RespGetIsNextBridgeFast';
|
|
@@ -152,6 +158,7 @@ export * from './RiskInfo';
|
|
|
152
158
|
export * from './RiskParameters';
|
|
153
159
|
export * from './SharePrice';
|
|
154
160
|
export * from './SimpleOrder';
|
|
161
|
+
export * from './SlippageResult';
|
|
155
162
|
export * from './SpotMarketStats';
|
|
156
163
|
export * from './SpotOrderBookDetail';
|
|
157
164
|
export * from './Status';
|
package/openapi.json
CHANGED
|
@@ -1276,6 +1276,85 @@
|
|
|
1276
1276
|
"description": "Get deposit supporting networks"
|
|
1277
1277
|
}
|
|
1278
1278
|
},
|
|
1279
|
+
"/api/v1/exchangeMetrics": {
|
|
1280
|
+
"get": {
|
|
1281
|
+
"summary": "exchangeMetrics",
|
|
1282
|
+
"operationId": "exchangeMetrics",
|
|
1283
|
+
"responses": {
|
|
1284
|
+
"200": {
|
|
1285
|
+
"description": "A successful response.",
|
|
1286
|
+
"schema": {
|
|
1287
|
+
"$ref": "#/definitions/RespGetExchangeMetrics"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"400": {
|
|
1291
|
+
"description": "Bad request",
|
|
1292
|
+
"schema": {
|
|
1293
|
+
"$ref": "#/definitions/ResultCode"
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
"parameters": [
|
|
1298
|
+
{
|
|
1299
|
+
"name": "period",
|
|
1300
|
+
"in": "query",
|
|
1301
|
+
"required": true,
|
|
1302
|
+
"type": "string",
|
|
1303
|
+
"enum": [
|
|
1304
|
+
"w",
|
|
1305
|
+
"m",
|
|
1306
|
+
"q",
|
|
1307
|
+
"y",
|
|
1308
|
+
"all"
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"name": "kind",
|
|
1313
|
+
"in": "query",
|
|
1314
|
+
"required": true,
|
|
1315
|
+
"type": "string",
|
|
1316
|
+
"enum": [
|
|
1317
|
+
"volume",
|
|
1318
|
+
"maker_fee",
|
|
1319
|
+
"taker_fee",
|
|
1320
|
+
"liquidation_fee",
|
|
1321
|
+
"trade_count",
|
|
1322
|
+
"liquidation_count",
|
|
1323
|
+
"liquidation_volume",
|
|
1324
|
+
"inflow",
|
|
1325
|
+
"outflow",
|
|
1326
|
+
"transfer_fee",
|
|
1327
|
+
"withdraw_fee",
|
|
1328
|
+
"open_interest",
|
|
1329
|
+
"account_count",
|
|
1330
|
+
"active_account_count"
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "filter",
|
|
1335
|
+
"in": "query",
|
|
1336
|
+
"required": false,
|
|
1337
|
+
"type": "string",
|
|
1338
|
+
"enum": [
|
|
1339
|
+
"byMarket"
|
|
1340
|
+
]
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"name": "value",
|
|
1344
|
+
"in": "query",
|
|
1345
|
+
"required": false,
|
|
1346
|
+
"type": "string"
|
|
1347
|
+
}
|
|
1348
|
+
],
|
|
1349
|
+
"tags": [
|
|
1350
|
+
"order"
|
|
1351
|
+
],
|
|
1352
|
+
"consumes": [
|
|
1353
|
+
"multipart/form-data"
|
|
1354
|
+
],
|
|
1355
|
+
"description": "Get exchange metrics"
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1279
1358
|
"/api/v1/exchangeStats": {
|
|
1280
1359
|
"get": {
|
|
1281
1360
|
"summary": "exchangeStats",
|
|
@@ -1300,6 +1379,49 @@
|
|
|
1300
1379
|
"description": "Get exchange stats"
|
|
1301
1380
|
}
|
|
1302
1381
|
},
|
|
1382
|
+
"/api/v1/executeStats": {
|
|
1383
|
+
"get": {
|
|
1384
|
+
"summary": "executeStats",
|
|
1385
|
+
"operationId": "executeStats",
|
|
1386
|
+
"responses": {
|
|
1387
|
+
"200": {
|
|
1388
|
+
"description": "A successful response.",
|
|
1389
|
+
"schema": {
|
|
1390
|
+
"$ref": "#/definitions/RespGetExecuteStats"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
"400": {
|
|
1394
|
+
"description": "Bad request",
|
|
1395
|
+
"schema": {
|
|
1396
|
+
"$ref": "#/definitions/ResultCode"
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
"parameters": [
|
|
1401
|
+
{
|
|
1402
|
+
"name": "period",
|
|
1403
|
+
"in": "query",
|
|
1404
|
+
"required": true,
|
|
1405
|
+
"type": "string",
|
|
1406
|
+
"enum": [
|
|
1407
|
+
"d",
|
|
1408
|
+
"w",
|
|
1409
|
+
"m",
|
|
1410
|
+
"q",
|
|
1411
|
+
"y",
|
|
1412
|
+
"all"
|
|
1413
|
+
]
|
|
1414
|
+
}
|
|
1415
|
+
],
|
|
1416
|
+
"tags": [
|
|
1417
|
+
"order"
|
|
1418
|
+
],
|
|
1419
|
+
"consumes": [
|
|
1420
|
+
"multipart/form-data"
|
|
1421
|
+
],
|
|
1422
|
+
"description": "Get execute stats"
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1303
1425
|
"/api/v1/export": {
|
|
1304
1426
|
"get": {
|
|
1305
1427
|
"summary": "export",
|
|
@@ -5511,6 +5633,26 @@
|
|
|
5511
5633
|
"verified_at"
|
|
5512
5634
|
]
|
|
5513
5635
|
},
|
|
5636
|
+
"ExchangeMetric": {
|
|
5637
|
+
"type": "object",
|
|
5638
|
+
"properties": {
|
|
5639
|
+
"timestamp": {
|
|
5640
|
+
"type": "integer",
|
|
5641
|
+
"format": "int64",
|
|
5642
|
+
"example": "1640995200"
|
|
5643
|
+
},
|
|
5644
|
+
"data": {
|
|
5645
|
+
"type": "number",
|
|
5646
|
+
"format": "double",
|
|
5647
|
+
"example": "93566.25"
|
|
5648
|
+
}
|
|
5649
|
+
},
|
|
5650
|
+
"title": "ExchangeMetric",
|
|
5651
|
+
"required": [
|
|
5652
|
+
"timestamp",
|
|
5653
|
+
"data"
|
|
5654
|
+
]
|
|
5655
|
+
},
|
|
5514
5656
|
"ExchangeStats": {
|
|
5515
5657
|
"type": "object",
|
|
5516
5658
|
"properties": {
|
|
@@ -5554,6 +5696,24 @@
|
|
|
5554
5696
|
"daily_trades_count"
|
|
5555
5697
|
]
|
|
5556
5698
|
},
|
|
5699
|
+
"ExecuteStat": {
|
|
5700
|
+
"type": "object",
|
|
5701
|
+
"properties": {
|
|
5702
|
+
"timestamp": {
|
|
5703
|
+
"type": "integer",
|
|
5704
|
+
"format": "int64",
|
|
5705
|
+
"example": "1640995200"
|
|
5706
|
+
},
|
|
5707
|
+
"slippage": {
|
|
5708
|
+
"$ref": "#/definitions/mapstringmap[string]map[int64]SlippageResult"
|
|
5709
|
+
}
|
|
5710
|
+
},
|
|
5711
|
+
"title": "ExecuteStat",
|
|
5712
|
+
"required": [
|
|
5713
|
+
"timestamp",
|
|
5714
|
+
"slippage"
|
|
5715
|
+
]
|
|
5716
|
+
},
|
|
5557
5717
|
"ExportData": {
|
|
5558
5718
|
"type": "object",
|
|
5559
5719
|
"properties": {
|
|
@@ -8354,10 +8514,78 @@
|
|
|
8354
8514
|
"l1_address"
|
|
8355
8515
|
]
|
|
8356
8516
|
},
|
|
8517
|
+
"ReqGetExchangeMetrics": {
|
|
8518
|
+
"type": "object",
|
|
8519
|
+
"properties": {
|
|
8520
|
+
"period": {
|
|
8521
|
+
"type": "string",
|
|
8522
|
+
"enum": [
|
|
8523
|
+
"w",
|
|
8524
|
+
"m",
|
|
8525
|
+
"q",
|
|
8526
|
+
"y",
|
|
8527
|
+
"all"
|
|
8528
|
+
]
|
|
8529
|
+
},
|
|
8530
|
+
"kind": {
|
|
8531
|
+
"type": "string",
|
|
8532
|
+
"enum": [
|
|
8533
|
+
"volume",
|
|
8534
|
+
"maker_fee",
|
|
8535
|
+
"taker_fee",
|
|
8536
|
+
"liquidation_fee",
|
|
8537
|
+
"trade_count",
|
|
8538
|
+
"liquidation_count",
|
|
8539
|
+
"liquidation_volume",
|
|
8540
|
+
"inflow",
|
|
8541
|
+
"outflow",
|
|
8542
|
+
"transfer_fee",
|
|
8543
|
+
"withdraw_fee",
|
|
8544
|
+
"open_interest",
|
|
8545
|
+
"account_count",
|
|
8546
|
+
"active_account_count"
|
|
8547
|
+
]
|
|
8548
|
+
},
|
|
8549
|
+
"filter": {
|
|
8550
|
+
"type": "string",
|
|
8551
|
+
"enum": [
|
|
8552
|
+
"byMarket"
|
|
8553
|
+
]
|
|
8554
|
+
},
|
|
8555
|
+
"value": {
|
|
8556
|
+
"type": "string"
|
|
8557
|
+
}
|
|
8558
|
+
},
|
|
8559
|
+
"title": "ReqGetExchangeMetrics",
|
|
8560
|
+
"required": [
|
|
8561
|
+
"period",
|
|
8562
|
+
"kind"
|
|
8563
|
+
]
|
|
8564
|
+
},
|
|
8357
8565
|
"ReqGetExchangeStats": {
|
|
8358
8566
|
"type": "object",
|
|
8359
8567
|
"title": "ReqGetExchangeStats"
|
|
8360
8568
|
},
|
|
8569
|
+
"ReqGetExecuteStats": {
|
|
8570
|
+
"type": "object",
|
|
8571
|
+
"properties": {
|
|
8572
|
+
"period": {
|
|
8573
|
+
"type": "string",
|
|
8574
|
+
"enum": [
|
|
8575
|
+
"d",
|
|
8576
|
+
"w",
|
|
8577
|
+
"m",
|
|
8578
|
+
"q",
|
|
8579
|
+
"y",
|
|
8580
|
+
"all"
|
|
8581
|
+
]
|
|
8582
|
+
}
|
|
8583
|
+
},
|
|
8584
|
+
"title": "ReqGetExecuteStats",
|
|
8585
|
+
"required": [
|
|
8586
|
+
"period"
|
|
8587
|
+
]
|
|
8588
|
+
},
|
|
8361
8589
|
"ReqGetFastWithdrawInfo": {
|
|
8362
8590
|
"type": "object",
|
|
8363
8591
|
"properties": {
|
|
@@ -9252,6 +9480,57 @@
|
|
|
9252
9480
|
"bridges"
|
|
9253
9481
|
]
|
|
9254
9482
|
},
|
|
9483
|
+
"RespGetExchangeMetrics": {
|
|
9484
|
+
"type": "object",
|
|
9485
|
+
"properties": {
|
|
9486
|
+
"code": {
|
|
9487
|
+
"type": "integer",
|
|
9488
|
+
"format": "int32",
|
|
9489
|
+
"example": "200"
|
|
9490
|
+
},
|
|
9491
|
+
"message": {
|
|
9492
|
+
"type": "string"
|
|
9493
|
+
},
|
|
9494
|
+
"metrics": {
|
|
9495
|
+
"type": "array",
|
|
9496
|
+
"items": {
|
|
9497
|
+
"$ref": "#/definitions/ExchangeMetric"
|
|
9498
|
+
}
|
|
9499
|
+
}
|
|
9500
|
+
},
|
|
9501
|
+
"title": "RespGetExchangeMetrics",
|
|
9502
|
+
"required": [
|
|
9503
|
+
"code",
|
|
9504
|
+
"metrics"
|
|
9505
|
+
]
|
|
9506
|
+
},
|
|
9507
|
+
"RespGetExecuteStats": {
|
|
9508
|
+
"type": "object",
|
|
9509
|
+
"properties": {
|
|
9510
|
+
"period": {
|
|
9511
|
+
"type": "string",
|
|
9512
|
+
"enum": [
|
|
9513
|
+
"d",
|
|
9514
|
+
"w",
|
|
9515
|
+
"m",
|
|
9516
|
+
"q",
|
|
9517
|
+
"y",
|
|
9518
|
+
"all"
|
|
9519
|
+
]
|
|
9520
|
+
},
|
|
9521
|
+
"result": {
|
|
9522
|
+
"type": "array",
|
|
9523
|
+
"items": {
|
|
9524
|
+
"$ref": "#/definitions/ExecuteStat"
|
|
9525
|
+
}
|
|
9526
|
+
}
|
|
9527
|
+
},
|
|
9528
|
+
"title": "RespGetExecuteStats",
|
|
9529
|
+
"required": [
|
|
9530
|
+
"period",
|
|
9531
|
+
"result"
|
|
9532
|
+
]
|
|
9533
|
+
},
|
|
9255
9534
|
"RespGetFastBridgeInfo": {
|
|
9256
9535
|
"type": "object",
|
|
9257
9536
|
"properties": {
|
|
@@ -9699,6 +9978,26 @@
|
|
|
9699
9978
|
"transaction_time"
|
|
9700
9979
|
]
|
|
9701
9980
|
},
|
|
9981
|
+
"SlippageResult": {
|
|
9982
|
+
"type": "object",
|
|
9983
|
+
"properties": {
|
|
9984
|
+
"avg_slippage": {
|
|
9985
|
+
"type": "number",
|
|
9986
|
+
"format": "double",
|
|
9987
|
+
"example": "0.5"
|
|
9988
|
+
},
|
|
9989
|
+
"data_count": {
|
|
9990
|
+
"type": "integer",
|
|
9991
|
+
"format": "int64",
|
|
9992
|
+
"example": "100"
|
|
9993
|
+
}
|
|
9994
|
+
},
|
|
9995
|
+
"title": "SlippageResult",
|
|
9996
|
+
"required": [
|
|
9997
|
+
"avg_slippage",
|
|
9998
|
+
"data_count"
|
|
9999
|
+
]
|
|
10000
|
+
},
|
|
9702
10001
|
"SpotMarketStats": {
|
|
9703
10002
|
"type": "object",
|
|
9704
10003
|
"properties": {
|