zklighter-perps 1.0.315 → 1.0.317
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 +4 -0
- package/apis/CandlestickApi.ts +10 -0
- package/apis/InfoApi.ts +39 -0
- package/models/PriceOracleMarket.ts +86 -0
- package/models/PriceOraclePrice.ts +106 -0
- package/models/ReqGetCandles.ts +8 -0
- package/models/ReqGetMarkPriceCandles.ts +8 -0
- package/models/ReqGetPriceOracleInfo.ts +60 -0
- package/models/RespPriceOracleInfo.ts +94 -0
- package/models/index.ts +4 -0
- package/openapi.json +159 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -148,6 +148,8 @@ models/PositionFundings.ts
|
|
|
148
148
|
models/PriceAlert.ts
|
|
149
149
|
models/PriceChangeAlert.ts
|
|
150
150
|
models/PriceLevel.ts
|
|
151
|
+
models/PriceOracleMarket.ts
|
|
152
|
+
models/PriceOraclePrice.ts
|
|
151
153
|
models/PublicPoolInfo.ts
|
|
152
154
|
models/PublicPoolMetadata.ts
|
|
153
155
|
models/PublicPoolShare.ts
|
|
@@ -216,6 +218,7 @@ models/ReqGetOrderBooks.ts
|
|
|
216
218
|
models/ReqGetPartnerStats.ts
|
|
217
219
|
models/ReqGetPnlLeaderboard.ts
|
|
218
220
|
models/ReqGetPositionFunding.ts
|
|
221
|
+
models/ReqGetPriceOracleInfo.ts
|
|
219
222
|
models/ReqGetPublicPoolsMetadata.ts
|
|
220
223
|
models/ReqGetPushNotifSettings.ts
|
|
221
224
|
models/ReqGetRFQ.ts
|
|
@@ -277,6 +280,7 @@ models/RespGuildMembership.ts
|
|
|
277
280
|
models/RespListMarketNews.ts
|
|
278
281
|
models/RespListRFQs.ts
|
|
279
282
|
models/RespPostApiToken.ts
|
|
283
|
+
models/RespPriceOracleInfo.ts
|
|
280
284
|
models/RespPublicPoolsMetadata.ts
|
|
281
285
|
models/RespRegisterEventOrderBook.ts
|
|
282
286
|
models/RespResolveGuildJoinRequest.ts
|
package/apis/CandlestickApi.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface CandlesRequest {
|
|
|
41
41
|
end_timestamp: number;
|
|
42
42
|
count_back: number;
|
|
43
43
|
set_timestamp_to_end?: boolean;
|
|
44
|
+
merge_mark_price?: boolean;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export interface FundingsRequest {
|
|
@@ -57,6 +58,7 @@ export interface MarkPriceCandlesRequest {
|
|
|
57
58
|
start_timestamp: number;
|
|
58
59
|
end_timestamp: number;
|
|
59
60
|
count_back: number;
|
|
61
|
+
connect_opens?: boolean;
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
export interface MarketPriceChartsRequest {
|
|
@@ -134,6 +136,10 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
134
136
|
queryParameters['set_timestamp_to_end'] = requestParameters['set_timestamp_to_end'];
|
|
135
137
|
}
|
|
136
138
|
|
|
139
|
+
if (requestParameters['merge_mark_price'] != null) {
|
|
140
|
+
queryParameters['merge_mark_price'] = requestParameters['merge_mark_price'];
|
|
141
|
+
}
|
|
142
|
+
|
|
137
143
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
138
144
|
|
|
139
145
|
const response = await this.request({
|
|
@@ -300,6 +306,10 @@ export class CandlestickApi extends runtime.BaseAPI {
|
|
|
300
306
|
queryParameters['count_back'] = requestParameters['count_back'];
|
|
301
307
|
}
|
|
302
308
|
|
|
309
|
+
if (requestParameters['connect_opens'] != null) {
|
|
310
|
+
queryParameters['connect_opens'] = requestParameters['connect_opens'];
|
|
311
|
+
}
|
|
312
|
+
|
|
303
313
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
304
314
|
|
|
305
315
|
const response = await this.request({
|
package/apis/InfoApi.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
Layer1BasicInfo,
|
|
19
|
+
RespPriceOracleInfo,
|
|
19
20
|
RespRollingInfo,
|
|
20
21
|
RespSyntheticSpotInfo,
|
|
21
22
|
RespWithdrawalDelay,
|
|
@@ -26,6 +27,8 @@ import type {
|
|
|
26
27
|
import {
|
|
27
28
|
Layer1BasicInfoFromJSON,
|
|
28
29
|
Layer1BasicInfoToJSON,
|
|
30
|
+
RespPriceOracleInfoFromJSON,
|
|
31
|
+
RespPriceOracleInfoToJSON,
|
|
29
32
|
RespRollingInfoFromJSON,
|
|
30
33
|
RespRollingInfoToJSON,
|
|
31
34
|
RespSyntheticSpotInfoFromJSON,
|
|
@@ -40,6 +43,10 @@ import {
|
|
|
40
43
|
TransferFeeInfoToJSON,
|
|
41
44
|
} from '../models/index';
|
|
42
45
|
|
|
46
|
+
export interface PriceOracleInfoRequest {
|
|
47
|
+
symbol?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
export interface RollingInfoRequest {
|
|
44
51
|
symbol: string;
|
|
45
52
|
}
|
|
@@ -86,6 +93,38 @@ export class InfoApi extends runtime.BaseAPI {
|
|
|
86
93
|
return await response.value();
|
|
87
94
|
}
|
|
88
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Get price oracle info (source in use, median exchanges, price cap) for all markets or a single symbol
|
|
98
|
+
* priceOracleInfo
|
|
99
|
+
*/
|
|
100
|
+
async priceOracleInfoRaw(requestParameters: PriceOracleInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespPriceOracleInfo>> {
|
|
101
|
+
const queryParameters: any = {};
|
|
102
|
+
|
|
103
|
+
if (requestParameters['symbol'] != null) {
|
|
104
|
+
queryParameters['symbol'] = requestParameters['symbol'];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
108
|
+
|
|
109
|
+
const response = await this.request({
|
|
110
|
+
path: `/api/v1/priceOracleInfo`,
|
|
111
|
+
method: 'GET',
|
|
112
|
+
headers: headerParameters,
|
|
113
|
+
query: queryParameters,
|
|
114
|
+
}, initOverrides);
|
|
115
|
+
|
|
116
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespPriceOracleInfoFromJSON(jsonValue));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Get price oracle info (source in use, median exchanges, price cap) for all markets or a single symbol
|
|
121
|
+
* priceOracleInfo
|
|
122
|
+
*/
|
|
123
|
+
async priceOracleInfo(requestParameters: PriceOracleInfoRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespPriceOracleInfo> {
|
|
124
|
+
const response = await this.priceOracleInfoRaw(requestParameters, initOverrides);
|
|
125
|
+
return await response.value();
|
|
126
|
+
}
|
|
127
|
+
|
|
89
128
|
/**
|
|
90
129
|
* Get rolling futures info for a symbol
|
|
91
130
|
* rollingInfo
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { PriceOraclePrice } from './PriceOraclePrice';
|
|
17
|
+
import {
|
|
18
|
+
PriceOraclePriceFromJSON,
|
|
19
|
+
PriceOraclePriceFromJSONTyped,
|
|
20
|
+
PriceOraclePriceToJSON,
|
|
21
|
+
} from './PriceOraclePrice';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface PriceOracleMarket
|
|
27
|
+
*/
|
|
28
|
+
export interface PriceOracleMarket {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof PriceOracleMarket
|
|
33
|
+
*/
|
|
34
|
+
symbol: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {PriceOraclePrice}
|
|
38
|
+
* @memberof PriceOracleMarket
|
|
39
|
+
*/
|
|
40
|
+
index: PriceOraclePrice;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {PriceOraclePrice}
|
|
44
|
+
* @memberof PriceOracleMarket
|
|
45
|
+
*/
|
|
46
|
+
mark: PriceOraclePrice;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the PriceOracleMarket interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfPriceOracleMarket(value: object): value is PriceOracleMarket {
|
|
53
|
+
if (!('symbol' in value) || value['symbol'] === undefined) return false;
|
|
54
|
+
if (!('index' in value) || value['index'] === undefined) return false;
|
|
55
|
+
if (!('mark' in value) || value['mark'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PriceOracleMarketFromJSON(json: any): PriceOracleMarket {
|
|
60
|
+
return PriceOracleMarketFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function PriceOracleMarketFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceOracleMarket {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'symbol': json['symbol'],
|
|
70
|
+
'index': PriceOraclePriceFromJSON(json['index']),
|
|
71
|
+
'mark': PriceOraclePriceFromJSON(json['mark']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function PriceOracleMarketToJSON(value?: PriceOracleMarket | null): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'symbol': value['symbol'],
|
|
82
|
+
'index': PriceOraclePriceToJSON(value['index']),
|
|
83
|
+
'mark': PriceOraclePriceToJSON(value['mark']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -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 PriceOraclePrice
|
|
20
|
+
*/
|
|
21
|
+
export interface PriceOraclePrice {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PriceOraclePrice
|
|
26
|
+
*/
|
|
27
|
+
source: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof PriceOraclePrice
|
|
32
|
+
*/
|
|
33
|
+
using_median: boolean;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof PriceOraclePrice
|
|
38
|
+
*/
|
|
39
|
+
using_internal_price: boolean;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Array<string>}
|
|
43
|
+
* @memberof PriceOraclePrice
|
|
44
|
+
*/
|
|
45
|
+
median_sources: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PriceOraclePrice
|
|
50
|
+
*/
|
|
51
|
+
price_cap_bps: number;
|
|
52
|
+
/**
|
|
53
|
+
* cap bounds: ref * (1 -/+ bps / 10000)
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof PriceOraclePrice
|
|
56
|
+
*/
|
|
57
|
+
price_cap_reference_price: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the PriceOraclePrice interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfPriceOraclePrice(value: object): value is PriceOraclePrice {
|
|
64
|
+
if (!('source' in value) || value['source'] === undefined) return false;
|
|
65
|
+
if (!('using_median' in value) || value['using_median'] === undefined) return false;
|
|
66
|
+
if (!('using_internal_price' in value) || value['using_internal_price'] === undefined) return false;
|
|
67
|
+
if (!('median_sources' in value) || value['median_sources'] === undefined) return false;
|
|
68
|
+
if (!('price_cap_bps' in value) || value['price_cap_bps'] === undefined) return false;
|
|
69
|
+
if (!('price_cap_reference_price' in value) || value['price_cap_reference_price'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function PriceOraclePriceFromJSON(json: any): PriceOraclePrice {
|
|
74
|
+
return PriceOraclePriceFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function PriceOraclePriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceOraclePrice {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'source': json['source'],
|
|
84
|
+
'using_median': json['using_median'],
|
|
85
|
+
'using_internal_price': json['using_internal_price'],
|
|
86
|
+
'median_sources': json['median_sources'],
|
|
87
|
+
'price_cap_bps': json['price_cap_bps'],
|
|
88
|
+
'price_cap_reference_price': json['price_cap_reference_price'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function PriceOraclePriceToJSON(value?: PriceOraclePrice | null): any {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'source': value['source'],
|
|
99
|
+
'using_median': value['using_median'],
|
|
100
|
+
'using_internal_price': value['using_internal_price'],
|
|
101
|
+
'median_sources': value['median_sources'],
|
|
102
|
+
'price_cap_bps': value['price_cap_bps'],
|
|
103
|
+
'price_cap_reference_price': value['price_cap_reference_price'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
package/models/ReqGetCandles.ts
CHANGED
|
@@ -55,6 +55,12 @@ export interface ReqGetCandles {
|
|
|
55
55
|
* @memberof ReqGetCandles
|
|
56
56
|
*/
|
|
57
57
|
set_timestamp_to_end?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {boolean}
|
|
61
|
+
* @memberof ReqGetCandles
|
|
62
|
+
*/
|
|
63
|
+
merge_mark_price?: boolean;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
|
|
@@ -102,6 +108,7 @@ export function ReqGetCandlesFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
102
108
|
'end_timestamp': json['end_timestamp'],
|
|
103
109
|
'count_back': json['count_back'],
|
|
104
110
|
'set_timestamp_to_end': json['set_timestamp_to_end'] == null ? undefined : json['set_timestamp_to_end'],
|
|
111
|
+
'merge_mark_price': json['merge_mark_price'] == null ? undefined : json['merge_mark_price'],
|
|
105
112
|
};
|
|
106
113
|
}
|
|
107
114
|
|
|
@@ -117,6 +124,7 @@ export function ReqGetCandlesToJSON(value?: ReqGetCandles | null): any {
|
|
|
117
124
|
'end_timestamp': value['end_timestamp'],
|
|
118
125
|
'count_back': value['count_back'],
|
|
119
126
|
'set_timestamp_to_end': value['set_timestamp_to_end'],
|
|
127
|
+
'merge_mark_price': value['merge_mark_price'],
|
|
120
128
|
};
|
|
121
129
|
}
|
|
122
130
|
|
|
@@ -49,6 +49,12 @@ export interface ReqGetMarkPriceCandles {
|
|
|
49
49
|
* @memberof ReqGetMarkPriceCandles
|
|
50
50
|
*/
|
|
51
51
|
count_back: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof ReqGetMarkPriceCandles
|
|
56
|
+
*/
|
|
57
|
+
connect_opens?: boolean;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
|
|
@@ -95,6 +101,7 @@ export function ReqGetMarkPriceCandlesFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
95
101
|
'start_timestamp': json['start_timestamp'],
|
|
96
102
|
'end_timestamp': json['end_timestamp'],
|
|
97
103
|
'count_back': json['count_back'],
|
|
104
|
+
'connect_opens': json['connect_opens'] == null ? undefined : json['connect_opens'],
|
|
98
105
|
};
|
|
99
106
|
}
|
|
100
107
|
|
|
@@ -109,6 +116,7 @@ export function ReqGetMarkPriceCandlesToJSON(value?: ReqGetMarkPriceCandles | nu
|
|
|
109
116
|
'start_timestamp': value['start_timestamp'],
|
|
110
117
|
'end_timestamp': value['end_timestamp'],
|
|
111
118
|
'count_back': value['count_back'],
|
|
119
|
+
'connect_opens': value['connect_opens'],
|
|
112
120
|
};
|
|
113
121
|
}
|
|
114
122
|
|
|
@@ -0,0 +1,60 @@
|
|
|
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 ReqGetPriceOracleInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetPriceOracleInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetPriceOracleInfo
|
|
26
|
+
*/
|
|
27
|
+
symbol?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ReqGetPriceOracleInfo interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfReqGetPriceOracleInfo(value: object): value is ReqGetPriceOracleInfo {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function ReqGetPriceOracleInfoFromJSON(json: any): ReqGetPriceOracleInfo {
|
|
38
|
+
return ReqGetPriceOracleInfoFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ReqGetPriceOracleInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetPriceOracleInfo {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
|
|
47
|
+
'symbol': json['symbol'] == null ? undefined : json['symbol'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ReqGetPriceOracleInfoToJSON(value?: ReqGetPriceOracleInfo | null): any {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
|
|
57
|
+
'symbol': value['symbol'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -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 { PriceOracleMarket } from './PriceOracleMarket';
|
|
17
|
+
import {
|
|
18
|
+
PriceOracleMarketFromJSON,
|
|
19
|
+
PriceOracleMarketFromJSONTyped,
|
|
20
|
+
PriceOracleMarketToJSON,
|
|
21
|
+
} from './PriceOracleMarket';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface RespPriceOracleInfo
|
|
27
|
+
*/
|
|
28
|
+
export interface RespPriceOracleInfo {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof RespPriceOracleInfo
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof RespPriceOracleInfo
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof RespPriceOracleInfo
|
|
45
|
+
*/
|
|
46
|
+
computed_at_ms: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Array<PriceOracleMarket>}
|
|
50
|
+
* @memberof RespPriceOracleInfo
|
|
51
|
+
*/
|
|
52
|
+
markets: Array<PriceOracleMarket>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the RespPriceOracleInfo interface.
|
|
57
|
+
*/
|
|
58
|
+
export function instanceOfRespPriceOracleInfo(value: object): value is RespPriceOracleInfo {
|
|
59
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
60
|
+
if (!('computed_at_ms' in value) || value['computed_at_ms'] === undefined) return false;
|
|
61
|
+
if (!('markets' in value) || value['markets'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function RespPriceOracleInfoFromJSON(json: any): RespPriceOracleInfo {
|
|
66
|
+
return RespPriceOracleInfoFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function RespPriceOracleInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespPriceOracleInfo {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'code': json['code'],
|
|
76
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
77
|
+
'computed_at_ms': json['computed_at_ms'],
|
|
78
|
+
'markets': ((json['markets'] as Array<any>).map(PriceOracleMarketFromJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function RespPriceOracleInfoToJSON(value?: RespPriceOracleInfo | null): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'code': value['code'],
|
|
89
|
+
'message': value['message'],
|
|
90
|
+
'computed_at_ms': value['computed_at_ms'],
|
|
91
|
+
'markets': ((value['markets'] as Array<any>).map(PriceOracleMarketToJSON)),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
package/models/index.ts
CHANGED
|
@@ -121,6 +121,8 @@ export * from './PositionFundings';
|
|
|
121
121
|
export * from './PriceAlert';
|
|
122
122
|
export * from './PriceChangeAlert';
|
|
123
123
|
export * from './PriceLevel';
|
|
124
|
+
export * from './PriceOracleMarket';
|
|
125
|
+
export * from './PriceOraclePrice';
|
|
124
126
|
export * from './PublicPoolInfo';
|
|
125
127
|
export * from './PublicPoolMetadata';
|
|
126
128
|
export * from './PublicPoolShare';
|
|
@@ -189,6 +191,7 @@ export * from './ReqGetOrderBooks';
|
|
|
189
191
|
export * from './ReqGetPartnerStats';
|
|
190
192
|
export * from './ReqGetPnlLeaderboard';
|
|
191
193
|
export * from './ReqGetPositionFunding';
|
|
194
|
+
export * from './ReqGetPriceOracleInfo';
|
|
192
195
|
export * from './ReqGetPublicPoolsMetadata';
|
|
193
196
|
export * from './ReqGetPushNotifSettings';
|
|
194
197
|
export * from './ReqGetRFQ';
|
|
@@ -250,6 +253,7 @@ export * from './RespGuildMembership';
|
|
|
250
253
|
export * from './RespListMarketNews';
|
|
251
254
|
export * from './RespListRFQs';
|
|
252
255
|
export * from './RespPostApiToken';
|
|
256
|
+
export * from './RespPriceOracleInfo';
|
|
253
257
|
export * from './RespPublicPoolsMetadata';
|
|
254
258
|
export * from './RespRegisterEventOrderBook';
|
|
255
259
|
export * from './RespResolveGuildJoinRequest';
|
package/openapi.json
CHANGED
|
@@ -1252,6 +1252,14 @@
|
|
|
1252
1252
|
"type": "boolean",
|
|
1253
1253
|
"format": "boolean",
|
|
1254
1254
|
"default": "false"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"name": "merge_mark_price",
|
|
1258
|
+
"in": "query",
|
|
1259
|
+
"required": false,
|
|
1260
|
+
"type": "boolean",
|
|
1261
|
+
"format": "boolean",
|
|
1262
|
+
"default": "false"
|
|
1255
1263
|
}
|
|
1256
1264
|
],
|
|
1257
1265
|
"tags": [
|
|
@@ -4096,6 +4104,14 @@
|
|
|
4096
4104
|
"required": true,
|
|
4097
4105
|
"type": "integer",
|
|
4098
4106
|
"format": "int64"
|
|
4107
|
+
},
|
|
4108
|
+
{
|
|
4109
|
+
"name": "connect_opens",
|
|
4110
|
+
"in": "query",
|
|
4111
|
+
"required": false,
|
|
4112
|
+
"type": "boolean",
|
|
4113
|
+
"format": "boolean",
|
|
4114
|
+
"default": "false"
|
|
4099
4115
|
}
|
|
4100
4116
|
],
|
|
4101
4117
|
"tags": [
|
|
@@ -4903,6 +4919,41 @@
|
|
|
4903
4919
|
"description": "Get accounts position fundings"
|
|
4904
4920
|
}
|
|
4905
4921
|
},
|
|
4922
|
+
"/api/v1/priceOracleInfo": {
|
|
4923
|
+
"get": {
|
|
4924
|
+
"summary": "priceOracleInfo",
|
|
4925
|
+
"operationId": "priceOracleInfo",
|
|
4926
|
+
"responses": {
|
|
4927
|
+
"200": {
|
|
4928
|
+
"description": "A successful response.",
|
|
4929
|
+
"schema": {
|
|
4930
|
+
"$ref": "#/definitions/RespPriceOracleInfo"
|
|
4931
|
+
}
|
|
4932
|
+
},
|
|
4933
|
+
"400": {
|
|
4934
|
+
"description": "Bad request",
|
|
4935
|
+
"schema": {
|
|
4936
|
+
"$ref": "#/definitions/ResultCode"
|
|
4937
|
+
}
|
|
4938
|
+
}
|
|
4939
|
+
},
|
|
4940
|
+
"parameters": [
|
|
4941
|
+
{
|
|
4942
|
+
"name": "symbol",
|
|
4943
|
+
"in": "query",
|
|
4944
|
+
"required": false,
|
|
4945
|
+
"type": "string"
|
|
4946
|
+
}
|
|
4947
|
+
],
|
|
4948
|
+
"tags": [
|
|
4949
|
+
"info"
|
|
4950
|
+
],
|
|
4951
|
+
"consumes": [
|
|
4952
|
+
"multipart/form-data"
|
|
4953
|
+
],
|
|
4954
|
+
"description": "Get price oracle info (source in use, median exchanges, price cap) for all markets or a single symbol"
|
|
4955
|
+
}
|
|
4956
|
+
},
|
|
4906
4957
|
"/api/v1/publicPoolsMetadata": {
|
|
4907
4958
|
"get": {
|
|
4908
4959
|
"summary": "publicPoolsMetadata",
|
|
@@ -13553,6 +13604,66 @@
|
|
|
13553
13604
|
"size"
|
|
13554
13605
|
]
|
|
13555
13606
|
},
|
|
13607
|
+
"PriceOracleMarket": {
|
|
13608
|
+
"type": "object",
|
|
13609
|
+
"properties": {
|
|
13610
|
+
"symbol": {
|
|
13611
|
+
"type": "string"
|
|
13612
|
+
},
|
|
13613
|
+
"index": {
|
|
13614
|
+
"$ref": "#/definitions/PriceOraclePrice"
|
|
13615
|
+
},
|
|
13616
|
+
"mark": {
|
|
13617
|
+
"$ref": "#/definitions/PriceOraclePrice"
|
|
13618
|
+
}
|
|
13619
|
+
},
|
|
13620
|
+
"title": "PriceOracleMarket",
|
|
13621
|
+
"required": [
|
|
13622
|
+
"symbol",
|
|
13623
|
+
"index",
|
|
13624
|
+
"mark"
|
|
13625
|
+
]
|
|
13626
|
+
},
|
|
13627
|
+
"PriceOraclePrice": {
|
|
13628
|
+
"type": "object",
|
|
13629
|
+
"properties": {
|
|
13630
|
+
"source": {
|
|
13631
|
+
"type": "string"
|
|
13632
|
+
},
|
|
13633
|
+
"using_median": {
|
|
13634
|
+
"type": "boolean",
|
|
13635
|
+
"format": "boolean"
|
|
13636
|
+
},
|
|
13637
|
+
"using_internal_price": {
|
|
13638
|
+
"type": "boolean",
|
|
13639
|
+
"format": "boolean"
|
|
13640
|
+
},
|
|
13641
|
+
"median_sources": {
|
|
13642
|
+
"type": "array",
|
|
13643
|
+
"items": {
|
|
13644
|
+
"type": "string"
|
|
13645
|
+
}
|
|
13646
|
+
},
|
|
13647
|
+
"price_cap_bps": {
|
|
13648
|
+
"type": "number",
|
|
13649
|
+
"format": "double"
|
|
13650
|
+
},
|
|
13651
|
+
"price_cap_reference_price": {
|
|
13652
|
+
"type": "number",
|
|
13653
|
+
"format": "double",
|
|
13654
|
+
"description": " cap bounds: ref * (1 -/+ bps / 10000)"
|
|
13655
|
+
}
|
|
13656
|
+
},
|
|
13657
|
+
"title": "PriceOraclePrice",
|
|
13658
|
+
"required": [
|
|
13659
|
+
"source",
|
|
13660
|
+
"using_median",
|
|
13661
|
+
"using_internal_price",
|
|
13662
|
+
"median_sources",
|
|
13663
|
+
"price_cap_bps",
|
|
13664
|
+
"price_cap_reference_price"
|
|
13665
|
+
]
|
|
13666
|
+
},
|
|
13556
13667
|
"PublicPoolInfo": {
|
|
13557
13668
|
"type": "object",
|
|
13558
13669
|
"properties": {
|
|
@@ -15234,6 +15345,11 @@
|
|
|
15234
15345
|
"type": "boolean",
|
|
15235
15346
|
"format": "boolean",
|
|
15236
15347
|
"default": "false"
|
|
15348
|
+
},
|
|
15349
|
+
"merge_mark_price": {
|
|
15350
|
+
"type": "boolean",
|
|
15351
|
+
"format": "boolean",
|
|
15352
|
+
"default": "false"
|
|
15237
15353
|
}
|
|
15238
15354
|
},
|
|
15239
15355
|
"title": "ReqGetCandles",
|
|
@@ -15784,6 +15900,11 @@
|
|
|
15784
15900
|
"count_back": {
|
|
15785
15901
|
"type": "integer",
|
|
15786
15902
|
"format": "int64"
|
|
15903
|
+
},
|
|
15904
|
+
"connect_opens": {
|
|
15905
|
+
"type": "boolean",
|
|
15906
|
+
"format": "boolean",
|
|
15907
|
+
"default": "false"
|
|
15787
15908
|
}
|
|
15788
15909
|
},
|
|
15789
15910
|
"title": "ReqGetMarkPriceCandles",
|
|
@@ -16048,6 +16169,15 @@
|
|
|
16048
16169
|
"limit"
|
|
16049
16170
|
]
|
|
16050
16171
|
},
|
|
16172
|
+
"ReqGetPriceOracleInfo": {
|
|
16173
|
+
"type": "object",
|
|
16174
|
+
"properties": {
|
|
16175
|
+
"symbol": {
|
|
16176
|
+
"type": "string"
|
|
16177
|
+
}
|
|
16178
|
+
},
|
|
16179
|
+
"title": "ReqGetPriceOracleInfo"
|
|
16180
|
+
},
|
|
16051
16181
|
"ReqGetPublicPoolsMetadata": {
|
|
16052
16182
|
"type": "object",
|
|
16053
16183
|
"properties": {
|
|
@@ -18435,6 +18565,35 @@
|
|
|
18435
18565
|
"scopes"
|
|
18436
18566
|
]
|
|
18437
18567
|
},
|
|
18568
|
+
"RespPriceOracleInfo": {
|
|
18569
|
+
"type": "object",
|
|
18570
|
+
"properties": {
|
|
18571
|
+
"code": {
|
|
18572
|
+
"type": "integer",
|
|
18573
|
+
"format": "int32",
|
|
18574
|
+
"example": "200"
|
|
18575
|
+
},
|
|
18576
|
+
"message": {
|
|
18577
|
+
"type": "string"
|
|
18578
|
+
},
|
|
18579
|
+
"computed_at_ms": {
|
|
18580
|
+
"type": "integer",
|
|
18581
|
+
"format": "int64"
|
|
18582
|
+
},
|
|
18583
|
+
"markets": {
|
|
18584
|
+
"type": "array",
|
|
18585
|
+
"items": {
|
|
18586
|
+
"$ref": "#/definitions/PriceOracleMarket"
|
|
18587
|
+
}
|
|
18588
|
+
}
|
|
18589
|
+
},
|
|
18590
|
+
"title": "RespPriceOracleInfo",
|
|
18591
|
+
"required": [
|
|
18592
|
+
"code",
|
|
18593
|
+
"computed_at_ms",
|
|
18594
|
+
"markets"
|
|
18595
|
+
]
|
|
18596
|
+
},
|
|
18438
18597
|
"RespPublicPoolsMetadata": {
|
|
18439
18598
|
"type": "object",
|
|
18440
18599
|
"properties": {
|