Bitcoin Forum
June 17, 2024, 11:50:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question: mtgox websocket API, linux cli interface, openssl s_client... how?  (Read 768 times)
Kleptoid (OP)
Newbie
*
Offline Offline

Activity: 35
Merit: 0


View Profile
April 01, 2013, 12:45:39 PM
 #1

Hello everyone, I'm new here.

I would like to write a console client for mtgox with minimal dependencies, no perl, python, ruby etc. It seems the old HTTP API interface is depricated(?) so I would like to use the websocket interface. I can connect to websocket.mtgox.com:80 using telnet, send the following...

Code:
GET /mtgox HTTP/1.1
Host: websocket.mtgox.com
Connection: Upgrade
Upgrade: websocket
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Protocol: mtgox                                                                                                                                 
Sec-WebSocket-Version: 13

...and it handshakes fine and I get a stream of blurb, which is just what I want.

I would very much like to connect over SSL, I should be able to do that using openssl's s_client, which AFAIK is a bit like an ssl enabled telnet. I can connect and all the ssl stuff seems to be working, but when I send the same HTTP, and the extra cr, I get nothing back. I'm obviously missing something, I'm new to the whole websocket thing. I can also see non-ASCII characters in the stream I get using telnet, I suspect that may be related.

Thanks in advance for any ideas Smiley
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!