dickserv

- irc bot with many useful commands
git clone git://git.acid.vegas/dickserv.git
Log | Files | Refs | Archive | README | LICENSE

cryptocurrency.py (382B)

      1 #!/usr/bin/env python
      2 # DickServ IRC Bot - Developed by acidvegas in Python (https://acid.vegas/dickserv)
      3 # cryptocurrency.py
      4 
      5 import httplib
      6 
      7 def get(coin):
      8 	api  = httplib.get_json('https://api.coinmarketcap.com/v1/ticker/?limit=500')
      9 	data = [item for item in api if (coin.lower() == item['id'] or coin.upper() == item['symbol'])]
     10 	if data:
     11 		return data[0]
     12 	else:
     13 		return False