Merge pull request #80 from gcarq/fix-testdate-dl-path
download testdata to correct folder when running from project root
This commit is contained in:
commit
e0fde8665c
@ -5,6 +5,7 @@
|
|||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
CURRENCIES = ["ok", "neo", "dash", "etc", "eth", "snt"]
|
CURRENCIES = ["ok", "neo", "dash", "etc", "eth", "snt"]
|
||||||
|
OUTPUT_DIR = 'freqtrade/tests/testdata/'
|
||||||
|
|
||||||
for cur in CURRENCIES:
|
for cur in CURRENCIES:
|
||||||
url1 = 'https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName=BTC-'
|
url1 = 'https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName=BTC-'
|
||||||
@ -12,5 +13,6 @@ for cur in CURRENCIES:
|
|||||||
x = urlopen(url)
|
x = urlopen(url)
|
||||||
json_data = x.read()
|
json_data = x.read()
|
||||||
json_str = str(json_data, 'utf-8')
|
json_str = str(json_data, 'utf-8')
|
||||||
with open('btc-'+cur+'.json', 'w') as file:
|
output = OUTPUT_DIR + 'btc-'+cur+'.json'
|
||||||
|
with open(output, 'w') as file:
|
||||||
file.write(json_str)
|
file.write(json_str)
|
||||||
|
Loading…
Reference in New Issue
Block a user