Koinex Rate Notifier.

Last week I created Coinome Rate Notifier which was working fine until Coinome went ahead and implemented reCaptcha making it difficult to rip data from their website and there was also one problem with them, their website was always under maintenance so I decided to drop the idea of further modifying the Coinome app and instead decided to convert it into Koinex Rate Notifier.

Koinex is one of the biggest crypto exchange having a lot of users so it became quite no-brainer to focus on making an app for Koinex.

Its more or less same Coinome app but here we are using JSON parser instead of  BeautifulSoup.

It is also faster than Coinome.

here is the link to Github repo: Koinex Rate Notifier

Coinome Bitcoin Notifier with Intutive GUI.

 

Update:
Last week when I created this script Coinome changed their site a bit so above script will not work now.

But worry not, I cooked up tiny App which is much better than above script with GUI and price graph too.

Here are few Snapshots:

Simple User Interface:

Simple, no clutter.

Notifications (Yup with that annoying ting sound 😀 ):
You can set buy/sell price alert. And once that price is reached you will get a notification.

Graphs for making informed investment decision:

All historical prices extracted from this tool are saved on one text file automatically so you can watch this graph anytime you want.

New App’s source code: TheKetan2/Coinome-Bitcoin-Notifier-with-GUI

Old Scripts Source Code: TheKetan2/python-scripts

Coinome Bitcoin Price Notifier in python.

Coinome Bitcoin Price Notifier:

Initially, I used Zebpay for buying and selling bitcoin but anyone who uses it knows the price difference between buy and sell prices is very huge and it eats up your profit if you are buying bitcoins with the intent of trading on the frequent basis. So I decided to switch to Coinome.

Prices here are very good as compare to Zebpay, both buy and sell prices.

But there is one problem, they don’t have the mobile app yet and keeping updated with the price changes become tedious.

No one wants to keep refreshing website just to check a change in prices so I decided to build price notifier.

It checks the price every 2 minutes(it can be changed) and sends notification if prices get increased or decreased by the specific value which can be changed according to once preference.

Here are few snapshots:

When Prices goes up 😉


When prices go down 😦


This code can be easily modified to get push notifications on a smartphone. If you want to get SMS instead then try using Twilio.

Source Code:

# Coinome Bitcoin Price Checker
# Author : Ketan D. Ramteke
# github.com/theketan2
import requests
from bs4 import BeautifulSoup
from win10toast import ToastNotifier
import time

toaster = ToastNotifier()

url = "https://www.coinome.com/exchange/btc-inr"
price = 0;
while True:
r = requests.get(url)
soup = BeautifulSoup(r.content)
last = soup.find(attrs={"class":"last-market-rate"})
high = soup.find(attrs={"class":"high-market-rate"})
low = soup.find(attrs={"class":"low-market-rate"})
avg = soup.find(attrs={"class":"market-weighted-avg"})

last_float = float(last.span.text.encode('utf8').replace('INR ','')) # current price
high_float = float(high.span.text.encode('utf8').replace('INR ','')) # day high
low_float = float(low.span.text.encode('utf8').replace('INR ','')) # day low
avg_float = float(avg.span.text.encode('utf8').replace('INR ','')) # floated average
up = (1000) #you will get notified after price goes up or down by the value you put here.
print up
print last_float
print abs(price-last_float)

if (last_float-price)>=up:
toaster.show_toast("Change: +"+str(round(((last_float-price)/last_float)*100,2))+"% || Change:INR "+str(abs(price-last_float)),"Current: INR "+str(last_float)+"\nHigh: INR "+str(high_float)+"\nLow: INR "+
str(low_float)+"\nAVG: INR "+str(avg_float),icon_path="green.ico",duration=50)
price = last_float
elif(price-last_float)>=(up):

toaster.show_toast("Change: "+str(round((abs(price - last_float)/price)*100,2))+"% || Change:INR "+str(-(abs(price-last_float))),
"Current: INR " + str(last_float) + "\nHigh: INR " + str(high_float) + "\nLow: INR " +
str(low_float) + "\nAVG: INR " + str(avg_float),icon_path="red.ico", duration=50)
price = last_float

time.sleep(120) # program will check prices after this interval. you can change it according to your choice.

Github: TheKetan2/python-scripts