UNPKG

bitget-api

Version:

Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.

17 lines (16 loc) 1.18 kB
import { MarginType } from '../types/request/shared.js'; import { WSAPIResponse } from '../types/websockets/ws-api.js'; import { WsAccountSnapshotUMCBL, WSPositionSnapshotUMCBL, WsSnapshotAccountEvent, WsSnapshotPositionsEvent } from '../types/websockets/ws-events.js'; /** TypeGuard: event is an account update (balance) */ export declare function isWsAccountSnapshotEvent(event: unknown): event is WsSnapshotAccountEvent; /** TypeGuard: event is a positions update */ export declare function isWsPositionsSnapshotEvent(event: unknown): event is WsSnapshotPositionsEvent; /** TypeGuard: event is a UMCBL account update (balance) */ export declare function isWsFuturesAccountSnapshotEvent(event: unknown): event is WsAccountSnapshotUMCBL; /** TypeGuard: event is a UMCBL positions update */ export declare function isWsFuturesPositionsSnapshotEvent(event: unknown): event is WSPositionSnapshotUMCBL; /** * Simple guard for non-TypeScript users, throw a runtime error if value doesn't match type */ export declare function assertMarginType(marginType: string): marginType is MarginType; export declare function isWSAPIResponse(msg: unknown): msg is Omit<WSAPIResponse, 'wsKey'>;