How download M1 H1 D1 from CryptoCompare ?

Posted By: Chuate

How download M1 H1 D1 from CryptoCompare ? - 12/25/18 09:47

Hello,
I am using Zorro S and this code only download D1 of ETH/BTC pair ? How to download M1 and H1 ? Thank you !

Code:
function run()
{
  BarPeriod = 1;
  assetHistory("ETH/BTC",FROM_CRYPTOC);
  assetAdd("ETHBTC");
  asset("ETHBTC");
  set(PLOTNOW);
}

Posted By: Spirit

Re: How download M1 H1 D1 from CryptoCompare ? - 12/26/18 11:18

You can load only D1 from Cryprocompare, M1 and H1 works only with the latest beta version and only 2000 bars, so it is not very useful.
Posted By: Chuate

Re: How download M1 H1 D1 from CryptoCompare ? - 12/27/18 11:23

I want to build strategy in crypto data. So, there is anyway to download h1 data for Zorro ? For example download from external source then convert to Zorro format file.
Posted By: kvm

Re: How download M1 H1 D1 from CryptoCompare ? - 12/27/18 14:28

You can download H1 data using Binance's Public Rest API and convert the json to t6 format.

For example: https://api.binance.com/api/v1/klines?symbol=ETHBTC&interval=1h&startTime=0
Posted By: Chuate

Re: How download M1 H1 D1 from CryptoCompare ? - 12/29/18 13:22

Originally Posted By: kvm
You can download H1 data using Binance's Public Rest API and convert the json to t6 format.

For example: https://api.binance.com/api/v1/klines?symbol=ETHBTC&interval=1h&startTime=0


Thank you but can you show me how to convert json to t6 ? I have to use Z History Editor tool to convert ?
Posted By: kvm

Re: How download M1 H1 D1 from CryptoCompare ? - 01/03/19 15:00

Originally Posted By: Chuate
Thank you but can you show me how to convert json to t6 ? I have to use Z History Editor tool to convert ?

Now, this is the tricky part:

1) You should convert json data to csv file, for example use this online converter: https://konklone.io/json/

2) Configure CSVtoHistory.c script to find and understand our csv file, just copy these lines before the main function:
Code:
string InName = "C:\\Programs\\Zorro-History\\ETHBTC.csv";
string Format = "+%t,f3,f1,f2,f4,f6";
string OutName = "ETHBTC";


3) Open <zorro_history_folder>\ETHBTC.t6 file in History Editor and verify all is correct!

Attached File
ETHBTC.csv  (88 downloads)
Posted By: Chuate

Re: How download M1 H1 D1 from CryptoCompare ? - 01/05/19 08:52

It work like a charm. Thank you laugh
© 2024 lite-C Forums