Author

Topic: Anyone with experience with python websockets? (Read 566 times)

hero member
Activity: 1204
Merit: 531
Metaverse 👾 Cyberweapons
September 13, 2016, 02:57:17 PM
#5
Why do you think that there will be a JSON object? Nevertheless, I found this this project successful to use to check balances on Block io.
full member
Activity: 202
Merit: 101
September 13, 2016, 12:58:07 PM
#4
You just spin up a TCP client on your machine. It should go to the server, and if there is anything to retrieve, it will display in your terminal or wherever you tell it to. If there is nothing to retrieve but the header with a 2xx status, then it's normal you don't get any JSON.

The simplest TCP client in Python is kind of ten lines of code. It uses the standard socket library. PM me for my Skype and I could give you a code snippet and some help.
legendary
Activity: 1232
Merit: 1029
give me your cryptos
September 12, 2016, 02:55:46 AM
#3
Admittedly, I'm not a complete expert but according to your post, you want to use another server's API correct? When I was looking into doing that I came across a library called "Requests" Found here: http://docs.python-requests.org/en/master/

Maybe this might make things easier for you?

No, sorry that's not what i'm looking for. I am looking for another python library that is better documented and will allow me to retrieve the json object from the websocket. I want to use the block.io API.
member
Activity: 84
Merit: 10
September 11, 2016, 08:59:56 PM
#2
Admittedly, I'm not a complete expert but according to your post, you want to use another server's API correct? When I was looking into doing that I came across a library called "Requests" Found here: http://docs.python-requests.org/en/master/

Maybe this might make things easier for you?
legendary
Activity: 1232
Merit: 1029
give me your cryptos
September 11, 2016, 05:44:31 PM
#1
Hey guys, I'm trying to make an app that uses the block.io Wendover API. My app is something like BitNotify, with more advanced options. For example if you're using a HD wallet, you could input the xPub and my service will automatically generate all addresses 1 address ahead, and give you notifications when you have a balance change in any one of those addresses.

I've got the mail service down, the xPub expander done, just need the web socket API. I know how to work with JSON, too.

I am currently using websocket-client (pip install websocket-client), and am able to connect to the block.io server. When I issue a command, I can get the response (Success). But how do I get the JSON object sent to me?
Jump to: