Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- r=requests.get("https://bittrex.com/api/v1.1/public/getmarkets")
- data = r.json()
- # print (len(data ["result"]))
- for i in range (len (data["result"])):
- uri_end = (data["result"] [i] ["MarketName"])
- uri_beg = "https://bittrex.com/api/v1.1/public/getmarketsummary?market="
- uri = uri_beg + uri_end
- # print (uri)
- r2=requests.get(uri)
- data2 = r2.json()
- res = data2["result"]
- # print (i)
- ask = data2 ["result"] [0] ["Ask"]
- bid = data2 ["result"] [0] ["Bid"]
- vol = data2 ["result"] [0] ["BaseVolume"]
- rank = ((ask-bid)/bid)*vol
- # print(uri)
- print (uri_end,":", rank,":", vol)
Add Comment
Please, Sign In to add comment