add ogre
This commit is contained in:
parent
ebb5d91213
commit
e8ed5316cb
24
price.py
24
price.py
|
@ -27,6 +27,7 @@ thumbxmrurl = 'https://api.bithumb.com/public/ticker/xmr' # measured natively in
|
||||||
thumbbtcurl = 'https://api.bithumb.com/public/ticker/btc' # measured natively in KRW
|
thumbbtcurl = 'https://api.bithumb.com/public/ticker/btc' # measured natively in KRW
|
||||||
binanceurl = 'https://api.binance.com/api/v1/ticker/24hr'
|
binanceurl = 'https://api.binance.com/api/v1/ticker/24hr'
|
||||||
localmonerousd = 'https://localmonero.co/api/ticker?currencyCode=USD'
|
localmonerousd = 'https://localmonero.co/api/ticker?currencyCode=USD'
|
||||||
|
ogreurl = 'https://tradeogre.com/api/v1/markets'
|
||||||
|
|
||||||
@sopel.module.commands('forksum')
|
@sopel.module.commands('forksum')
|
||||||
def forksum(bot, trigger):
|
def forksum(bot, trigger):
|
||||||
|
@ -281,6 +282,23 @@ def trex(bot, trigger):
|
||||||
except:
|
except:
|
||||||
bot.say("Error retrieving data from Bittrex")
|
bot.say("Error retrieving data from Bittrex")
|
||||||
|
|
||||||
|
@sopel.module.commands('tradeogre', 'ogre')
|
||||||
|
def ogre(bot, trigger):
|
||||||
|
if not trigger.group(2):
|
||||||
|
coin = 'XMR'
|
||||||
|
else:
|
||||||
|
coin = trigger.group(2).upper()
|
||||||
|
try:
|
||||||
|
r = requests.get(ogreurl)
|
||||||
|
j = r.json()
|
||||||
|
for i in j:
|
||||||
|
if "BTC-"+coin == i.key():
|
||||||
|
last=float(i['price'])
|
||||||
|
vol=float(i['volume'])
|
||||||
|
bot.say("Tradeogre at {0:.8f} BTC; on {1:.3f} BTC volume".format(last, vol))
|
||||||
|
except:
|
||||||
|
bot.say("Error retrieving data from Ogre")
|
||||||
|
|
||||||
@sopel.module.commands('bsq', 'bitsquare')
|
@sopel.module.commands('bsq', 'bitsquare')
|
||||||
def bsq(bot, trigger):
|
def bsq(bot, trigger):
|
||||||
try:
|
try:
|
||||||
|
@ -754,6 +772,12 @@ def price(bot, trigger):
|
||||||
except:
|
except:
|
||||||
bot.say("C-cex sucks")
|
bot.say("C-cex sucks")
|
||||||
|
|
||||||
|
@sopel.module.commands('comm')
|
||||||
|
def comm(bot, trigger):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.commands('xmy')
|
@sopel.module.commands('xmy')
|
||||||
def xmy(bot, trigger):
|
def xmy(bot, trigger):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue