@huangapple/okx-api
Version:
Complete & robust Node.js SDK for OKX's REST APIs and WebSockets, with TypeScript & end-to-end tests.
22 lines (21 loc) • 499 B
TypeScript
import { WsChannel } from './request';
export interface WsEvent {
event: 'error' | 'login' | 'subscribe' | 'unsubscribe';
code?: string;
msg?: string;
arg?: any;
data?: any;
}
export interface WsDataEvent {
arg: {
channel: WsChannel;
uid?: string;
instId?: string;
instFamily?: string;
};
data: any;
}
export interface WsLoginEvent extends WsEvent {
event: 'login';
}
export declare type WsResponse = WsEvent;