Ask or search…
K

Customizing Trade Notifications

The default message predefined on Hal might be a bit generic and sometimes less optimal to the information you might want to receive. For this, we've included a short guide with a few additional options that can add a bit more context to the message itself.
For additional help customizing notifications on your strategy, community support is available in the Carbon DeFi telegram.

Specific text

In the message, you can always include plain text that will be part of the message. This text can be anything you'd like and can provide additional information (that is not dynamic) to the trigger.
For example, you can include a description to the strategy you follow.
To do this, just click on the message text box and add the text you would like.
This text will be part of every message so make sure it is unique and descriptive so it make sense.

Dynamic information

Hal allows advanced options that can expose more information that is available on-chain as part of the event data. Some of this information is easy to extract, while some might be a bit more complex.
If you feel comfortable with code, feel free to try and experiment with some of these options.

If / Then option

One feedback received is that the trigger fires on trades but also when the owner edits the strategy. For this, you can add a short IF/Then code to provide a bit more context to the reason of the message, for example:
{{ if eq .Contract.EventParameters.reason "1" }}
Strategy was successfully updated
{{ else }}
Strategy was traded against
{{ end }}
Last modified 1mo ago