Bitcoin Forum
December 04, 2016, 02:34:51 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
Author Topic: [BETA] MTGox websocket API, testers wanted  (Read 72202 times)
kseistrup
Hero Member
*****
Offline Offline

Activity: 565


Unselfish actions pay back better


View Profile WWW
June 16, 2011, 07:15:52 PM
 #81


today I saw MtGox Live for Android

I have a feeling that the app is polling Mt. Gox every 5 seconds, rather than using the websocket API.

Something that would be immensly cool is an android app with the same graphs as on MtGoxLive, using websockets.  AFAIK there are no browsers for android that supports websokcets, so I can't just load the web page.

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480862091
Hero Member
*
Offline Offline

Posts: 1480862091

View Profile Personal Message (Offline)

Ignore
1480862091
Reply with quote  #2

1480862091
Report to moderator
1480862091
Hero Member
*
Offline Offline

Posts: 1480862091

View Profile Personal Message (Offline)

Ignore
1480862091
Reply with quote  #2

1480862091
Report to moderator
ezl
Newbie
*
Offline Offline

Activity: 13


View Profile
June 17, 2011, 01:31:41 PM
 #82

recommendation regarding the depth feed -- , send updates instead of diffs.

 the bandwidth is ~same, but by broadcasting updates, the penalty for missing a message only lasts as long as the interval until the next update for that price level. clients can compute diffs if they want.

it also makes it so that the listener can theoretically construct the full book just by listening to the updates instead of repolling the old api and hoping the messages are in sync
dev^
Newbie
*
Offline Offline

Activity: 28


View Profile
June 18, 2011, 01:49:12 AM
 #83

Hi,

is it possible for upcoming version to rename the field "private" in anything other, which isn't a protected keyword in Java?  Smiley

Currently it isn't possible (at least for me) to read this field with any common JSON parser library, e.g. Google's Gson.
(of course, it would be possible to set this field's content via text parsing, but this isn't the right way to do so...)

> Something that would be immensly cool is an android app with the same graphs as on MtGoxLive, using websockets.

If someone can develop any nice looking GUI for Android devices, I could provide the complete Java part regarding the WebSockets - it seems to work quite fine.  Cheesy

Best regards
dev^
zelyony
Newbie
*
Offline Offline

Activity: 23



View Profile
June 19, 2011, 06:46:31 PM
 #84

at now
for determine connection lost (iPhone hasn't keepalive ops for socket) I do next:
if App dont recv any datas on channels over 6seconds it send:
Quote
"{"op":"ping"}"
if connection is ok than server responds to App:
Quote
{"message":"Unknown command","op":"remark","success":false}
if no any responds in next 6seconds (include other datas on channels) App decides that current connection lost and try to create new connection (with close old)

NB: "ping" dont send every 6seconds! only if at last 6seconds no datas (including "Unknown command")
otherwise App works but nothing shows over hour on broken connection (turnoff WAN at router). I dont known default values in iPhone keep-alive logic.

and my suggestion:
maybe add "good" response:
Quote
{"op":"pong"}
it dont requires any logic or DB-access. simple response for current connection
although its works well now
dds
Newbie
*
Offline Offline

Activity: 7



View Profile
June 28, 2011, 07:49:59 AM
 #85

Looks like MtGox WebSockets broken after reopening - connection can be established but no data received.
Mark, are you going to fix it?
molecular
Donator
Legendary
*
Online Online

Activity: 2128



View Profile
June 28, 2011, 08:47:39 AM
 #86

Looks like MtGox WebSockets broken after reopening - connection can be established but no data received.
Mark, are you going to fix it?

+1

also: I can't seem to be able to use the classic Trade API, either. Says something about a "bad token". Anyone know about that?

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
kseistrup
Hero Member
*****
Offline Offline

Activity: 565


Unselfish actions pay back better


View Profile WWW
June 28, 2011, 08:59:20 AM
 #87


I can't seem to be able to use the classic Trade API, either. Says something about a "bad token". Anyone know about that?

Look at the Trade API page on your account — it says that it will be enabled soonish.

Cheers,

Klaus Alexander Seistrup
http://about.me/kseistrup
zelyony
Newbie
*
Offline Offline

Activity: 23



View Profile
July 03, 2011, 04:33:39 PM
 #88

good! websocket works for now!

some questions:

Quote
{"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f","op":"private", "origin":"broadcast","private":"ticker", "ticker":{"avg":15.469053268,"buy":15.63,"high":15.689,"last":15.63001,"low":15.311,"sell":15.63001,"vol":15679}}
"avg" is average volume by trade?

Quote
{"channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21","op":"private","origin":"broadcast","private":"trade", "trade":{"amount":2,"amount_int":"200000000","date":1309710218,"item":"BTC","price":15.632,"price_currency":"USD","price_int":"1563200","tid":"1309710218345711","trade_type":"ask","type":"trade"}}
what mean "trade_type":"ask"? trade raised by ask order?

and where is depth channel? no datas for it. will it appear in the future?
dev^
Newbie
*
Offline Offline

Activity: 28


View Profile
July 03, 2011, 04:36:29 PM
 #89

good! websocket works for now!

Yay! :-)

