Author

Topic: 【BOT】 🌟 C.A.T. Cryptocurrency Automatic Trader 🌟 (New Price List 04/2021) - page 150. (Read 531503 times)

hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)

The JSON starts after the "=" sign.


Exactly, first you must extract the DATA value, then parse it as JSON.


Yes, that is a WORKAROUND. The correct way is to do what you said: IT'S A JSON!!! While you already removing this nonsense string before and including "=" please add the Exchange name to it.

Thank you very much. I am sure you can do that in less then 5 minutes. Thank you again!
legendary
Activity: 2632
Merit: 1040

The JSON starts after the "=" sign.


Exactly, first you must extract the DATA value, then parse it as JSON.
legendary
Activity: 2632
Merit: 1040
as I have said above it is the same on a rented VPS runnung Linux...

perhaps most users have runnung only a few trading pairs and hence not that issue...

if you run CAT over 100+ Markets at the same time and you run it without changing JVM Parameters of course you will risk to froze the application due to overflow the JVM Ram (or VPS Ram)
hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)
I found the problem with the "JSON":

The raw data I receive is:
Content is data={"PingPong":{"Market":"BURST/BTC","TimeStamp":"2016-10-21 02:19:13","OriginalTradeType":"BUY","OriginalTradePrice":"0.00000142","OriginalTradeQuantity":"842.28169013","OriginalTradeFee":"0.00000179","FinalTradeType":"SELL","FinalTradePrice":"0.00000143","FinalTradeQuantity":"840.17598590","FinalTradeFee":"0.00000181","TotalFee":"0.00000360","Gain":"0.00000479","PercentageGain":"0.704","MarketComulativeGain":"0.00480284"}}

http://www.jslint.com/ shows that this is not a JSON!!!

The JSON starts after the "=" sign.

Can you please remove the left part including the "=" sign ("Content is data=") and add the Exchange name.
legendary
Activity: 2955
Merit: 1049
GUI

and this is one of the weakenings of CAT
in Linux environments (local or VPS) Java (respectively CAT GUI) deep-freeze beyond a certain time and all is no more accessible...
 Sad

When programs are complex a gui is needed.
There are tons of buttons and functions, it's not possible to create a no-Gui env, it will be so complex that nobody will use it.

About the freeze problems, i'm continue telling you that YOUR installation got problems, 99% of C.A.T. users doesn't have any kind of problems.
as I have said above it is the same on a rented VPS runnung Linux...

perhaps most users have runnung only a few trading pairs and hence not that issue...
hero member
Activity: 960
Merit: 502
can any users tell me hoe well it preforms "out of the box" on default mode? only changing the min gain%? i am thinking about using it on bitstam with around 2BTC? or do i have ot know about all the other setting too, for the bot to be usefull?
legendary
Activity: 2632
Merit: 1040
GUI

and this is one of the weakenings of CAT
in Linux environments (local or VPS) Java (respectively CAT GUI) deep-freeze beyond a certain time and all is no more accessible...
 Sad

When programs are complex a gui is needed.
There are tons of buttons and functions, it's not possible to create a no-Gui env, it will be so complex that nobody will use it.

About the freeze problems, i'm continue telling you that YOUR installation got problems, 99% of C.A.T. users doesn't have any kind of problems.
legendary
Activity: 2955
Merit: 1049
hi sampey ...

can CAT be setup and run in console under linux ( fedora 23 / 24 x64 or centos 7 x64 ) automatically via a config file? ...

i have a server that can do that - but no gui - which is a preferrable way of working on a big dedicated system ...

i just want it to do specific type of trades at specific intervals - 24 / 7 ...

can this be done - and if so - how? ...

#crysx

Hi,
no sorry, there's no command line operation. You must use the GUI  Smiley

GUI

and this is one of the weakenings of CAT
in Linux environments (local or VPS) Java (respectively CAT GUI) deep-freeze beyond a certain time and all is no more accessible...
 Sad
legendary
Activity: 2632
Merit: 1040
is there any way to convince you to create such a system based off cat? ...

The creation of a CAT environment that works only from command line will have an unaccesible cost.
It's like some month of coding.....
sr. member
Activity: 364
Merit: 260
--- ChainWorks Industries ---
hi sampey ...

