Username: Password:

Author Topic: Curious about the websocket  (Read 6507 times)

Offline gambcl

  • Rookie
  • *
  • Posts: 7
    • View Profile
Curious about the websocket
« 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



Offline Daisy

  • Rookie
  • *
  • Posts: 12
    • View Profile
Re: Curious about the websocket
« Reply #1 on: November 22, 2017, 04:15:12 AM »
+1

Offline gambcl

  • Rookie
  • *
  • Posts: 7
    • View Profile
Re: Curious about the websocket
« Reply #2 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.

Offline Daisy

  • Rookie
  • *
  • Posts: 12
    • View Profile
Re: Curious about the websocket
« Reply #3 on: November 28, 2017, 02:03:34 PM »
Awesome! Do share!  :)

Offline gambcl

  • Rookie
  • *
  • Posts: 7
    • View Profile
Re: Curious about the websocket
« Reply #4 on: November 28, 2017, 02:10:33 PM »