"avg" is average volume by trade?

I think it's the average price. (As I guess by it's value...)

what mean "trade_type":"ask"? trade raised by ask order?
and where is depth channel? no datas for it. will it appear in the future?
Looks like this is "the new" depth-channel...

Best regards,
dev^
zelyony
Newbie
*
Offline Offline

Activity: 23



View Profile
July 03, 2011, 05:13:31 PM
 #90

and where is depth channel? no datas for it. will it appear in the future?
Looks like this is "the new" depth-channel...
my English is not so good. where is "this "the new" depth-channel" ?
EDIT: on #mtgox they say me that "should come soon"


and I try to get key for personal channel via https://mtgox.com/code/getKey.php (as say in post 0). it returns
Quote
{"error":"Bad token"}
Huh
EDIT: maybe same (come soon)
kseistrup
Hero Member
*****
Offline Offline

Activity: 565


Unselfish actions pay back better


View Profile WWW
July 05, 2011, 06:13:27 AM
 #91

My ws client has been trying to connect for an hour now, is the websocket down for me only?

Klaus Alexander Seistrup
http://about.me/kseistrup
dev^
Newbie
*
Offline Offline

Activity: 28


View Profile
July 05, 2011, 06:57:53 AM
 #92

My ws client has been trying to connect for an hour now, is the websocket down for me only?

It's down for everyone.

Code:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
(...)

MtGox should really think about some QA or at least a 2nd developer in it's team...
molecular
Donator
Legendary
*
Online Online

Activity: 2128



View Profile
July 10, 2011, 10:08:40 AM
 #93

there's a wiki now: https://en.bitcoin.it/wiki/MtGox/API#Websocket_API

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
vector76
Member
**
Offline Offline

Activity: 70


View Profile
July 27, 2011, 12:51:51 AM
 #94

I guess since there is not a good way to synchronize the market depth websocket with the getDepth.php, I could fetch getDepth multiple times and watch the websocket for deltas and try to correlate them.

I'd have to agree with ezl's suggestion of sending the total volume instead of the deltas.  Then there would be no synchronization problem.

Are people still seeing problems with the depth websocket or have those issues been fixed?  I guess I'll fetch getDepth every 5 or ten minutes just in case..
divebubble
Newbie
*
Offline Offline

Activity: 7


View Profile
July 28, 2011, 10:30:59 PM
 #95


Reading the different channels, updating data all works perfect... but -

how can i connect my account to get my trading information?

sending
{"op":"mtgox.subscribe","key":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}

will always result in

{"message":"Invalid MTGOX key","op":"remark","success":false}


XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX is the API Key from the https://mtgox.com/users/settings page.
Or are i'm compleatly wrong?


Thanks.
throughput
Full Member
***
Offline Offline

