Skip to content

Commit

Permalink
Add notify section
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Jul 27, 2021
1 parent 141d162 commit 361fb2c
Showing 1 changed file with 44 additions and 12 deletions.
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,62 @@ For sell orders with static stoploss
./crypto -pair=BTC/USDT -price=9400 -amount=0.1
```

Use telegram for notifications.

## Notifications

- Telegram.
```sh
./crypto -pair=BTC/USDT -percent=3 -interval=60 -telegram.chat=<user-id>
```
> For get user id, talk o the [userinfobot](https://t.me/userinfobot)
![Crypto bot Telegram](https://raw.githubusercontent.com/giansalex/crypto-com-trailing-stop-loss/master/doc/crypto-com-telegram-bot.png)

> For get user id, talk to the [userinfobot](https://t.me/userinfobot)

- Mailing.
```sh
./crypto -pair=BTC/USDT -percent=3 \
-mail.host="smtp.example.com" \
-mail.port=587 \
-mail.user="[email protected]" \
-mail.pass="xxxx" \
-mail.from="[email protected]" \
-mail.to="[email protected]"
```

> You can notify both: telegram, mail.

List available parameters
```sh
-type string
order type: SELL or BUY (default: SELL)
-pair string
market pair, example: MCO/USDT
-amount float
(optional) amount to order (sell or buy) on stoploss
-interval int
interval in seconds to update price, example: 30 (30 sec.) (default 30)
-price float
price (for static stoploss)
-mail.from string
(optional) email sender
-mail.host string
(optional) SMTP Host
-mail.pass string
(optional) SMTP Password
-mail.port int
(optional) SMTP Port (default 587)
-mail.to string
(optional) email receptor
-mail.user string
(optional) SMTP User
-pair string
market pair, example: MCO/USDT
-percent float
percent (for trailing stoploss), example: 3.0 (3%)
-amount float
(optional) amount to order (sell or buy) on stoploss, default all balance
percent (for trailing stop loss), example: 3.0 (3%)
-price float
price (for static stop loss), example: 9200.00 (BTC price)
-stop-change
Notify on stoploss change (default: false)
-telegram.chat int
(optional) telegram User ID for notify
-type string
order type: SELL or BUY (default "SELL")
```

## Signup
Expand Down

0 comments on commit 361fb2c

Please sign in to comment.