Events
Events are triggers which happen within Coinolio that can be connected to plugins to perform actions.
Plugin required
To have events work you will first need to setup at least one plugin.
Event types
Name | Description | Type | Config Options |
---|---|---|---|
Trade | This is triggered when a new trade is found - a new trade can be a buy or sell. | trade | |
Summary | A summary is a scheduled event which will send out a summary of your holdings at the specified interval. | summary | { "schedule": <regex>, "interval": <minutes>, "duration": <hours> } |
Creating events
##Â Trade
Send a new request to the Create event endpoint. Below is an example request body.
{
"title": "New Trade",
"type": "event",
"enabled": true,
"plugins": 1 // The ID for the plugin you would like to use
}
##Â Summary
Send a new request to the Create event endpoint with your chosen summary config. Below are some example summary configurations.
{
"title": "Hourly Summary",
"type": "summary",
"enabled": true,
"plugins": 1, // The ID for the plugin you would like to use
"config": {
"schedule":"59 */1 * * *", // Send out on the 59th minute of every hour
"interval": 60, // The time bucket for the summary to analyse
"duration": 2 // Must be over the duration of interval
}
}
{
"title": "Daily Summary",
"type": "summary",
"enabled": true,
"plugins": 1, // The ID for the plugin you would like to use
"config": {
"schedule":"0 22 */1 * *", // Send out on at 22:00 every day
"interval": 1440, // The time bucket for the summary to analyse
"duration": 48 // Must be over the duration of interval
}
}
Updated almost 7 years ago