Bitcoin Forum
May 06, 2024, 03:28:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Anyone with experience with python websockets?  (Read 566 times)
Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1029


give me your cryptos


View Profile
September 11, 2016, 09: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?

looking for a signature campaign, dm me for that
1714966130
Hero Member
*
Offline Offline

Posts: 1714966130

View Profile Personal Message (Offline)

Ignore
1714966130
Reply with quote  #2

1714966130
Report to moderator
The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714966130
Hero Member
*
Offline Offline

Posts: 1714966130

View Profile Personal Message (Offline)

Ignore
1714966130
Reply with quote  #2

1714966130
Report to moderator
1714966130
Hero Member
*
Offline Offline

Posts: 1714966130

View Profile Personal Message (Offline)

Ignore
1714966130
Reply with quote  #2

1714966130
Report to moderator
dc1a0
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
September 12, 2016, 12:59:56 AM
 #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?
Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1029


give me your cryptos


View Profile
September 12, 2016, 06: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.

looking for a signature campaign, dm me for that
ads2alpha
Full Member
***
Offline Offline

Activity: 202
Merit: 101


View Profile
September 13, 2016, 04: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.
PremiumCodeX
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 531


Metaverse 👾 Cyberweapons


View Profile
September 13, 2016, 06: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.

[TUTORIAL] How to steal $350 000?
Best OS for recovering stolen BTCs.
Visit our FREE Bitcointalk thread.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!