From 09814d93d1cc44ee5bd05b8f8d85e74495f0afc3 Mon Sep 17 00:00:00 2001 From: dmoss18 Date: Mon, 14 Nov 2022 13:53:33 -0600 Subject: [PATCH] Use CONNECT when subscribing accounts --- account-streamer/account-streamer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account-streamer/account-streamer.ts b/account-streamer/account-streamer.ts index 67fb89e..2b0d34b 100644 --- a/account-streamer/account-streamer.ts +++ b/account-streamer/account-streamer.ts @@ -11,7 +11,7 @@ export enum STREAMER_STATE { enum MessageAction { ACCOUNT_SUBSCRIBE = 'account-subscribe', - CONNECT = 'connect', // Send this instead of `account-subscribe` for CAWS V2 + CONNECT = 'connect', // Send this instead of `account-subscribe` HEARTBEAT = 'heartbeat', PUBLIC_WATCHLISTS_SUBSCRIBE = 'public-watchlists-subscribe', QUOTE_ALERTS_SUBSCRIBE = 'quote-alerts-subscribe', @@ -244,7 +244,7 @@ export class AccountStreamer { const value: JsonValue = accountNumbers.length > 1 ? accountNumbers : accountNumbers[0] - const requestId = this.subscribeTo(MessageAction.ACCOUNT_SUBSCRIBE, value) + const requestId = this.subscribeTo(MessageAction.CONNECT, value) return new Promise((resolve, reject) => { this.requestPromises.set(requestId, [resolve, reject])