@exchange-connect/coinex
Version:
Coinex ( https://www.coinex.com ) SDK
45 lines (44 loc) • 1.45 kB
TypeScript
/**
* Subscribe to Market Depth Realtime Data
* @async
* @function subscribe
* @memberof Streams.futures.depth
* @param {Array<Object>|Object} markets Market(s) Name ( Would subscribe on one or multi market(s) depending on the parameter)
* @param {function} onData On Data Incomming Callback
*/
export declare function futuresDepthSubscribe(markets: {
market: string;
limit: string;
interval: string;
diff: string;
}[] | {
market: string;
limit: string;
interval: string;
diff: string;
}, onData: () => any): void;
/**
* Unsubscribe from Market Depth Realtime Data
* @async
* @function unsubscribe
* @memberof Streams.futures.depth
*/
export declare function futuresDepthUnsubscribe(): void;
/**
* Unsubscribe from Multi-Market Depth Realtime Data
* @async
* @function unsubscribeMulti
* @memberof Streams.futures.depth
*/
export declare function futuresDepthUnsubscribeMulti(): void;
/**
* Query the Market Depth' Data on specific market
* @async
* @function query
* @memberof Streams.futures.depth
* @param {String} market Market name
* @param {5|10|20|50|100} limit Number of records obtained
* @param {"10"|"1"|"0"|"0.1"|"0.01"} interval Market depth aggregation level
* @returns {Promise<Object>} Promise object represents the result of the request
*/
export declare function query(market: string, limit: 5 | 10 | 20 | 50 | 100, interval: "0.01" | "0.1" | "0" | "1" | "10"): Promise<any>;