kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
39 lines (38 loc) • 1.54 kB
TypeScript
import { IndexPriceEventCallback } from './model_index_price_event';
import { MarkPriceEventCallback } from './model_mark_price_event';
import { WebSocketService } from '../../../internal/interfaces/websocket';
export interface MarginPublicWS {
/**
* indexPrice Index Price
* Subscribe to this topic to get the index price for margin trading. The following ticker symbols are supported: List of currently supported symbols.
* push frequency: once every 1s
*/
indexPrice(symbol: Array<string>, callback: IndexPriceEventCallback): Promise<string>;
/**
* markPrice Mark Price
* Subscribe to this topic to get the mark price for margin trading. The following ticker symbols are supported: List of currently supported symbols
* push frequency: once every 1s
*/
markPrice(symbol: Array<string>, callback: MarkPriceEventCallback): Promise<string>;
/**
* Unsubscribe from topics
*/
unSubscribe(id: string): Promise<void>;
/**
* Start websocket
*/
start(): Promise<void>;
/**
* Stop websocket
*/
stop(): Promise<void>;
}
export declare class MarginPublicWSImpl implements MarginPublicWS {
private wsService;
constructor(wsService: WebSocketService);
indexPrice(symbol: Array<string>, callback: IndexPriceEventCallback): Promise<string>;
markPrice(symbol: Array<string>, callback: MarkPriceEventCallback): Promise<string>;
unSubscribe(id: string): Promise<void>;
start(): Promise<void>;
stop(): Promise<void>;
}