can CAT be setup and run in console under linux ( fedora 23 / 24 x64 or centos 7 x64 ) automatically via a config file? ...

i have a server that can do that - but no gui - which is a preferrable way of working on a big dedicated system ...

i just want it to do specific type of trades at specific intervals - 24 / 7 ...

can this be done - and if so - how? ...

#crysx

Hi,
no sorry, there's no command line operation. You must use the GUI  Smiley

is there any way to convince you to create such a system based off cat? ...

#crysx
legendary
Activity: 2632
Merit: 1040
hi sampey ...

can CAT be setup and run in console under linux ( fedora 23 / 24 x64 or centos 7 x64 ) automatically via a config file? ...

i have a server that can do that - but no gui - which is a preferrable way of working on a big dedicated system ...

i just want it to do specific type of trades at specific intervals - 24 / 7 ...

can this be done - and if so - how? ...

#crysx

Hi,
no sorry, there's no command line operation. You must use the GUI  Smiley
sr. member
Activity: 364
Merit: 260
--- ChainWorks Industries ---
hi sampey ...

can CAT be setup and run in console under linux ( fedora 23 / 24 x64 or centos 7 x64 ) automatically via a config file? ...

i have a server that can do that - but no gui - which is a preferrable way of working on a big dedicated system ...

i just want it to do specific type of trades at specific intervals - 24 / 7 ...

can this be done - and if so - how? ...

#crysx
hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)
hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)
why don't you just print out everything you receive before trying something more elevated with writting it into a file?

How would you do that?

Maybe you miss the point here. C.A.T. sends info to the server, to an URL. I am not the server. The program receives it, there is no screen, to see it, ...
full member
Activity: 136
Merit: 110
why don't you just print out everything you receive before trying something more elevated with writting it into a file?
hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)
I still stuck here. Thats what I tried:

Code:
header('Content-Type: application/json');

$myFile "testFile.txt";
$fh fopen($myFile'a') or die("can't open file");
$date = new DateTime();
$date $date->format("Y-m-d H:i:s");
fwrite($fh$date "\n===================\n");

$error '';

//Make sure that it is a POST request.
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0){
    
$error "Request method must be POST!\n";
}

//Make sure that the content type of the POST request has been set to application/json
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
if(
strcasecmp($contentType'application/json') != 0){
    
$error $error "Content type must be: application/json\n";
}

//Receive the RAW post data.
$content trim(file_get_contents("php://input"));
 
//Attempt to decode the incoming RAW post data from JSON.
$decoded json_decode($contenttrue);
 
//If json_decode failed, the JSON is invalid.
if(!is_array($decoded)){
    
$error $error "Received content contained invalid JSON!\n";
}
 
//If error, put it into out put file
if($error) {
fwrite($fh$error);
}

fwrite($fh$decoded);
fclose($fh);

?>


Can anybody spot something?
legendary
Activity: 2632
Merit: 1040
How to use the Tool "Make a Post To URL When a Ping-Pong is Completed   http://your.url/page "?

you need to create a webservice with a servlet http://your.url/servlet and then CAT will send a JSON data when a Gain occurs.

Cool feature, Sampey.
Works perfectly fine, thank you!

Yeah!!!  Grin Grin Grin
legendary
Activity: 1612
Merit: 1608
精神分析的爸
How to use the Tool "Make a Post To URL When a Ping-Pong is Completed   http://your.url/page "?

you need to create a webservice with a servlet http://your.url/servlet and then CAT will send a JSON data when a Gain occurs.

Cool feature, Sampey.
Works perfectly fine, thank you!
legendary
Activity: 2632
Merit: 1040
No i don't have one actually, but if you run a servlet and print all the message you will get the complete json string.
hero member
Activity: 785
Merit: 500
BURST got Smart Contracts (AT)
How to use the Tool "Make a Post To URL When a Ping-Pong is Completed   http://your.url/page "?
Do you have an example Jason string available?
you need to create a webservice with a servlet http://your.url/servlet and then CAT will send a JSON data when a Gain occurs.
Jump to: