https://github.com/sskender/bitcoin-alert
Bitcoin alert in Express
https://github.com/sskender/bitcoin-alert
bitcoin crypto gilfoyle silicon-valley
Last synced: about 2 months ago
JSON representation
Bitcoin alert in Express
- Host: GitHub
- URL: https://github.com/sskender/bitcoin-alert
- Owner: sskender
- License: gpl-3.0
- Created: 2018-08-17T14:51:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-13T23:13:43.000Z (about 6 years ago)
- Last Synced: 2025-01-26T20:26:10.378Z (4 months ago)
- Topics: bitcoin, crypto, gilfoyle, silicon-valley
- Language: JavaScript
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bitcoin Alert
Bitcoin price alert written in Express JS.
## About
[Inspired by Gilfoyle (Silicon Valley).](https://www.youtube.com/watch?v=gz7IPTf1uts)
Define price level and when Bitcoin reaches it, alarm will let you know. Even though you may not have a mining rig at home that you need to remotely toggle, you would rather watch the paint dry than monitor exchanges all the time. If you want something simple, customizable, *LOUD* and efficient (fond of Gilfoyle also) you are in the right place. Otherwise, keep looking. Or just code your own notificator. I did.
### Installing
Install dependencies:
```
npm install
```Run:
```
npm start
```Run development:
```
npm run dev
```Open browser:
```
localhost:3000
```### Prerequisites
Application settings are stored in [.env](.env) and [config.js](config/config.js) files. User data is saved in database.
Place your alarm sound in [notifications](notifications) folder. Make sure it's named "alarm.mp3". This is not required if alarm is silenced (see below how to do that). But what's the point then, right?
### Usage
Add alert:
```
/add//
```Remove alert:
```
/remove//
```Change tolerance range:
```
/tolerance//
```Examples:
```
/add/btc/5670
/add/btc/5100
/add/eth/250
``````
/remove/btc/5670
/remove/eth/250
``````
/tolerance/btc/25
/tolerance/eth/10
```Clear all price targets for coin:
```
/clear/btc
/clear/eth
```Show target prices:
```
/target
/target/
/targetid/
```Show coin data like current price, volume, tolerance setting:
```
/coin
/coin/
/coin/btc
```Turn alarm off:
```
/off
```Turn alarm back on:
```
/on
```Every API call will return status code and JSON object.
## MongoDB interaction
Start shell:
```
mongo
```Select database:
```
show dbs
use bitcoin-alert
````Show collections and data:
```
show collections
db.pricetargets.find().pretty()
db.coins.find().pretty()db.coins.deleteMany({coin: 'BTC'})
```## Built With
* [Express](https://expressjs.com/) - Node.js web application framework
* [Cryptonator API](https://www.cryptonator.com/) - Cryptocurrencies exchange rates API
* [MongoDB](https://www.mongodb.com/) - free and open-source cross-platform document-oriented database## License
This project is licensed under the GNU License - see the [LICENSE](LICENSE) file for details.