Skip to content

Interface: WsStoredState<TWSTopicSubscribeEvent extends string | object> ​

Type Parameters ​

Type Parameter
TWSTopicSubscribeEvent extends string | object

Properties ​

PropertyTypeDescription
activePingTimer?TimeoutA timer that will send an upstream heartbeat (ping) when it expires
activePongTimer?TimeoutA timer tracking that an upstream heartbeat was sent, expecting a reply before it expires
activeReconnectTimer?TimeoutIf a reconnection is in progress, this will have the timer for the delayed reconnect
connectionState?WsConnectionStateEnumThe current lifecycle state of the connection (enum)
connectionStateChangedAt?Date-
deferredPromiseStoreRecord<string, DeferredPromise>When a connection attempt is in progress (even for reconnect), a promise is stored here. This promise will resolve once connected (and will then get removed);
didAuthWSAPI?booleanWhether this connection has completed authentication before for the Websocket API, so it k nows to automatically reauth if reconnected
isAuthenticated?booleanWhether this connection has completed authentication (only applies to private connections)
subscribedTopicsSet<TWSTopicSubscribeEvent>All the topics we are expected to be subscribed to on this connection (and we automatically resubscribe to if the connection drops) A "Set" and a deep-object-match are used to ensure we only subscribe to a topic once (tracking a list of unique topics we're expected to be connected to)
ws?WebSocketThe currently active websocket connection
WSAPIAuthChannel?stringTo reauthenticate on the WS API, which channel do we send to?

Built by Siebly. Open source SDKs for exchange APIs.