zklighter-perps 1.0.253 → 1.0.255
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 +5 -0
- package/apis/CandlestickApi.ts +108 -0
- package/apis/InfoApi.ts +46 -0
- package/apis/OrderApi.ts +2 -1
- package/apis/TransactionApi.ts +5 -1
- package/models/MarkPriceCandle.ts +106 -0
- package/models/MarkPriceCandles.ts +94 -0
- package/models/ReqGetExchangeMetrics.ts +2 -1
- package/models/ReqGetMarkPriceCandles.ts +114 -0
- package/models/ReqGetSyntheticSpotInfo.ts +61 -0
- package/models/ReqGetTransferHistory.ts +5 -1
- package/models/RespSyntheticSpotInfo.ts +114 -0
- package/models/index.ts +5 -0
- package/openapi.json +303 -4
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -85,6 +85,8 @@ models/LiqTrade.ts
|
|
|
85
85
|
models/Liquidation.ts
|
|
86
86
|
models/LiquidationInfo.ts
|
|
87
87
|
models/LiquidationInfos.ts
|
|
88
|
+
models/MarkPriceCandle.ts
|
|
89
|
+
models/MarkPriceCandles.ts
|
|
88
90
|
models/MarketConfig.ts
|
|
89
91
|
models/MarketMetricData.ts
|
|
90
92
|
models/NextNonce.ts
|
|
@@ -149,6 +151,7 @@ models/ReqGetLeaderboard.ts
|
|
|
149
151
|
models/ReqGetLeases.ts
|
|
150
152
|
models/ReqGetLiquidationInfos.ts
|
|
151
153
|
models/ReqGetMakerOnlyApiKeys.ts
|
|
154
|
+
models/ReqGetMarkPriceCandles.ts
|
|
152
155
|
models/ReqGetMarketMetrics.ts
|
|
153
156
|
models/ReqGetNextNonce.ts
|
|
154
157
|
models/ReqGetOrderBookDetails.ts
|
|
@@ -165,6 +168,7 @@ models/ReqGetRangeWithIndexSortable.ts
|
|
|
165
168
|
models/ReqGetRecentTrades.ts
|
|
166
169
|
models/ReqGetReferralCode.ts
|
|
167
170
|
models/ReqGetReferralPoints.ts
|
|
171
|
+
models/ReqGetSyntheticSpotInfo.ts
|
|
168
172
|
models/ReqGetTrades.ts
|
|
169
173
|
models/ReqGetTransferFeeInfo.ts
|
|
170
174
|
models/ReqGetTransferHistory.ts
|
|
@@ -196,6 +200,7 @@ models/RespRevokeApiToken.ts
|
|
|
196
200
|
models/RespSendTx.ts
|
|
197
201
|
models/RespSendTxBatch.ts
|
|
198
202
|
models/RespSetMakerOnlyApiKeys.ts
|
|
203
|
+
models/RespSyntheticSpotInfo.ts
|
|
199
204
|
models/RespUpdateKickback.ts
|
|
200
205
|
models/RespUpdateRFQ.ts
|
|
201
206
|
models/RespUpdateReferralCode.ts
|
package/apis/CandlestickApi.ts
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
Candles,
|
|
19
19
|
Candlesticks,
|
|
20
20
|
Fundings,
|
|
21
|
+
MarkPriceCandles,
|
|
21
22
|
ResultCode,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
@@ -27,6 +28,8 @@ import {
|
|
|
27
28
|
CandlesticksToJSON,
|
|
28
29
|
FundingsFromJSON,
|
|
29
30
|
FundingsToJSON,
|
|
31
|
+
MarkPriceCandlesFromJSON,
|
|
32
|
+
MarkPriceCandlesToJSON,
|
|
30
33
|
ResultCodeFromJSON,
|
|
31
34
|
ResultCodeToJSON,
|
|
32
35
|
} from '../models/index';
|
|
@@ -57,6 +60,14 @@ export interface FundingsRequest {
|
|
|
57
60
|
count_back: number;
|
|
58
61
|
}
|
|
59
62
|
|
|
63
|
+
export interface MarkPriceCandlesRequest {
|
|
64
|
+
market_id: number;
|
|
65
|
+
resolution: MarkPriceCandlesResolutionEnum;
|
|
66
|
+
start_timestamp: number;
|
|
67
|
+
end_timestamp: number;
|
|
68
|
+
count_back: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
60
71
|
/**
|
|
61
72
|
*
|
|
62
73
|
*/
|
|
@@ -319,6 +330,89 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
319
330
|
return await response.value();
|
|
320
331
|
}
|
|
321
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Get mark price candles
|
|
335
|
+
* markPriceCandles
|
|
336
|
+
*/
|
|
337
|
+
async markPriceCandlesRaw(requestParameters: MarkPriceCandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkPriceCandles>> {
|
|
338
|
+
if (requestParameters['market_id'] == null) {
|
|
339
|
+
throw new runtime.RequiredError(
|
|
340
|
+
'market_id',
|
|
341
|
+
'Required parameter "market_id" was null or undefined when calling markPriceCandles().'
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (requestParameters['resolution'] == null) {
|
|
346
|
+
throw new runtime.RequiredError(
|
|
347
|
+
'resolution',
|
|
348
|
+
'Required parameter "resolution" was null or undefined when calling markPriceCandles().'
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (requestParameters['start_timestamp'] == null) {
|
|
353
|
+
throw new runtime.RequiredError(
|
|
354
|
+
'start_timestamp',
|
|
355
|
+
'Required parameter "start_timestamp" was null or undefined when calling markPriceCandles().'
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (requestParameters['end_timestamp'] == null) {
|
|
360
|
+
throw new runtime.RequiredError(
|
|
361
|
+
'end_timestamp',
|
|
362
|
+
'Required parameter "end_timestamp" was null or undefined when calling markPriceCandles().'
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (requestParameters['count_back'] == null) {
|
|
367
|
+
throw new runtime.RequiredError(
|
|
368
|
+
'count_back',
|
|
369
|
+
'Required parameter "count_back" was null or undefined when calling markPriceCandles().'
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const queryParameters: any = {};
|
|
374
|
+
|
|
375
|
+
if (requestParameters['market_id'] != null) {
|
|
376
|
+
queryParameters['market_id'] = requestParameters['market_id'];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (requestParameters['resolution'] != null) {
|
|
380
|
+
queryParameters['resolution'] = requestParameters['resolution'];
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
if (requestParameters['start_timestamp'] != null) {
|
|
384
|
+
queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if (requestParameters['end_timestamp'] != null) {
|
|
388
|
+
queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (requestParameters['count_back'] != null) {
|
|
392
|
+
queryParameters['count_back'] = requestParameters['count_back'];
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
396
|
+
|
|
397
|
+
const response = await this.request({
|
|
398
|
+
path: `/api/v1/markPriceCandles`,
|
|
399
|
+
method: 'GET',
|
|
400
|
+
headers: headerParameters,
|
|
401
|
+
query: queryParameters,
|
|
402
|
+
}, initOverrides);
|
|
403
|
+
|
|
404
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkPriceCandlesFromJSON(jsonValue));
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Get mark price candles
|
|
409
|
+
* markPriceCandles
|
|
410
|
+
*/
|
|
411
|
+
async markPriceCandles(requestParameters: MarkPriceCandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkPriceCandles> {
|
|
412
|
+
const response = await this.markPriceCandlesRaw(requestParameters, initOverrides);
|
|
413
|
+
return await response.value();
|
|
414
|
+
}
|
|
415
|
+
|
|
322
416
|
}
|
|
323
417
|
|
|
324
418
|
/**
|
|
@@ -359,3 +453,17 @@ export const FundingsResolutionEnum = {
|
|
|
359
453
|
_1d: '1d'
|
|
360
454
|
} as const;
|
|
361
455
|
export type FundingsResolutionEnum = typeof FundingsResolutionEnum[keyof typeof FundingsResolutionEnum];
|
|
456
|
+
/**
|
|
457
|
+
* @export
|
|
458
|
+
*/
|
|
459
|
+
export const MarkPriceCandlesResolutionEnum = {
|
|
460
|
+
_1m: '1m',
|
|
461
|
+
_5m: '5m',
|
|
462
|
+
_15m: '15m',
|
|
463
|
+
_30m: '30m',
|
|
464
|
+
_1h: '1h',
|
|
465
|
+
_4h: '4h',
|
|
466
|
+
_12h: '12h',
|
|
467
|
+
_1d: '1d'
|
|
468
|
+
} as const;
|
|
469
|
+
export type MarkPriceCandlesResolutionEnum = typeof MarkPriceCandlesResolutionEnum[keyof typeof MarkPriceCandlesResolutionEnum];
|
package/apis/InfoApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Layer1BasicInfo,
|
|
19
|
+
RespSyntheticSpotInfo,
|
|
19
20
|
RespWithdrawalDelay,
|
|
20
21
|
ResultCode,
|
|
21
22
|
SystemConfig,
|
|
@@ -24,6 +25,8 @@ import type {
|
|
|
24
25
|
import {
|
|
25
26
|
Layer1BasicInfoFromJSON,
|
|
26
27
|
Layer1BasicInfoToJSON,
|
|
28
|
+
RespSyntheticSpotInfoFromJSON,
|
|
29
|
+
RespSyntheticSpotInfoToJSON,
|
|
27
30
|
RespWithdrawalDelayFromJSON,
|
|
28
31
|
RespWithdrawalDelayToJSON,
|
|
29
32
|
ResultCodeFromJSON,
|
|
@@ -34,6 +37,10 @@ import {
|
|
|
34
37
|
TransferFeeInfoToJSON,
|
|
35
38
|
} from '../models/index';
|
|
36
39
|
|
|
40
|
+
export interface SyntheticSpotInfoRequest {
|
|
41
|
+
symbol: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
37
44
|
export interface TransferFeeInfoRequest {
|
|
38
45
|
account_index: number;
|
|
39
46
|
authorization?: string;
|
|
@@ -74,6 +81,45 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
74
81
|
return await response.value();
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Get synthetic spot info for a symbol
|
|
86
|
+
* syntheticSpotInfo
|
|
87
|
+
*/
|
|
88
|
+
async syntheticSpotInfoRaw(requestParameters: SyntheticSpotInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSyntheticSpotInfo>> {
|
|
89
|
+
if (requestParameters['symbol'] == null) {
|
|
90
|
+
throw new runtime.RequiredError(
|
|
91
|
+
'symbol',
|
|
92
|
+
'Required parameter "symbol" was null or undefined when calling syntheticSpotInfo().'
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const queryParameters: any = {};
|
|
97
|
+
|
|
98
|
+
if (requestParameters['symbol'] != null) {
|
|
99
|
+
queryParameters['symbol'] = requestParameters['symbol'];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
103
|
+
|
|
104
|
+
const response = await this.request({
|
|
105
|
+
path: `/api/v1/syntheticSpotInfo`,
|
|
106
|
+
method: 'GET',
|
|
107
|
+
headers: headerParameters,
|
|
108
|
+
query: queryParameters,
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
|
|
111
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespSyntheticSpotInfoFromJSON(jsonValue));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Get synthetic spot info for a symbol
|
|
116
|
+
* syntheticSpotInfo
|
|
117
|
+
*/
|
|
118
|
+
async syntheticSpotInfo(requestParameters: SyntheticSpotInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSyntheticSpotInfo> {
|
|
119
|
+
const response = await this.syntheticSpotInfoRaw(requestParameters, initOverrides);
|
|
120
|
+
return await response.value();
|
|
121
|
+
}
|
|
122
|
+
|
|
77
123
|
/**
|
|
78
124
|
* Get system configuration including pool indexes and lockup/cooldown periods
|
|
79
125
|
* systemConfig
|
package/apis/OrderApi.ts
CHANGED
|
@@ -939,7 +939,8 @@ export const ExchangeMetricsKindEnum = {
|
|
|
939
939
|
AccountCount: 'account_count',
|
|
940
940
|
ActiveAccountCount: 'active_account_count',
|
|
941
941
|
Tps: 'tps',
|
|
942
|
-
Buyback: 'buyback'
|
|
942
|
+
Buyback: 'buyback',
|
|
943
|
+
BuybackUsdc: 'buyback_usdc'
|
|
943
944
|
} as const;
|
|
944
945
|
export type ExchangeMetricsKindEnum = typeof ExchangeMetricsKindEnum[keyof typeof ExchangeMetricsKindEnum];
|
|
945
946
|
/**
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -879,7 +879,11 @@ export const TransferHistoryTypeEnum = {
|
|
|
879
879
|
L2MintShares: 'L2MintShares',
|
|
880
880
|
L2BurnShares: 'L2BurnShares',
|
|
881
881
|
L2StakeAssets: 'L2StakeAssets',
|
|
882
|
-
L2UnstakeAssets: 'L2UnstakeAssets'
|
|
882
|
+
L2UnstakeAssets: 'L2UnstakeAssets',
|
|
883
|
+
L2CreatePublicPool: 'L2CreatePublicPool',
|
|
884
|
+
L2CreateStakingPool: 'L2CreateStakingPool',
|
|
885
|
+
L1BurnShares: 'L1BurnShares',
|
|
886
|
+
L1UnstakeAssets: 'L1UnstakeAssets'
|
|
883
887
|
} as const;
|
|
884
888
|
export type TransferHistoryTypeEnum = typeof TransferHistoryTypeEnum[keyof typeof TransferHistoryTypeEnum];
|
|
885
889
|
/**
|
|
@@ -0,0 +1,106 @@
|
|
|
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 MarkPriceCandle
|
|
20
|
+
*/
|
|
21
|
+
export interface MarkPriceCandle {
|
|
22
|
+
/**
|
|
23
|
+
* timestamp
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MarkPriceCandle
|
|
26
|
+
*/
|
|
27
|
+
t: number;
|
|
28
|
+
/**
|
|
29
|
+
* open
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof MarkPriceCandle
|
|
32
|
+
*/
|
|
33
|
+
o: number;
|
|
34
|
+
/**
|
|
35
|
+
* high
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof MarkPriceCandle
|
|
38
|
+
*/
|
|
39
|
+
h: number;
|
|
40
|
+
/**
|
|
41
|
+
* low
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof MarkPriceCandle
|
|
44
|
+
*/
|
|
45
|
+
l: number;
|
|
46
|
+
/**
|
|
47
|
+
* close
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof MarkPriceCandle
|
|
50
|
+
*/
|
|
51
|
+
c: number;
|
|
52
|
+
/**
|
|
53
|
+
* sample_count
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof MarkPriceCandle
|
|
56
|
+
*/
|
|
57
|
+
sc: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the MarkPriceCandle interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfMarkPriceCandle(value: object): value is MarkPriceCandle {
|
|
64
|
+
if (!('t' in value) || value['t'] === undefined) return false;
|
|
65
|
+
if (!('o' in value) || value['o'] === undefined) return false;
|
|
66
|
+
if (!('h' in value) || value['h'] === undefined) return false;
|
|
67
|
+
if (!('l' in value) || value['l'] === undefined) return false;
|
|
68
|
+
if (!('c' in value) || value['c'] === undefined) return false;
|
|
69
|
+
if (!('sc' in value) || value['sc'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function MarkPriceCandleFromJSON(json: any): MarkPriceCandle {
|
|
74
|
+
return MarkPriceCandleFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function MarkPriceCandleFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarkPriceCandle {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
't': json['t'],
|
|
84
|
+
'o': json['o'],
|
|
85
|
+
'h': json['h'],
|
|
86
|
+
'l': json['l'],
|
|
87
|
+
'c': json['c'],
|
|
88
|
+
'sc': json['sc'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function MarkPriceCandleToJSON(value?: MarkPriceCandle | null): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
't': value['t'],
|
|
99
|
+
'o': value['o'],
|
|
100
|
+
'h': value['h'],
|
|
101
|
+
'l': value['l'],
|
|
102
|
+
'c': value['c'],
|
|
103
|
+
'sc': value['sc'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
@@ -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
|
+
import type { MarkPriceCandle } from './MarkPriceCandle';
|
|
17
|
+
import {
|
|
18
|
+
MarkPriceCandleFromJSON,
|
|
19
|
+
MarkPriceCandleFromJSONTyped,
|
|
20
|
+
MarkPriceCandleToJSON,
|
|
21
|
+
} from './MarkPriceCandle';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface MarkPriceCandles
|
|
27
|
+
*/
|
|
28
|
+
export interface MarkPriceCandles {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof MarkPriceCandles
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof MarkPriceCandles
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
* resolution
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof MarkPriceCandles
|
|
45
|
+
*/
|
|
46
|
+
r: string;
|
|
47
|
+
/**
|
|
48
|
+
* candles
|
|
49
|
+
* @type {Array<MarkPriceCandle>}
|
|
50
|
+
* @memberof MarkPriceCandles
|
|
51
|
+
*/
|
|
52
|
+
c: Array<MarkPriceCandle>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the MarkPriceCandles interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfMarkPriceCandles(value: object): value is MarkPriceCandles {
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('r' in value) || value['r'] === undefined) return false;
|
|
61
|
+
if (!('c' in value) || value['c'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function MarkPriceCandlesFromJSON(json: any): MarkPriceCandles {
|
|
66
|
+
return MarkPriceCandlesFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function MarkPriceCandlesFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarkPriceCandles {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'code': json['code'],
|
|
76
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
77
|
+
'r': json['r'],
|
|
78
|
+
'c': ((json['c'] as Array<any>).map(MarkPriceCandleFromJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function MarkPriceCandlesToJSON(value?: MarkPriceCandles | null): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'code': value['code'],
|
|
89
|
+
'message': value['message'],
|
|
90
|
+
'r': value['r'],
|
|
91
|
+
'c': ((value['c'] as Array<any>).map(MarkPriceCandleToJSON)),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -79,7 +79,8 @@ export const ReqGetExchangeMetricsKindEnum = {
|
|
|
79
79
|
AccountCount: 'account_count',
|
|
80
80
|
ActiveAccountCount: 'active_account_count',
|
|
81
81
|
Tps: 'tps',
|
|
82
|
-
Buyback: 'buyback'
|
|
82
|
+
Buyback: 'buyback',
|
|
83
|
+
BuybackUsdc: 'buyback_usdc'
|
|
83
84
|
} as const;
|
|
84
85
|
export type ReqGetExchangeMetricsKindEnum = typeof ReqGetExchangeMetricsKindEnum[keyof typeof ReqGetExchangeMetricsKindEnum];
|
|
85
86
|
|
|
@@ -0,0 +1,114 @@
|
|
|
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 ReqGetMarkPriceCandles
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetMarkPriceCandles {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ReqGetMarkPriceCandles
|
|
26
|
+
*/
|
|
27
|
+
market_id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetMarkPriceCandles
|
|
32
|
+
*/
|
|
33
|
+
resolution: ReqGetMarkPriceCandlesResolutionEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ReqGetMarkPriceCandles
|
|
38
|
+
*/
|
|
39
|
+
start_timestamp: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ReqGetMarkPriceCandles
|
|
44
|
+
*/
|
|
45
|
+
end_timestamp: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ReqGetMarkPriceCandles
|
|
50
|
+
*/
|
|
51
|
+
count_back: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export const ReqGetMarkPriceCandlesResolutionEnum = {
|
|
59
|
+
_1m: '1m',
|
|
60
|
+
_5m: '5m',
|
|
61
|
+
_15m: '15m',
|
|
62
|
+
_30m: '30m',
|
|
63
|
+
_1h: '1h',
|
|
64
|
+
_4h: '4h',
|
|
65
|
+
_12h: '12h',
|
|
66
|
+
_1d: '1d'
|
|
67
|
+
} as const;
|
|
68
|
+
export type ReqGetMarkPriceCandlesResolutionEnum = typeof ReqGetMarkPriceCandlesResolutionEnum[keyof typeof ReqGetMarkPriceCandlesResolutionEnum];
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the ReqGetMarkPriceCandles interface.
|
|
73
|
+
*/
|
|
74
|
+
export function instanceOfReqGetMarkPriceCandles(value: object): value is ReqGetMarkPriceCandles {
|
|
75
|
+
if (!('market_id' in value) || value['market_id'] === undefined) return false;
|
|
76
|
+
if (!('resolution' in value) || value['resolution'] === undefined) return false;
|
|
77
|
+
if (!('start_timestamp' in value) || value['start_timestamp'] === undefined) return false;
|
|
78
|
+
if (!('end_timestamp' in value) || value['end_timestamp'] === undefined) return false;
|
|
79
|
+
if (!('count_back' in value) || value['count_back'] === undefined) return false;
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ReqGetMarkPriceCandlesFromJSON(json: any): ReqGetMarkPriceCandles {
|
|
84
|
+
return ReqGetMarkPriceCandlesFromJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function ReqGetMarkPriceCandlesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetMarkPriceCandles {
|
|
88
|
+
if (json == null) {
|
|
89
|
+
return json;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'market_id': json['market_id'],
|
|
94
|
+
'resolution': json['resolution'],
|
|
95
|
+
'start_timestamp': json['start_timestamp'],
|
|
96
|
+
'end_timestamp': json['end_timestamp'],
|
|
97
|
+
'count_back': json['count_back'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function ReqGetMarkPriceCandlesToJSON(value?: ReqGetMarkPriceCandles | null): any {
|
|
102
|
+
if (value == null) {
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'market_id': value['market_id'],
|
|
108
|
+
'resolution': value['resolution'],
|
|
109
|
+
'start_timestamp': value['start_timestamp'],
|
|
110
|
+
'end_timestamp': value['end_timestamp'],
|
|
111
|
+
'count_back': value['count_back'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
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 ReqGetSyntheticSpotInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetSyntheticSpotInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetSyntheticSpotInfo
|
|
26
|
+
*/
|
|
27
|
+
symbol: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ReqGetSyntheticSpotInfo interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfReqGetSyntheticSpotInfo(value: object): value is ReqGetSyntheticSpotInfo {
|
|
34
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ReqGetSyntheticSpotInfoFromJSON(json: any): ReqGetSyntheticSpotInfo {
|
|
39
|
+
return ReqGetSyntheticSpotInfoFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ReqGetSyntheticSpotInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetSyntheticSpotInfo {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'symbol': json['symbol'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ReqGetSyntheticSpotInfoToJSON(value?: ReqGetSyntheticSpotInfo | null): any {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
|
|
58
|
+
'symbol': value['symbol'],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
@@ -55,7 +55,11 @@ export const ReqGetTransferHistoryTypeEnum = {
|
|
|
55
55
|
L2MintShares: 'L2MintShares',
|
|
56
56
|
L2BurnShares: 'L2BurnShares',
|
|
57
57
|
L2StakeAssets: 'L2StakeAssets',
|
|
58
|
-
L2UnstakeAssets: 'L2UnstakeAssets'
|
|
58
|
+
L2UnstakeAssets: 'L2UnstakeAssets',
|
|
59
|
+
L2CreatePublicPool: 'L2CreatePublicPool',
|
|
60
|
+
L2CreateStakingPool: 'L2CreateStakingPool',
|
|
61
|
+
L1BurnShares: 'L1BurnShares',
|
|
62
|
+
L1UnstakeAssets: 'L1UnstakeAssets'
|
|
59
63
|
} as const;
|
|
60
64
|
export type ReqGetTransferHistoryTypeEnum = typeof ReqGetTransferHistoryTypeEnum[keyof typeof ReqGetTransferHistoryTypeEnum];
|
|
61
65
|
|
|
@@ -0,0 +1,114 @@
|
|
|
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 RespSyntheticSpotInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface RespSyntheticSpotInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof RespSyntheticSpotInfo
|
|
26
|
+
*/
|
|
27
|
+
code: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RespSyntheticSpotInfo
|
|
32
|
+
*/
|
|
33
|
+
message?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof RespSyntheticSpotInfo
|
|
38
|
+
*/
|
|
39
|
+
bps_per_day: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof RespSyntheticSpotInfo
|
|
44
|
+
*/
|
|
45
|
+
expiry_time_ms: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof RespSyntheticSpotInfo
|
|
50
|
+
*/
|
|
51
|
+
spot_close_ms: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof RespSyntheticSpotInfo
|
|
56
|
+
*/
|
|
57
|
+
source: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof RespSyntheticSpotInfo
|
|
62
|
+
*/
|
|
63
|
+
symbol: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the RespSyntheticSpotInfo interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfRespSyntheticSpotInfo(value: object): value is RespSyntheticSpotInfo {
|
|
70
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
71
|
+
if (!('bps_per_day' in value) || value['bps_per_day'] === undefined) return false;
|
|
72
|
+
if (!('expiry_time_ms' in value) || value['expiry_time_ms'] === undefined) return false;
|
|
73
|
+
if (!('spot_close_ms' in value) || value['spot_close_ms'] === undefined) return false;
|
|
74
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
75
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function RespSyntheticSpotInfoFromJSON(json: any): RespSyntheticSpotInfo {
|
|
80
|
+
return RespSyntheticSpotInfoFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function RespSyntheticSpotInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespSyntheticSpotInfo {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'code': json['code'],
|
|
90
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
91
|
+
'bps_per_day': json['bps_per_day'],
|
|
92
|
+
'expiry_time_ms': json['expiry_time_ms'],
|
|
93
|
+
'spot_close_ms': json['spot_close_ms'],
|
|
94
|
+
'source': json['source'],
|
|
95
|
+
'symbol': json['symbol'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function RespSyntheticSpotInfoToJSON(value?: RespSyntheticSpotInfo | null): any {
|
|
100
|
+
if (value == null) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'code': value['code'],
|
|
106
|
+
'message': value['message'],
|
|
107
|
+
'bps_per_day': value['bps_per_day'],
|
|
108
|
+
'expiry_time_ms': value['expiry_time_ms'],
|
|
109
|
+
'spot_close_ms': value['spot_close_ms'],
|
|
110
|
+
'source': value['source'],
|
|
111
|
+
'symbol': value['symbol'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
package/models/index.ts
CHANGED
|
@@ -69,6 +69,8 @@ export * from './LiqTrade';
|
|
|
69
69
|
export * from './Liquidation';
|
|
70
70
|
export * from './LiquidationInfo';
|
|
71
71
|
export * from './LiquidationInfos';
|
|
72
|
+
export * from './MarkPriceCandle';
|
|
73
|
+
export * from './MarkPriceCandles';
|
|
72
74
|
export * from './MarketConfig';
|
|
73
75
|
export * from './MarketMetricData';
|
|
74
76
|
export * from './NextNonce';
|
|
@@ -133,6 +135,7 @@ export * from './ReqGetLeaderboard';
|
|
|
133
135
|
export * from './ReqGetLeases';
|
|
134
136
|
export * from './ReqGetLiquidationInfos';
|
|
135
137
|
export * from './ReqGetMakerOnlyApiKeys';
|
|
138
|
+
export * from './ReqGetMarkPriceCandles';
|
|
136
139
|
export * from './ReqGetMarketMetrics';
|
|
137
140
|
export * from './ReqGetNextNonce';
|
|
138
141
|
export * from './ReqGetOrderBookDetails';
|
|
@@ -149,6 +152,7 @@ export * from './ReqGetRangeWithIndexSortable';
|
|
|
149
152
|
export * from './ReqGetRecentTrades';
|
|
150
153
|
export * from './ReqGetReferralCode';
|
|
151
154
|
export * from './ReqGetReferralPoints';
|
|
155
|
+
export * from './ReqGetSyntheticSpotInfo';
|
|
152
156
|
export * from './ReqGetTrades';
|
|
153
157
|
export * from './ReqGetTransferFeeInfo';
|
|
154
158
|
export * from './ReqGetTransferHistory';
|
|
@@ -180,6 +184,7 @@ export * from './RespRevokeApiToken';
|
|
|
180
184
|
export * from './RespSendTx';
|
|
181
185
|
export * from './RespSendTxBatch';
|
|
182
186
|
export * from './RespSetMakerOnlyApiKeys';
|
|
187
|
+
export * from './RespSyntheticSpotInfo';
|
|
183
188
|
export * from './RespUpdateKickback';
|
|
184
189
|
export * from './RespUpdateRFQ';
|
|
185
190
|
export * from './RespUpdateReferralCode';
|
package/openapi.json
CHANGED
|
@@ -1381,7 +1381,8 @@
|
|
|
1381
1381
|
"account_count",
|
|
1382
1382
|
"active_account_count",
|
|
1383
1383
|
"tps",
|
|
1384
|
-
"buyback"
|
|
1384
|
+
"buyback",
|
|
1385
|
+
"buyback_usdc"
|
|
1385
1386
|
]
|
|
1386
1387
|
},
|
|
1387
1388
|
{
|
|
@@ -2410,6 +2411,83 @@
|
|
|
2410
2411
|
"description": "Submit LIT lease transfer"
|
|
2411
2412
|
}
|
|
2412
2413
|
},
|
|
2414
|
+
"/api/v1/markPriceCandles": {
|
|
2415
|
+
"get": {
|
|
2416
|
+
"summary": "markPriceCandles",
|
|
2417
|
+
"operationId": "markPriceCandles",
|
|
2418
|
+
"responses": {
|
|
2419
|
+
"200": {
|
|
2420
|
+
"description": "A successful response.",
|
|
2421
|
+
"schema": {
|
|
2422
|
+
"$ref": "#/definitions/MarkPriceCandles"
|
|
2423
|
+
}
|
|
2424
|
+
},
|
|
2425
|
+
"400": {
|
|
2426
|
+
"description": "Bad request",
|
|
2427
|
+
"schema": {
|
|
2428
|
+
"$ref": "#/definitions/ResultCode"
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
},
|
|
2432
|
+
"parameters": [
|
|
2433
|
+
{
|
|
2434
|
+
"name": "market_id",
|
|
2435
|
+
"in": "query",
|
|
2436
|
+
"required": true,
|
|
2437
|
+
"type": "integer",
|
|
2438
|
+
"format": "int16"
|
|
2439
|
+
},
|
|
2440
|
+
{
|
|
2441
|
+
"name": "resolution",
|
|
2442
|
+
"in": "query",
|
|
2443
|
+
"required": true,
|
|
2444
|
+
"type": "string",
|
|
2445
|
+
"enum": [
|
|
2446
|
+
"1m",
|
|
2447
|
+
"5m",
|
|
2448
|
+
"15m",
|
|
2449
|
+
"30m",
|
|
2450
|
+
"1h",
|
|
2451
|
+
"4h",
|
|
2452
|
+
"12h",
|
|
2453
|
+
"1d"
|
|
2454
|
+
]
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
"name": "start_timestamp",
|
|
2458
|
+
"in": "query",
|
|
2459
|
+
"required": true,
|
|
2460
|
+
"type": "integer",
|
|
2461
|
+
"format": "int64",
|
|
2462
|
+
"minimum": 0,
|
|
2463
|
+
"maximum": 5000000000000
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"name": "end_timestamp",
|
|
2467
|
+
"in": "query",
|
|
2468
|
+
"required": true,
|
|
2469
|
+
"type": "integer",
|
|
2470
|
+
"format": "int64",
|
|
2471
|
+
"minimum": 0,
|
|
2472
|
+
"maximum": 5000000000000
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
"name": "count_back",
|
|
2476
|
+
"in": "query",
|
|
2477
|
+
"required": true,
|
|
2478
|
+
"type": "integer",
|
|
2479
|
+
"format": "int64"
|
|
2480
|
+
}
|
|
2481
|
+
],
|
|
2482
|
+
"tags": [
|
|
2483
|
+
"candlestick"
|
|
2484
|
+
],
|
|
2485
|
+
"consumes": [
|
|
2486
|
+
"multipart/form-data"
|
|
2487
|
+
],
|
|
2488
|
+
"description": "Get mark price candles"
|
|
2489
|
+
}
|
|
2490
|
+
},
|
|
2413
2491
|
"/api/v1/marketMetrics": {
|
|
2414
2492
|
"get": {
|
|
2415
2493
|
"summary": "marketMetrics",
|
|
@@ -3986,6 +4064,41 @@
|
|
|
3986
4064
|
"description": "Set maker-only API key indexes"
|
|
3987
4065
|
}
|
|
3988
4066
|
},
|
|
4067
|
+
"/api/v1/syntheticSpotInfo": {
|
|
4068
|
+
"get": {
|
|
4069
|
+
"summary": "syntheticSpotInfo",
|
|
4070
|
+
"operationId": "syntheticSpotInfo",
|
|
4071
|
+
"responses": {
|
|
4072
|
+
"200": {
|
|
4073
|
+
"description": "A successful response.",
|
|
4074
|
+
"schema": {
|
|
4075
|
+
"$ref": "#/definitions/RespSyntheticSpotInfo"
|
|
4076
|
+
}
|
|
4077
|
+
},
|
|
4078
|
+
"400": {
|
|
4079
|
+
"description": "Bad request",
|
|
4080
|
+
"schema": {
|
|
4081
|
+
"$ref": "#/definitions/ResultCode"
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
},
|
|
4085
|
+
"parameters": [
|
|
4086
|
+
{
|
|
4087
|
+
"name": "symbol",
|
|
4088
|
+
"in": "query",
|
|
4089
|
+
"required": true,
|
|
4090
|
+
"type": "string"
|
|
4091
|
+
}
|
|
4092
|
+
],
|
|
4093
|
+
"tags": [
|
|
4094
|
+
"info"
|
|
4095
|
+
],
|
|
4096
|
+
"consumes": [
|
|
4097
|
+
"multipart/form-data"
|
|
4098
|
+
],
|
|
4099
|
+
"description": "Get synthetic spot info for a symbol"
|
|
4100
|
+
}
|
|
4101
|
+
},
|
|
3989
4102
|
"/api/v1/systemConfig": {
|
|
3990
4103
|
"get": {
|
|
3991
4104
|
"summary": "systemConfig",
|
|
@@ -4398,7 +4511,11 @@
|
|
|
4398
4511
|
"L2MintShares",
|
|
4399
4512
|
"L2BurnShares",
|
|
4400
4513
|
"L2StakeAssets",
|
|
4401
|
-
"L2UnstakeAssets"
|
|
4514
|
+
"L2UnstakeAssets",
|
|
4515
|
+
"L2CreatePublicPool",
|
|
4516
|
+
"L2CreateStakingPool",
|
|
4517
|
+
"L1BurnShares",
|
|
4518
|
+
"L1UnstakeAssets"
|
|
4402
4519
|
]
|
|
4403
4520
|
}
|
|
4404
4521
|
}
|
|
@@ -7750,6 +7867,87 @@
|
|
|
7750
7867
|
"liquidations"
|
|
7751
7868
|
]
|
|
7752
7869
|
},
|
|
7870
|
+
"MarkPriceCandle": {
|
|
7871
|
+
"type": "object",
|
|
7872
|
+
"properties": {
|
|
7873
|
+
"t": {
|
|
7874
|
+
"type": "integer",
|
|
7875
|
+
"format": "int64",
|
|
7876
|
+
"example": "1640995200",
|
|
7877
|
+
"description": " timestamp"
|
|
7878
|
+
},
|
|
7879
|
+
"o": {
|
|
7880
|
+
"type": "number",
|
|
7881
|
+
"format": "double",
|
|
7882
|
+
"example": "3024.66",
|
|
7883
|
+
"description": " open"
|
|
7884
|
+
},
|
|
7885
|
+
"h": {
|
|
7886
|
+
"type": "number",
|
|
7887
|
+
"format": "double",
|
|
7888
|
+
"example": "3034.66",
|
|
7889
|
+
"description": " high"
|
|
7890
|
+
},
|
|
7891
|
+
"l": {
|
|
7892
|
+
"type": "number",
|
|
7893
|
+
"format": "double",
|
|
7894
|
+
"example": "3014.66",
|
|
7895
|
+
"description": " low"
|
|
7896
|
+
},
|
|
7897
|
+
"c": {
|
|
7898
|
+
"type": "number",
|
|
7899
|
+
"format": "double",
|
|
7900
|
+
"example": "3024.66",
|
|
7901
|
+
"description": " close"
|
|
7902
|
+
},
|
|
7903
|
+
"sc": {
|
|
7904
|
+
"type": "integer",
|
|
7905
|
+
"format": "int64",
|
|
7906
|
+
"example": "42",
|
|
7907
|
+
"description": " sample_count"
|
|
7908
|
+
}
|
|
7909
|
+
},
|
|
7910
|
+
"title": "MarkPriceCandle",
|
|
7911
|
+
"required": [
|
|
7912
|
+
"t",
|
|
7913
|
+
"o",
|
|
7914
|
+
"h",
|
|
7915
|
+
"l",
|
|
7916
|
+
"c",
|
|
7917
|
+
"sc"
|
|
7918
|
+
]
|
|
7919
|
+
},
|
|
7920
|
+
"MarkPriceCandles": {
|
|
7921
|
+
"type": "object",
|
|
7922
|
+
"properties": {
|
|
7923
|
+
"code": {
|
|
7924
|
+
"type": "integer",
|
|
7925
|
+
"format": "int32",
|
|
7926
|
+
"example": "200"
|
|
7927
|
+
},
|
|
7928
|
+
"message": {
|
|
7929
|
+
"type": "string"
|
|
7930
|
+
},
|
|
7931
|
+
"r": {
|
|
7932
|
+
"type": "string",
|
|
7933
|
+
"example": "15m",
|
|
7934
|
+
"description": " resolution"
|
|
7935
|
+
},
|
|
7936
|
+
"c": {
|
|
7937
|
+
"type": "array",
|
|
7938
|
+
"items": {
|
|
7939
|
+
"$ref": "#/definitions/MarkPriceCandle"
|
|
7940
|
+
},
|
|
7941
|
+
"description": " candles"
|
|
7942
|
+
}
|
|
7943
|
+
},
|
|
7944
|
+
"title": "MarkPriceCandles",
|
|
7945
|
+
"required": [
|
|
7946
|
+
"code",
|
|
7947
|
+
"r",
|
|
7948
|
+
"c"
|
|
7949
|
+
]
|
|
7950
|
+
},
|
|
7753
7951
|
"MarketConfig": {
|
|
7754
7952
|
"type": "object",
|
|
7755
7953
|
"properties": {
|
|
@@ -10389,7 +10587,8 @@
|
|
|
10389
10587
|
"account_count",
|
|
10390
10588
|
"active_account_count",
|
|
10391
10589
|
"tps",
|
|
10392
|
-
"buyback"
|
|
10590
|
+
"buyback",
|
|
10591
|
+
"buyback_usdc"
|
|
10393
10592
|
]
|
|
10394
10593
|
},
|
|
10395
10594
|
"filter": {
|
|
@@ -10646,6 +10845,50 @@
|
|
|
10646
10845
|
"account_index"
|
|
10647
10846
|
]
|
|
10648
10847
|
},
|
|
10848
|
+
"ReqGetMarkPriceCandles": {
|
|
10849
|
+
"type": "object",
|
|
10850
|
+
"properties": {
|
|
10851
|
+
"market_id": {
|
|
10852
|
+
"type": "integer",
|
|
10853
|
+
"format": "int16"
|
|
10854
|
+
},
|
|
10855
|
+
"resolution": {
|
|
10856
|
+
"type": "string",
|
|
10857
|
+
"enum": [
|
|
10858
|
+
"1m",
|
|
10859
|
+
"5m",
|
|
10860
|
+
"15m",
|
|
10861
|
+
"30m",
|
|
10862
|
+
"1h",
|
|
10863
|
+
"4h",
|
|
10864
|
+
"12h",
|
|
10865
|
+
"1d"
|
|
10866
|
+
]
|
|
10867
|
+
},
|
|
10868
|
+
"start_timestamp": {
|
|
10869
|
+
"type": "integer",
|
|
10870
|
+
"format": "int64",
|
|
10871
|
+
"maximum": 5000000000000
|
|
10872
|
+
},
|
|
10873
|
+
"end_timestamp": {
|
|
10874
|
+
"type": "integer",
|
|
10875
|
+
"format": "int64",
|
|
10876
|
+
"maximum": 5000000000000
|
|
10877
|
+
},
|
|
10878
|
+
"count_back": {
|
|
10879
|
+
"type": "integer",
|
|
10880
|
+
"format": "int64"
|
|
10881
|
+
}
|
|
10882
|
+
},
|
|
10883
|
+
"title": "ReqGetMarkPriceCandles",
|
|
10884
|
+
"required": [
|
|
10885
|
+
"market_id",
|
|
10886
|
+
"resolution",
|
|
10887
|
+
"start_timestamp",
|
|
10888
|
+
"end_timestamp",
|
|
10889
|
+
"count_back"
|
|
10890
|
+
]
|
|
10891
|
+
},
|
|
10649
10892
|
"ReqGetMarketMetrics": {
|
|
10650
10893
|
"type": "object",
|
|
10651
10894
|
"properties": {
|
|
@@ -11000,6 +11243,18 @@
|
|
|
11000
11243
|
"account_index"
|
|
11001
11244
|
]
|
|
11002
11245
|
},
|
|
11246
|
+
"ReqGetSyntheticSpotInfo": {
|
|
11247
|
+
"type": "object",
|
|
11248
|
+
"properties": {
|
|
11249
|
+
"symbol": {
|
|
11250
|
+
"type": "string"
|
|
11251
|
+
}
|
|
11252
|
+
},
|
|
11253
|
+
"title": "ReqGetSyntheticSpotInfo",
|
|
11254
|
+
"required": [
|
|
11255
|
+
"symbol"
|
|
11256
|
+
]
|
|
11257
|
+
},
|
|
11003
11258
|
"ReqGetTrades": {
|
|
11004
11259
|
"type": "object",
|
|
11005
11260
|
"properties": {
|
|
@@ -11148,7 +11403,11 @@
|
|
|
11148
11403
|
"L2MintShares",
|
|
11149
11404
|
"L2BurnShares",
|
|
11150
11405
|
"L2StakeAssets",
|
|
11151
|
-
"L2UnstakeAssets"
|
|
11406
|
+
"L2UnstakeAssets",
|
|
11407
|
+
"L2CreatePublicPool",
|
|
11408
|
+
"L2CreateStakingPool",
|
|
11409
|
+
"L1BurnShares",
|
|
11410
|
+
"L1UnstakeAssets"
|
|
11152
11411
|
]
|
|
11153
11412
|
}
|
|
11154
11413
|
}
|
|
@@ -12402,6 +12661,46 @@
|
|
|
12402
12661
|
"code"
|
|
12403
12662
|
]
|
|
12404
12663
|
},
|
|
12664
|
+
"RespSyntheticSpotInfo": {
|
|
12665
|
+
"type": "object",
|
|
12666
|
+
"properties": {
|
|
12667
|
+
"code": {
|
|
12668
|
+
"type": "integer",
|
|
12669
|
+
"format": "int32",
|
|
12670
|
+
"example": "200"
|
|
12671
|
+
},
|
|
12672
|
+
"message": {
|
|
12673
|
+
"type": "string"
|
|
12674
|
+
},
|
|
12675
|
+
"bps_per_day": {
|
|
12676
|
+
"type": "number",
|
|
12677
|
+
"format": "double"
|
|
12678
|
+
},
|
|
12679
|
+
"expiry_time_ms": {
|
|
12680
|
+
"type": "integer",
|
|
12681
|
+
"format": "int64"
|
|
12682
|
+
},
|
|
12683
|
+
"spot_close_ms": {
|
|
12684
|
+
"type": "integer",
|
|
12685
|
+
"format": "int64"
|
|
12686
|
+
},
|
|
12687
|
+
"source": {
|
|
12688
|
+
"type": "string"
|
|
12689
|
+
},
|
|
12690
|
+
"symbol": {
|
|
12691
|
+
"type": "string"
|
|
12692
|
+
}
|
|
12693
|
+
},
|
|
12694
|
+
"title": "RespSyntheticSpotInfo",
|
|
12695
|
+
"required": [
|
|
12696
|
+
"code",
|
|
12697
|
+
"bps_per_day",
|
|
12698
|
+
"expiry_time_ms",
|
|
12699
|
+
"spot_close_ms",
|
|
12700
|
+
"source",
|
|
12701
|
+
"symbol"
|
|
12702
|
+
]
|
|
12703
|
+
},
|
|
12405
12704
|
"RespUpdateKickback": {
|
|
12406
12705
|
"type": "object",
|
|
12407
12706
|
"properties": {
|