ALERT function spotlight
This document explains the syntax and various usage patterns of Vektor's powerful
ALERT function. For a shorter summary with examples you could read our launch announcement here.
CALLfunction in the app to learn more.
ALERT function allows you to create an alert based on any arbitrary conditional statement that you write using VXL. It's a powerful way of setting up alert notifications with unlimited flexibility, since any conditional statement you can articulate using VXL can become the trigger for your alert. Vektor continuously evalutes the trigger condition, and sends you an email notification when that trigger becomes true.
You can use
ALERT (without subfunctions) or
ALERT.NEW to set up a new conditional alert. Other subfunctions are used to manage the alerts you create.
||Create a new alert|
||Get a list of alerts|
||Get an alert by its
||Cancel one or more alerts|
ALERT(...) Syntax and Examples
ALERT to set up a new alert that will notify you when a condition is met. The only required parameter is a conditional expression; this is something that must evaluate to either
FALSE. You can optionally also provide a
NAME for your alert using the
Once created, Vektor will continue to evaluate the condition and, if and when it moves from
TRUE, will send an email notification like the below to the email associated with your user account.
Alert me when the price of ETH falls below $1000:
You can use logical functions like
OR(...) to make more complicated conditions:
Alert me when the price of ETH exits the range $1200-$1400:
NAME option to give your alert a name. This will appear in the
ALERT.LIST table and in emails.
Alert me when staked ETH (stETH) resumes a close peg with ETH, and call it "STETH RE-PEGGED":
Alert me when Tether's (USDT) price diverges from USDC:
Alert me when Ethereum's block number reaches 15 million:
Alert me when Vektor adds a new Venue or Blockchain:
Alert me when the best supply APY for ETH on any chain is higher than 5%:
Alert me when I can borrow USDT or USDC for less than 2% (but not on Fantom):
Alert me when Aave v2 is no longer the best place to supply USDC on Ethereum:
Alert me when Arbitrum is no longer the best chain to earn yield on my WBTC:
Alert me when my total sum of balances is more than $100,000:
Alert me when the USDT I bridged from Optimism to Arbitrum arrives safely:
Alert me when all my Vektor alerts have triggered!
ALERT.LIST(...) Syntax and Examples
You can use
ALERT.LIST to see a list of all the alerts you created.
By default the list shows only
RUNNING alerts. When the alerts are triggered, the notification will be delivered and the alert will disappear from the list. You can override this behaviour and set
INCLUDE_TRIGGERED=TRUE to include triggered/delivered alerts.
Show me a list of my running alerts (with sample output).
Show me a list of my alerts, including running and delivered (with sample output).
ALERT.GET(...) Syntax and Examples
When you create an alert, it is assigned a unique 4-character alphanumeric
7078). You can use this
id to refer to the alert itself, in order to access other functionality. One example is the
ALERT.GET function that can be used to extract specific information about the alert.
To see a list of alerts and their
id's, you can use the
ALERT.LIST function covered in the previous section.
ALERT.GETfunction in quotation marks e.g.
Get information about a running alert (with sample output).
Get information about two different alerts at once (with sample output).
Extract the current
STATE from an alert.
ALERT.GET("B0DC").STATEto do the same thing.
Use the state of an existing alert in a new alert!
ALERT.CANCEL(...) Syntax and Examples
To cancel an alert and remove it from the list, use the
You can cancel an individual alert by providing it's
id, or you can also cancel a batch of alerts by providing a list of alert
ids or a list of alert objects.
RUNNINGstate. Any alerts that have been
DELIVEREDare already considered cancelled.
Cancel a specific alert (with sample output)
Cancel a list of alerts, specified by a list of
ids (using square brackets).
Cancel all existing alerts, by passing a list of alert objects.
Email: [email protected]
CALL function in Vektor