Lean  $LEAN_TAG$
QuantConnect.Notifications.NotificationManager Class Reference

Local/desktop implementation of messaging system for Lean Engine. More...

Public Member Functions

 NotificationManager (bool liveMode)
 Initialize the messaging system More...
 
bool Email (string address, string subject, string message, string data, PyObject headers)
 Send an email to the address specified for live trading notifications. More...
 
bool Email (string address, string subject, string message, string data="", Dictionary< string, string > headers=null)
 Send an email to the address specified for live trading notifications. More...
 
bool Sms (string phoneNumber, string message)
 Send an SMS to the phone number specified More...
 
bool Web (string address, object data, PyObject headers)
 Place REST POST call to the specified address with the specified DATA. Python overload for Headers parameter. More...
 
bool Web (string address, object data=null, Dictionary< string, string > headers=null)
 Place REST POST call to the specified address with the specified DATA. More...
 
bool Telegram (string id, string message, string token=null)
 Send a telegram message to the chat ID specified, supply token for custom bot. Note: Requires bot to have chat with user or be in the group specified by ID. More...
 

Properties

ConcurrentQueue< NotificationMessages [get, set]
 Public access to the messages More...
 

Detailed Description

Local/desktop implementation of messaging system for Lean Engine.

Definition at line 26 of file NotificationManager.cs.

Constructor & Destructor Documentation

◆ NotificationManager()

QuantConnect.Notifications.NotificationManager.NotificationManager ( bool  liveMode)

Initialize the messaging system

Definition at line 44 of file NotificationManager.cs.

Member Function Documentation

◆ Email() [1/2]

bool QuantConnect.Notifications.NotificationManager.Email ( string  address,
string  subject,
string  message,
string  data,
PyObject  headers 
)

Send an email to the address specified for live trading notifications.

Parameters
subjectSubject of the email
messageMessage body, up to 10kb
dataData attachment (optional)
addressEmail address to send to
headersOptional email headers to use

Definition at line 62 of file NotificationManager.cs.

◆ Email() [2/2]

bool QuantConnect.Notifications.NotificationManager.Email ( string  address,
string  subject,
string  message,
string  data = "",
Dictionary< string, string >  headers = null 
)

Send an email to the address specified for live trading notifications.

Parameters
subjectSubject of the email
messageMessage body, up to 10kb
dataData attachment (optional)
addressEmail address to send to
headersOptional email headers to use

Definition at line 75 of file NotificationManager.cs.

◆ Sms()

bool QuantConnect.Notifications.NotificationManager.Sms ( string  phoneNumber,
string  message 
)

Send an SMS to the phone number specified

Parameters
phoneNumberPhone number to send to
messageMessage to send

Definition at line 93 of file NotificationManager.cs.

◆ Web() [1/2]

bool QuantConnect.Notifications.NotificationManager.Web ( string  address,
object  data,
PyObject  headers 
)

Place REST POST call to the specified address with the specified DATA. Python overload for Headers parameter.

Parameters
addressEndpoint address
dataData to send in body JSON encoded
headersOptional headers to use

Definition at line 113 of file NotificationManager.cs.

◆ Web() [2/2]

bool QuantConnect.Notifications.NotificationManager.Web ( string  address,
object  data = null,
Dictionary< string, string >  headers = null 
)

Place REST POST call to the specified address with the specified DATA.

Parameters
addressEndpoint address
dataData to send in body JSON encoded (optional)
headersOptional headers to use

Definition at line 124 of file NotificationManager.cs.

◆ Telegram()

bool QuantConnect.Notifications.NotificationManager.Telegram ( string  id,
string  message,
string  token = null 
)

Send a telegram message to the chat ID specified, supply token for custom bot. Note: Requires bot to have chat with user or be in the group specified by ID.

Parameters
userChat or group ID to send message to
messageMessage to send
tokenBot token to use for this message

Definition at line 144 of file NotificationManager.cs.

Property Documentation

◆ Messages

ConcurrentQueue<Notification> QuantConnect.Notifications.NotificationManager.Messages
getset

Public access to the messages

Definition at line 39 of file NotificationManager.cs.


The documentation for this class was generated from the following file: