doc: add notify api example

This commit is contained in:
c9s 2022-07-04 20:08:06 +08:00
parent fc8df941d0
commit 941e1bfb0c
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -403,6 +403,14 @@ bbgo.Notify(object, object2, object3)
Note that, if you're using the third format, simple arguments (float, bool, string... etc) will be used for calling the
fmt.Sprintf, and the extra arguments will be rendered as attachments.
For example:
```go
bbgo.Notify("%s found support price: %f", "BTCUSDT", 19000.0, kline)
```
The above call will render the first format string with the given float number 19000, and then attach the kline object as the attachment.
## Handling Trades and Profit
## Persistence