A Telegram bot to send out price alarms for the DeFiChain DEX. It gets the data from the Ocean API. Currently only DFI, DUSD and the stock tokens are supported.
Please let me know if you have questions or comments!
The bot is deployed on an AWS machine.
You can find (und use) it here.
Please be aware that this is a very early prototype and there are no guarantees. So use it at your own risk. (The main risk is getting annoyed, but you can always /unsubscribe...)
It checks conditions every 5 minutes and sends out a notification every time the condition is satisfied.
-
Use
/showto get a list of current token prices (DEX and Oracle) -- warning: still looking very ugly ;-)... -
Use
/subscribe {token} </> {price}to subscribe to price notifications. For example,/subscribe DFI < 2.5gets you notified whenever the DFI (on the DEX) falls below 2.5 DUSD. You can subscribe to Oracle prices by specifying
{token}.Oracle(or the current premium using{token}.Premium-- note that the premium is given in percent). For example/subscribe TSLA.Oracle > 1500gets you notified if the Oracle price for Tesla rises above 1500 USD. Use
/subscribe DUSD.Premium < 10to get notified if the DUSD premium is below 10% (i.e., if the price of DUSD does not exceed 1.1).
By default, DEX prices are always considered in DUSD, except for the price of DUSD itself, which is computed as DFI.Oracle/DFI.DEX.
You can subscribe to quotients of prices, i.e., prices in specified in another asset: For example, use
BTC/DFIto get the price of BTC in DFI orUSDC/USDTfor the quotient of USDC and USDT. -
Use
/unsubscribeto unsubscribe from all notifications. -
Use
/listto get a list of your active subscriptions.
- The AWS machine is very small (t2.micro because of free tier). Not sure how much load it can handle...
- Use a real database (currently: data is dumped to a json file)
- Allow muting, editing of alarms and configuring how often the notification is sent (e.g. once, always, once per day?)
- Error handling
- The messages could look much nicer...
If this is useful for you, you can support me and the project with DFI donations:
dLxgbfwjWtPibyVjknk6gFWB3u7ReHTZEJ