kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
87 lines (86 loc) • 3.61 kB
TypeScript
import { MarginModeEventCallback } from './model_margin_mode_event';
import { BalanceEventCallback } from './model_balance_event';
import { PositionEventCallback } from './model_position_event';
import { StopOrdersEventCallback } from './model_stop_orders_event';
import { CrossLeverageEventCallback } from './model_cross_leverage_event';
import { AllPositionEventCallback } from './model_all_position_event';
import { OrderEventCallback } from './model_order_event';
import { AllOrderEventCallback } from './model_all_order_event';
import { WebSocketService } from '../../../internal/interfaces/websocket';
export interface FuturesPrivateWS {
/**
* allOrder All Order change pushes.
* Push order changes for all symbol
* push frequency: real-time
*/
allOrder(callback: AllOrderEventCallback): Promise<string>;
/**
* allPosition All symbol position change events push
* Subscribe to this topic to get real-time pushes on all symbols’ position change events
* push frequency: real-time
*/
allPosition(callback: AllPositionEventCallback): Promise<string>;
/**
* balance the balance change push
* Subscribe to this topic to get real-time balance change pushes
* push frequency: real-time
*/
balance(callback: BalanceEventCallback): Promise<string>;
/**
* crossLeverage the leverage change push
* Subscribe to this topic to get real-time pushes on leverage changes of contracts that are in cross margin mode
* push frequency: real-time
*/
crossLeverage(callback: CrossLeverageEventCallback): Promise<string>;
/**
* marginMode the margin mode change
* Subscribe to this topic to get real-time pushes on symbols’ margin mode change events
* push frequency: real-time
*/
marginMode(callback: MarginModeEventCallback): Promise<string>;
/**
* order Order change pushes.
* Push order changes for the specified symbol
* push frequency: real-time
*/
order(symbol: string, callback: OrderEventCallback): Promise<string>;
/**
* position the position change events push
* Subscribe this topic to get real-time pushes on symbols’ position change events
* push frequency: real-time
*/
position(symbol: string, callback: PositionEventCallback): Promise<string>;
/**
* stopOrders stop order change pushes.
* Subscribe to this topic to get real-time pushes on stop order changes.
* push frequency: real-time
*/
stopOrders(callback: StopOrdersEventCallback): Promise<string>;
/**
* Unsubscribe from topics
*/
unSubscribe(id: string): Promise<void>;
/**
* Start websocket
*/
start(): Promise<void>;
/**
* Stop websocket
*/
stop(): Promise<void>;
}
export declare class FuturesPrivateWSImpl implements FuturesPrivateWS {
private wsService;
constructor(wsService: WebSocketService);
allOrder(callback: AllOrderEventCallback): Promise<string>;
allPosition(callback: AllPositionEventCallback): Promise<string>;
balance(callback: BalanceEventCallback): Promise<string>;
crossLeverage(callback: CrossLeverageEventCallback): Promise<string>;
marginMode(callback: MarginModeEventCallback): Promise<string>;
order(symbol: string, callback: OrderEventCallback): Promise<string>;
position(symbol: string, callback: PositionEventCallback): Promise<string>;
stopOrders(callback: StopOrdersEventCallback): Promise<string>;
unSubscribe(id: string): Promise<void>;
start(): Promise<void>;
stop(): Promise<void>;
}