UNPKG

jcc_rpc

Version:
72 lines (71 loc) 1.83 kB
import JcBase from "./base"; /** * creation example: * * 1: `new JcInfo(["http://localhost:8080", "https://localhost:8090"])` * * 2: `new JcInfo(["localhost"], 8080, false)` * * @export * @class JcInfo * @extends {JcBase} */ export default class JcInfo extends JcBase { constructor(...args: any[]); /** * request ticker info * * @param {string} base * @param {string} counter * @returns {Promise<IResponse>} * @memberof JcInfo */ getTicker(base: string, counter: string): Promise<IResponse>; /** * request all tickers info * * @returns {Promise<IResponse>} * @memberof JcInfo */ getAllTickers(): Promise<IResponse>; /** * request order depth * * @param {string} base * @param {string} counter * @param {string} type * @returns {Promise<IResponse>} * @memberof JcInfo */ getDepth(base: string, counter: string, type: string): Promise<IResponse>; /** * request kline data * * @param {string} base * @param {string} counter * @param {string} type * @returns {Promise<IResponse>} * @memberof JcInfo */ getKline(base: string, counter: string, type: string): Promise<IResponse>; /** * request history * * @param {string} base * @param {string} counter * @param {string} type * @param {string} time * @returns {Promise<IResponse>} * @memberof JcInfo */ getHistory(base: string, counter: string, type: string, time: string): Promise<IResponse>; /** * request ticker from cmc * * @param {string} token * @param {string} currency * @returns {Promise<IResponse>} * @memberof JcInfo */ getTickerFromCMC(token: string, currency: string): Promise<IResponse>; }