UNPKG

kucoin-universal-sdk

Version:
134 lines (133 loc) 3.32 kB
import { Serializable } from '../../../internal/interfaces/serializable'; export declare class GetKlinesReq implements Serializable { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** * Type of candlestick patterns (minutes) */ granularity?: GetKlinesReq.GranularityEnum; /** * Start time (milliseconds) */ from?: number; /** * End time (milliseconds) */ to?: number; /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor(); /** * Creates a new instance of the `GetKlinesReq` class. * The builder pattern allows step-by-step construction of a `GetKlinesReq` object. */ static builder(): GetKlinesReqBuilder; /** * Creates a new instance of the `GetKlinesReq` class with the given data. */ static create(data: { /** * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** * Type of candlestick patterns (minutes) */ granularity?: GetKlinesReq.GranularityEnum; /** * Start time (milliseconds) */ from?: number; /** * End time (milliseconds) */ to?: number; }): GetKlinesReq; /** * Convert the object to a JSON string. */ toJson(): string; /** * Create an object from a JSON string. */ static fromJson(input: string): GetKlinesReq; /** * Create an object from Js Object. */ static fromObject(jsonObject: Object): GetKlinesReq; } export declare namespace GetKlinesReq { enum GranularityEnum { /** * 1min */ _1, /** * 5min */ _5, /** * 15min */ _15, /** * 30min */ _30, /** * 1hour */ _60, /** * 2hour */ _120, /** * 4hour */ _240, /** * 8hour */ _480, /** * 12hour */ _720, /** * 1day */ _1440, /** * 1week */ _10080 } } export declare class GetKlinesReqBuilder { readonly obj: GetKlinesReq; constructor(obj: GetKlinesReq); /** * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetKlinesReqBuilder; /** * Type of candlestick patterns (minutes) */ setGranularity(value: GetKlinesReq.GranularityEnum): GetKlinesReqBuilder; /** * Start time (milliseconds) */ setFrom(value: number): GetKlinesReqBuilder; /** * End time (milliseconds) */ setTo(value: number): GetKlinesReqBuilder; /** * Get the final object. */ build(): GetKlinesReq; }