Help with CryptoCompareHistoryAPI

Posted By: kreko

Help with CryptoCompareHistoryAPI - 07/02/18 19:29

Hi,
1. I downloaded the CryptoCompareHistoryAPI from @vinsom's github.
2. I created a file and copied the code snippet that vinsom mentions in the Readme.
Quote:
dataFromCryptoCompare("EOS/EUR",60);


void removeChar(char* input, char ch)
{
char* output = input;
while (*input)
{
if (*input != ch)
{
*(output++) = *input;
}
++input;
}
*output = 0;
}

var dataFromCryptoCompare(string Code, int timeframe)
{
removeChar(Code,'/');

string Format;
Format = "%Y-%m-%d %H:%M,f3,f1,f2,,f4,f6";

char cmdParam[256];
sprintf(cmdParam, "%s %d", Code,timeframe);
exec("CryptoCompareHistoryAPI.exe", cmdParam, 1);

dataNew(1, 0, 7);
int numRecord = dataParse(1, Format, "Historyhistory.csv");
printf("n%s %d records read from CRYPTOCOMPARE", Code, numRecord);
dataSave(1, strf("%s.t6", Code));
return numRecord;

}

3. When I run this newly created script in Zorro, I get an error
Quote:


DownloadCryptoCompare compiling.......
Error in 'line 2:
'dataFromCryptoCompare' undeclared identifier
< dataFromCryptoCompare("EOS/EUR",60);
>.




Attached File
DownloadCryptoCompare.c  (63 downloads)
Attached picture Capture.PNG
Posted By: vinsom

Re: Help with CryptoCompareHistoryAPI - 08/05/18 11:03

Hi Keko,
Please use this snippet in this other post:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=468152&page=3

Cheers
Posted By: vinsom

Re: Help with CryptoCompareHistoryAPI - 08/05/18 11:08

You can also try to move this line at the bottom of the script.

dataFromCryptoCompare("EOS/EUR",60);
© 2024 lite-C Forums