Gunthy

GUNBOT: The automatic profit generator => Technical Support & Development => Topic started by: gambcl on November 17, 2017, 11:38:19 PM

Title: Curious about the websocket
Post by: gambcl on November 17, 2017, 11:38:19 PM
Hi all,

Just got my 1st gunbot running, I would really like to get it hooked up to my Pushover account so that it can send me push notifications when it trades. All I need to do is make a simple HTTP POST request to Pushover's REST API.

I see in the wiki it mentions a websocket for 3rd-party plugins, but I cannot find any more documentation about what it provides.

Can anyone tell me if I write a Python script to connect to gunbot's websocket, will it alert the script when trade events happen?
If so, is there any documentation on how to use the websocket to listen for these events?

Cheers,

Charlie


Title: Re: Curious about the websocket
Post by: Daisy on November 22, 2017, 04:15:12 AM
+1
Title: Re: Curious about the websocket
Post by: gambcl on November 28, 2017, 01:26:12 PM
Well, in the end I knocked together a python script that listens to the websocket interface and send a push notification (via my Pushover account) to my iPhone when a buy/sell happens.

Seems to work well, and it lets me know when it disconnects so I can tell if my gunbot has died.

I might rewrite it into an electron/node app with a UI for configuring the notifications.
Title: Re: Curious about the websocket
Post by: Daisy on November 28, 2017, 02:03:34 PM
Awesome! Do share!  :)
Title: Re: Curious about the websocket
Post by: gambcl on November 28, 2017, 02:10:33 PM
Created a thread for it:
https://gunthy.org/forum/index.php/topic,2217.0.html (https://gunthy.org/forum/index.php/topic,2217.0.html)