zklighter-perps 1.0.314 → 1.0.316

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.
@@ -24,6 +24,7 @@ apis/StockfinancialsApi.ts
24
24
  apis/TokenlistApi.ts
25
25
  apis/TransactionApi.ts
26
26
  apis/TvApi.ts
27
+ apis/UpdownApi.ts
27
28
  apis/index.ts
28
29
  index.ts
29
30
  models/Account.ts
@@ -147,6 +148,8 @@ models/PositionFundings.ts
147
148
  models/PriceAlert.ts
148
149
  models/PriceChangeAlert.ts
149
150
  models/PriceLevel.ts
151
+ models/PriceOracleMarket.ts
152
+ models/PriceOraclePrice.ts
150
153
  models/PublicPoolInfo.ts
151
154
  models/PublicPoolMetadata.ts
152
155
  models/PublicPoolShare.ts
@@ -215,6 +218,7 @@ models/ReqGetOrderBooks.ts
215
218
  models/ReqGetPartnerStats.ts
216
219
  models/ReqGetPnlLeaderboard.ts
217
220
  models/ReqGetPositionFunding.ts
221
+ models/ReqGetPriceOracleInfo.ts
218
222
  models/ReqGetPublicPoolsMetadata.ts
219
223
  models/ReqGetPushNotifSettings.ts
220
224
  models/ReqGetRFQ.ts
@@ -232,6 +236,7 @@ models/ReqGetTrades.ts
232
236
  models/ReqGetTransferFeeInfo.ts
233
237
  models/ReqGetTransferHistory.ts
234
238
  models/ReqGetTx.ts
239
+ models/ReqGetUpDownCandles.ts
235
240
  models/ReqGetUserReferrals.ts
236
241
  models/ReqGetWithdrawHistory.ts
237
242
  models/ReqGuildByReferralCode.ts
@@ -265,6 +270,7 @@ models/RespGetMakerOnlyApiKeys.ts
265
270
  models/RespGetMarketMetrics.ts
266
271
  models/RespGetPushNotifSettings.ts
267
272
  models/RespGetRFQ.ts
273
+ models/RespGetUpDownCandles.ts
268
274
  models/RespGuildByReferralCode.ts
269
275
  models/RespGuildInviteCodes.ts
270
276
  models/RespGuildJoinRequest.ts
@@ -274,6 +280,7 @@ models/RespGuildMembership.ts
274
280
  models/RespListMarketNews.ts
275
281
  models/RespListRFQs.ts
276
282
  models/RespPostApiToken.ts
283
+ models/RespPriceOracleInfo.ts
277
284
  models/RespPublicPoolsMetadata.ts
278
285
  models/RespRegisterEventOrderBook.ts
279
286
  models/RespResolveGuildJoinRequest.ts
@@ -339,6 +346,7 @@ models/Tx.ts
339
346
  models/TxHash.ts
340
347
  models/TxHashes.ts
341
348
  models/Txs.ts
349
+ models/UpDownCandle.ts
342
350
  models/UpcomingEarning.ts
343
351
  models/UpcomingEarnings.ts
344
352
  models/UserReferrals.ts
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,131 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ RespGetUpDownCandles,
19
+ ResultCode,
20
+ } from '../models/index';
21
+ import {
22
+ RespGetUpDownCandlesFromJSON,
23
+ RespGetUpDownCandlesToJSON,
24
+ ResultCodeFromJSON,
25
+ ResultCodeToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface UpDownCandlesRequest {
29
+ symbol: string;
30
+ duration: string;
31
+ start_timestamp: number;
32
+ end_timestamp: number;
33
+ resolution?: UpDownCandlesResolutionEnum;
34
+ limit?: number;
35
+ }
36
+
37
+ /**
38
+ *
39
+ */
40
+ export class UpdownApi extends runtime.BaseAPI {
41
+
42
+ /**
43
+ * Get the OHLC candles (1s = the exact price observations, or 30s) of an up/down market series (symbol + duration, e.g. btc/5m) in a bounded time range (at most 24h), oldest first. Pass next_cursor as start_timestamp to page forward; live candles are on the up_down_candle/<symbol>/<duration>/<resolution> websocket channel.
44
+ * upDownCandles
45
+ */
46
+ async upDownCandlesRaw(requestParameters: UpDownCandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespGetUpDownCandles>> {
47
+ if (requestParameters['symbol'] == null) {
48
+ throw new runtime.RequiredError(
49
+ 'symbol',
50
+ 'Required parameter "symbol" was null or undefined when calling upDownCandles().'
51
+ );
52
+ }
53
+
54
+ if (requestParameters['duration'] == null) {
55
+ throw new runtime.RequiredError(
56
+ 'duration',
57
+ 'Required parameter "duration" was null or undefined when calling upDownCandles().'
58
+ );
59
+ }
60
+
61
+ if (requestParameters['start_timestamp'] == null) {
62
+ throw new runtime.RequiredError(
63
+ 'start_timestamp',
64
+ 'Required parameter "start_timestamp" was null or undefined when calling upDownCandles().'
65
+ );
66
+ }
67
+
68
+ if (requestParameters['end_timestamp'] == null) {
69
+ throw new runtime.RequiredError(
70
+ 'end_timestamp',
71
+ 'Required parameter "end_timestamp" was null or undefined when calling upDownCandles().'
72
+ );
73
+ }
74
+
75
+ const queryParameters: any = {};
76
+
77
+ if (requestParameters['symbol'] != null) {
78
+ queryParameters['symbol'] = requestParameters['symbol'];
79
+ }
80
+
81
+ if (requestParameters['duration'] != null) {
82
+ queryParameters['duration'] = requestParameters['duration'];
83
+ }
84
+
85
+ if (requestParameters['resolution'] != null) {
86
+ queryParameters['resolution'] = requestParameters['resolution'];
87
+ }
88
+
89
+ if (requestParameters['start_timestamp'] != null) {
90
+ queryParameters['start_timestamp'] = requestParameters['start_timestamp'];
91
+ }
92
+
93
+ if (requestParameters['end_timestamp'] != null) {
94
+ queryParameters['end_timestamp'] = requestParameters['end_timestamp'];
95
+ }
96
+
97
+ if (requestParameters['limit'] != null) {
98
+ queryParameters['limit'] = requestParameters['limit'];
99
+ }
100
+
101
+ const headerParameters: runtime.HTTPHeaders = {};
102
+
103
+ const response = await this.request({
104
+ path: `/api/v1/upDownCandles`,
105
+ method: 'GET',
106
+ headers: headerParameters,
107
+ query: queryParameters,
108
+ }, initOverrides);
109
+
110
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespGetUpDownCandlesFromJSON(jsonValue));
111
+ }
112
+
113
+ /**
114
+ * Get the OHLC candles (1s = the exact price observations, or 30s) of an up/down market series (symbol + duration, e.g. btc/5m) in a bounded time range (at most 24h), oldest first. Pass next_cursor as start_timestamp to page forward; live candles are on the up_down_candle/<symbol>/<duration>/<resolution> websocket channel.
115
+ * upDownCandles
116
+ */
117
+ async upDownCandles(requestParameters: UpDownCandlesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespGetUpDownCandles> {
118
+ const response = await this.upDownCandlesRaw(requestParameters, initOverrides);
119
+ return await response.value();
120
+ }
121
+
122
+ }
123
+
124
+ /**
125
+ * @export
126
+ */
127
+ export const UpDownCandlesResolutionEnum = {
128
+ _1s: '1s',
129
+ _30s: '30s'
130
+ } as const;
131
+ export type UpDownCandlesResolutionEnum = typeof UpDownCandlesResolutionEnum[keyof typeof UpDownCandlesResolutionEnum];
package/apis/index.ts CHANGED
@@ -26,3 +26,4 @@ export * from './StockfinancialsApi';
26
26
  export * from './TokenlistApi';
27
27
  export * from './TransactionApi';
28
28
  export * from './TvApi';
29
+ export * from './UpdownApi';
@@ -42,7 +42,7 @@ export interface AccountBinaryOptionsPosition {
42
42
  * @type {number}
43
43
  * @memberof AccountBinaryOptionsPosition
44
44
  */
45
- sign: number;
45
+ sign: AccountBinaryOptionsPositionSignEnum;
46
46
  /**
47
47
  * magnitude only; combine with sign
48
48
  * @type {string}
@@ -51,6 +51,17 @@ export interface AccountBinaryOptionsPosition {
51
51
  size: string;
52
52
  }
53
53
 
54
+
55
+ /**
56
+ * @export
57
+ */
58
+ export const AccountBinaryOptionsPositionSignEnum = {
59
+ No: -1,
60
+ Yes: 1
61
+ } as const;
62
+ export type AccountBinaryOptionsPositionSignEnum = typeof AccountBinaryOptionsPositionSignEnum[keyof typeof AccountBinaryOptionsPositionSignEnum];
63
+
64
+
54
65
  /**
55
66
  * Check if a given object implements the AccountBinaryOptionsPosition interface.
56
67
  */
@@ -60,7 +60,7 @@ export interface AccountPosition {
60
60
  * @type {number}
61
61
  * @memberof AccountPosition
62
62
  */
63
- sign: number;
63
+ sign: AccountPositionSignEnum;
64
64
  /**
65
65
  *
66
66
  * @type {string}
@@ -130,6 +130,15 @@ export interface AccountPosition {
130
130
  }
131
131
 
132
132
 
133
+ /**
134
+ * @export
135
+ */
136
+ export const AccountPositionSignEnum = {
137
+ Short: -1,
138
+ Long: 1
139
+ } as const;
140
+ export type AccountPositionSignEnum = typeof AccountPositionSignEnum[keyof typeof AccountPositionSignEnum];
141
+
133
142
  /**
134
143
  * @export
135
144
  */
@@ -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
+
@@ -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,115 @@
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 ReqGetUpDownCandles
20
+ */
21
+ export interface ReqGetUpDownCandles {
22
+ /**
23
+ * market series: underlying (case-insensitive) ...
24
+ * @type {string}
25
+ * @memberof ReqGetUpDownCandles
26
+ */
27
+ symbol: string;
28
+ /**
29
+ * ... and market duration, e.g. 30s or 5m
30
+ * @type {string}
31
+ * @memberof ReqGetUpDownCandles
32
+ */
33
+ duration: string;
34
+ /**
35
+ * 1s candles are the observations themselves
36
+ * @type {string}
37
+ * @memberof ReqGetUpDownCandles
38
+ */
39
+ resolution?: ReqGetUpDownCandlesResolutionEnum;
40
+ /**
41
+ * inclusive bucket start, seconds
42
+ * @type {number}
43
+ * @memberof ReqGetUpDownCandles
44
+ */
45
+ start_timestamp: number;
46
+ /**
47
+ * inclusive, seconds; at most 24h after start_timestamp
48
+ * @type {number}
49
+ * @memberof ReqGetUpDownCandles
50
+ */
51
+ end_timestamp: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof ReqGetUpDownCandles
56
+ */
57
+ limit?: number;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const ReqGetUpDownCandlesResolutionEnum = {
65
+ _1s: '1s',
66
+ _30s: '30s'
67
+ } as const;
68
+ export type ReqGetUpDownCandlesResolutionEnum = typeof ReqGetUpDownCandlesResolutionEnum[keyof typeof ReqGetUpDownCandlesResolutionEnum];
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the ReqGetUpDownCandles interface.
73
+ */
74
+ export function instanceOfReqGetUpDownCandles(value: object): value is ReqGetUpDownCandles {
75
+ if (!('symbol' in value) || value['symbol'] === undefined) return false;
76
+ if (!('duration' in value) || value['duration'] === 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
+ return true;
80
+ }
81
+
82
+ export function ReqGetUpDownCandlesFromJSON(json: any): ReqGetUpDownCandles {
83
+ return ReqGetUpDownCandlesFromJSONTyped(json, false);
84
+ }
85
+
86
+ export function ReqGetUpDownCandlesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetUpDownCandles {
87
+ if (json == null) {
88
+ return json;
89
+ }
90
+ return {
91
+
92
+ 'symbol': json['symbol'],
93
+ 'duration': json['duration'],
94
+ 'resolution': json['resolution'] == null ? undefined : json['resolution'],
95
+ 'start_timestamp': json['start_timestamp'],
96
+ 'end_timestamp': json['end_timestamp'],
97
+ 'limit': json['limit'] == null ? undefined : json['limit'],
98
+ };
99
+ }
100
+
101
+ export function ReqGetUpDownCandlesToJSON(value?: ReqGetUpDownCandles | null): any {
102
+ if (value == null) {
103
+ return value;
104
+ }
105
+ return {
106
+
107
+ 'symbol': value['symbol'],
108
+ 'duration': value['duration'],
109
+ 'resolution': value['resolution'],
110
+ 'start_timestamp': value['start_timestamp'],
111
+ 'end_timestamp': value['end_timestamp'],
112
+ 'limit': value['limit'],
113
+ };
114
+ }
115
+