UNPKG

kucoin-universal-sdk

Version:
55 lines (54 loc) 2.06 kB
import { OrderV2EventCallback } from './model_order_v2_event'; import { StopOrderEventCallback } from './model_stop_order_event'; import { AccountEventCallback } from './model_account_event'; import { OrderV1EventCallback } from './model_order_v1_event'; import { WebSocketService } from '../../../internal/interfaces/websocket'; export interface SpotPrivateWS { /** * account Get Account Balance * You will receive this message when an account balance changes. The message contains the details of the change. * push frequency: real-time */ account(callback: AccountEventCallback): Promise<string>; /** * orderV1 Get Order(V1) * This topic will push all change events of your orders. * push frequency: real-time */ orderV1(callback: OrderV1EventCallback): Promise<string>; /** * orderV2 Get Order(V2) * This topic will push all change events of your orders. Compared with v1, v2 adds an Order Status: \&quot;new\&quot;, there is no difference in push speed * push frequency: real-time */ orderV2(callback: OrderV2EventCallback): Promise<string>; /** * stopOrder Get Stop Order * This topic will push all change events of your stop orders. * push frequency: real-time */ stopOrder(callback: StopOrderEventCallback): Promise<string>; /** * Unsubscribe from topics */ unSubscribe(id: string): Promise<void>; /** * Start websocket */ start(): Promise<void>; /** * Stop websocket */ stop(): Promise<void>; } export declare class SpotPrivateWSImpl implements SpotPrivateWS { private wsService; constructor(wsService: WebSocketService); account(callback: AccountEventCallback): Promise<string>; orderV1(callback: OrderV1EventCallback): Promise<string>; orderV2(callback: OrderV2EventCallback): Promise<string>; stopOrder(callback: StopOrderEventCallback): Promise<string>; unSubscribe(id: string): Promise<void>; start(): Promise<void>; stop(): Promise<void>; }