Reporter

The reporter class is globally linked to the blankly module import. The class is generally used to show the headers that are available to the user when they have deployed their model. There are also valid implementations of some functions that they also run locally.

Functions

export_live_var(var: Any, name: str, description: str = None)

Create a variable that can be read and updated externally. You can fetch any updated value by using the update_live_var() function.

Arguments

ArgDescriptionExamplesType
varAny variablersi_minAny - recommended int, float, or str
nameAn identifier for the live variable"RSI Min"str
descriptionAn optional longer description to show what the variable is used for"Used to specify at what RSI level the bot should buy"str

update_live_var(var)

Read an exported live variable.

Arguments

ArgDescriptionExamplesType
varThe same variable reference used to export the live varrsi_minAny - recommended int, float, or str

Response

DescriptionExamplesType
The updated live variable. This will always be the same value that was exported unless an update occurred.3 or 2.53Any

text(message_str: str)

Send a text message with a given string input. This requires valid SMTP & text information in notify.json.

Arguments

ArgDescriptionExamplesType
message_strThe message to text to the phone number in the notify.json.'Top Buys this hour: BTC-USD'str

email(email_str: str, override_receiver: str = None)

Send an email with a given email_str input based on notify.json. The receiver can also be overridden directly using override_receiver.

Arguments

ArgDescriptionExamplesType
email_strThe email to send to the receiver specified in notify.json.'Top Buys this hour: BTC-USD'str
override_receiverManually override the receiver email used in notify.json. This is added because text messages'newEmail@gmail.com'str