Skip to content

Commit

Permalink
Use CONNECT when subscribing accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoss18 committed Nov 14, 2022
1 parent 2f77634 commit 09814d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions account-streamer/account-streamer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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<string>((resolve, reject) => {
this.requestPromises.set(requestId, [resolve, reject])
Expand Down

0 comments on commit 09814d9

Please sign in to comment.