Activity: 158


View Profile
August 03, 2011, 09:02:02 AM
 #96

Websocket API is cool for receiving trade updates! Thanks!

But is it possible to receive updates on my orders anyhow?
If that is implemented, then I don't get the meaning of the "(partial key)" in
Code:
{
  "channel":"(partial key)",
  "op":"private",
  "order_upd":{
    "amount":1000,
    "darkStatus":0,
    "date":1302836027,
    "oid":"(oid)",
    "price":0.9899,"status":1
  },
  "origin":"broadcast",
  "private":"order_upd"
}
(example from https://en.bitcoin.it/wiki/MtGox/API#Websocket_API )

I don't understand how should I implement the authentication to subscribe to my private channel.

Please, can anybody provide more details on:

 1. Does it work at the moment?
 2. How the authentication is implemented?

Also, it would be nice to be able to request the full depth to receive them as depth messages.
Fireball
Hero Member
*****
Offline Offline

Activity: 673


View Profile WWW
August 06, 2011, 06:18:26 PM
 #97

You have a small bug in the reply header:
Code:
HTTP/1.1 101 WebSocket Protocol Handshake
should be the first line, and in your case it's
Code:
HTTP/1.1 101 Web Socket Protocol Handshake
(yes, the additional space between Web and Socket). Nothing major, however if some software validates the header, it won't be recognized as a valid one. Example of such real-world failing app: websocket-sharp. Other are probably just failing silently too.

Margin trading platform OrderBook.net (ICBIT): https://orderbook.net
Follow us in Twitter: https://twitter.com/orderbooknet
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
August 27, 2011, 02:13:50 PM
 #98

It happens very often that there are consecutive "depth" messages, where one comes immediately after another and they both have the same amount/price and the opposite sign. So effectively they do nothing, except causing confusion and an unnecessary traffic.

For instance:
Quote
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"9.15417","price_int":"915417","type":1,"type_str":"ask","volume":"-0.09283","volume_int":"-9283000"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"9.15417","price_int":"915417","type":1,"type_str":"ask","volume":"0.09283","volume_int":"9283000"},"op":"private","origin":"broadcast","private":"depth"}
...
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86","price_int":"886000","type":2,"type_str":"bid","volume":"-0.2","volume_int":"-20000000"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86","price_int":"886000","type":2,"type_str":"bid","volume":"0.2","volume_int":"20000000"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86","price_int":"886000","type":2,"type_str":"bid","volume":"-0.2","volume_int":"-20000000"},"op":"private","origin":"broadcast","private":"depth"}
...
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"-0.79287883","volume_int":"-79287883"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"0.79287883","volume_int":"79287883"},"op":"private","origin":"broadcast","private":"depth"}

It seems like some glitch and it would be nice if could be fixed one day.

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
zelyony
Newbie
*
Offline Offline

Activity: 23



View Profile
August 30, 2011, 09:06:20 PM
 #99

It happens very often that there are consecutive "depth" messages, where one comes immediately after another and they both have the same amount/price and the opposite sign. So effectively they do nothing, except causing confusion and an unnecessary traffic.

For instance:
Quote
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"-0.79287883","volume_int":"-79287883"},"op":"private","origin":"broadcast","private":"depth"}
{"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","depth":{"currency":"USD","item":"BTC","price":"8.86852","price_int":"886852","type":2,"type_str":"bid","volume":"0.79287883","volume_int":"79287883"},"op":"private","origin":"broadcast","private":"depth"}

It seems like some glitch and it would be nice if could be fixed one day.

imho, all changes must be. human's or robot's..
piotr_n
Legendary
*
Offline Offline

Activity: 1498


aka tonikt


View Profile WWW
August 30, 2011, 09:14:07 PM
 #100

imho, all changes must be. human's or robot's..
agree. but these dont look like robot changes, do they? why would a robot do something like that? the only thing i can think of: to DoS the server Smiley

Check out gocoin - my original project of a bitcoin client written in Go, with some unique features.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!