Alert

Alert data type description

An alert is an object sent to the account webhook. It corresponds to a significant variation in Metric values and is dispatched if a user has subscribed to the metric.

It contains the following fields:

NameTypeDescription

id

string

Id of the alert

chainId

string

Id of the chain

accountId

string

Id of the account

userId

string

Id of the user

userContext

string or null

context of the user

message

string

Simple message associated with the alert. it has been generated using fields you can find in the alert (fromPoint, toPoint, metric, ...) so if you want to change the format of the message, you can create your own alert message.

alertOutputs

Configuration of where the alerts were attempted to be sent.

subscriptionId

string

The id of the user's subscription related to this alert.

subscriptionThreshold

number

the subscription threshold related to this alert.

metric

Metric related to this alert.

block

Block

Object with number (block number) and timestamp (block timestamp) related to this alert.

fromPoint

Point

Object with value and timestamp. An alert is triggered when the metric value changes from one point to another. The fromPoint is the initial value and timestamp of the metric (metric variation corresponds to variation between fromPoint and toPoint).

toPoint

Point

Object with value and timestamp. Same as fromPoint but corresponds to metric point at current block.

metricDelta

number

Metric value delta between fromPoint and toPoint. (for instance if a metric goes from 10 to 7, metric delta will be -3)

metricPercentVariation

number

Variation between fromPoint and toPoint in %. For instance if metric value goes from 10 to 7, it will be -30%.

Last updated