kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
39 lines (38 loc) • 1.68 kB
TypeScript
import { CrossMarginPositionEventCallback } from './model_cross_margin_position_event';
import { IsolatedMarginPositionEventCallback } from './model_isolated_margin_position_event';
import { WebSocketService } from '../../../internal/interfaces/websocket';
export interface MarginPrivateWS {
/**
* crossMarginPosition Get Cross Margin Position change
* The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability.
* push frequency: once every 4s
*/
crossMarginPosition(callback: CrossMarginPositionEventCallback): Promise<string>;
/**
* isolatedMarginPosition Get Isolated Margin Position change
* The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability.
* push frequency: real time
*/
isolatedMarginPosition(symbol: string, callback: IsolatedMarginPositionEventCallback): Promise<string>;
/**
* Unsubscribe from topics
*/
unSubscribe(id: string): Promise<void>;
/**
* Start websocket
*/
start(): Promise<void>;
/**
* Stop websocket
*/
stop(): Promise<void>;
}
export declare class MarginPrivateWSImpl implements MarginPrivateWS {
private wsService;
constructor(wsService: WebSocketService);
crossMarginPosition(callback: CrossMarginPositionEventCallback): Promise<string>;
isolatedMarginPosition(symbol: string, callback: IsolatedMarginPositionEventCallback): Promise<string>;
unSubscribe(id: string): Promise<void>;
start(): Promise<void>;
stop(): Promise<void>;
}