Risk-triggers
The risk factors and metrics
You may use following methods to receive the historical data for the particular metric or sing for notifications.
Get history for risk-factor by strategy
Get history for risk-factor.
GET
https://api.web3watcher.fi/v1/strategies/history/{strategy_id}/{track_deFi}/{risk_factor}
The method returns the historical data for the particular metric / defi / strategy.
Request Body
strategy_id*
string
The id of the strategy
offset
int
the number of historical rows
pagination
int
num of page
track_deFi*
[string]
the name of deFi to track metrics
risk_factor*
string
the factor name to get historical values
{
"status":"200",
"message":"Success",
"result": {
"strategy_name":"lido_curve",
"strategy_id":"389201",
"strategy_category":"liqSt_dex",
"risk_factor_history":[
{
"deFi_name": "curve",
"factor_name": "f_whales",
"factor_score": 90,
"freshness_date": "2023-10-25 17:25:35:0000",
"factor_score_change": -2,
},
{
"deFi_name": "curve",
"factor_name": "f_whales",
"factor_score": 92,
"freshness_date": "2023-10-25 17:20:35:0000",
"factor_score_change": 0,
},
{
"deFi_name": "curve",
"factor_name": "f_whales",
"factor_score": 92,
"freshness_date": "2023-10-25 17:15:35:0000",
"factor_score_change": -2,
},
},
"offset": 3,
"pagination": 1,
}
Sing-in for notifications
Get strategies for a token.
POST
https://api.web3watcher.fi/v1/notifications/{strategy_id}/{track_deFi}/{risk_factor}
The method returns the list of strategies for your token.
Request Body
strategy_id*
string
The id of the strategy
track_deFi*
[string]
the name of deFi to track metrics
risk_factor*
string
the factor name to get historical values
threshold_percent
float
The threshold for the metric delta for the notification. You may leave empty for the default settings.
messenger*
string
tg / slack / discord / phone
messenger_target*
string
tg, slack, discord account or phone number
threshold_value
String
The threshold for the metric delta for the notification. You may leave empty for the default settings.
{
"status":"200",
"message":"Success",
"result": {
"strategy_id":"389201",
"track_deFi": "curve",
"risk_factor": "f_reward_liquiduty",
"threshold_percent": 0.1,
"messenger": "tg",
"messenger_target": "user_name",
},
}
Last updated