mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
update for pylint
This commit is contained in:
parent
37f6c213f6
commit
afd1a0bf9b
|
@ -1,13 +1,16 @@
|
|||
#!/usr/bin/python3.6
|
||||
"""This module download automatically json data of crypto currencies in bittrex"""
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from urllib.request import urlopen
|
||||
|
||||
currencies = ["ok","neo","dash","etc","eth","snt"]
|
||||
CURRENCIES = ["ok", "neo", "dash", "etc", "eth", "snt"]
|
||||
|
||||
for cur in currencies:
|
||||
url = 'https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName=BTC-'+cur+'&tickInterval=fiveMin'
|
||||
for cur in CURRENCIES:
|
||||
url1 = 'https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName=BTC-'
|
||||
url2 = '&tickInterval=fiveMin'
|
||||
url = url1+cur+url2
|
||||
x = urlopen(url)
|
||||
data = x.read()
|
||||
str2 = str(data,'utf-8')
|
||||
with open("btc-"+cur+".json", "w") as fichier:
|
||||
fichier.write(str2)
|
||||
json_data = x.read()
|
||||
json_str = str(json_data, 'utf-8')
|
||||
with open("btc-"+cur+".json", "w") as file:
|
||||
file.write(json_str)
|
||||
|
|
Loading…
Reference in New Issue
Block a user