Bitcoin Forum
March 19, 2024, 03:31:56 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 »  All
  Print  
Author Topic: Realtime MtGox Time and Sales  (Read 19639 times)
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 03, 2011, 07:12:18 AM
Last edit: November 10, 2011, 08:37:03 PM by Clark
 #1

I have created a web page to view the real time MtGox time & sales data as it comes across the pipe.

http://bitcoin.clarkmoody.com/

Please note that this service requires WebSockets, and Google Chrome seems to be the only browser that supports the technology at the moment.

The MtGox data now comes down the pipes on socket.io, so browser compatibility should be much broader than before.

Browser Support:
  • Google Chrome & Safari support WebSockets out of the box
  • Firefox 4: Set network.websocket.override-security-block to true in about:config
  • Opera: enable WebScokets in opera:config

If you want to see just a ticker updating in real time, I have created another page that uses polling as a fallback when WebSockets don't work:

http://bitcoin.clarkmoody.com/ticker/

There is also the issue of proxy servers getting confused by the unsecured WebSockets protocol. There is solid evidence that secure WebSockets (wss://) are routed properly by transparent proxy servers (maybe this is on MagicalTux's todo list already).

Whatever the case, if the site works for you, please enjoy and send a donation my way. I am in the process of developing depth of market tables for displaying the order book in real time. You can find the Order Book here: http://forum.bitcoin.org/index.php?topic=14412

"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1710819116
Hero Member
*
Offline Offline

Posts: 1710819116

View Profile Personal Message (Offline)

Ignore
1710819116
Reply with quote  #2

1710819116
Report to moderator
1710819116
Hero Member
*
Offline Offline

Posts: 1710819116

View Profile Personal Message (Offline)

Ignore
1710819116
Reply with quote  #2

1710819116
Report to moderator
EpicNoob
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 03, 2011, 07:22:38 AM
Last edit: June 29, 2011, 03:17:57 AM by DarthWader
 #2

n/a
Kolky
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 03, 2011, 10:19:46 AM
 #3

Works great! Cheesy

There's however a small visual glitch that is quite annoying; whenever you have the site open long enough the list of "Time&Sales" goes over the credits and behind the console and then on down even more. Could you put this is in an overflow box or something, with a scrollbar probably?

Cheers!
w0mbat
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile WWW
June 03, 2011, 11:48:30 AM
 #4

nice work but if u use it for a longer time the trading data is running over the credts.

*** http://btcxc.info/  <->  Your source for everything around trading & mining Bitcoins! ***
RandyMarsh
Full Member
***
Offline Offline

Activity: 237
Merit: 100



View Profile
June 03, 2011, 12:54:00 PM
 #5

That looks fucking killer! Well done! I can see all my sales going through, never realised i was selling to so many people absolutely tiny amounts.

Stan?! STAN?!?!
gongcheng
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
June 03, 2011, 02:49:41 PM
 #6

It seems to me that it doesn't work.

FooDSt4mP
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
June 03, 2011, 03:09:47 PM
 #7

It seems to me that it doesn't work.

What browser are you using?  Do you have websockets enabled?  It works fine for me in Chromium.  It would be nice if the prices were put in a div with overflow:hidden, but it's fully functional.

As we slide down the banister of life, this is just another splinter in our ass.
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 03, 2011, 03:54:21 PM
Last edit: June 03, 2011, 04:11:55 PM by Clark
 #8

Thanks for the quick feedback and the donation! I had to sleep between launching and reading the replies, but I've made some style changes.

Now (for me at least) the trades go behind the credits and console, and the console doesn't scroll up the page when the trades extend beyond the window.

BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 03, 2011, 07:15:19 PM
 #9


Click for larger image

Works in Chrome but FF 4.0.1 is too old for it...

Someone donate to this guy!
Maged
Legendary
*
Offline Offline

Activity: 1204
Merit: 1015


View Profile
June 03, 2011, 07:22:34 PM
 #10

As I've said to these sites before, they work in Firefox if you override the security block.
Set network.websocket.override-security-block to true in about:config
DO NOT ENABLE THIS IF YOU ARE BEHIND A PROXY

bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
June 03, 2011, 09:05:02 PM
 #11

You should try using pusher.com technology, its universal

Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 03, 2011, 09:37:10 PM
 #12

You should try using pusher.com technology, its universal

The compatibility issues are not on my end: MtGox does not provide a meaningful fallback to the WebSocket data feed. I know that you can poll the Trade API http addresses, but there are other issues with that. For instance, the getTrades link provides WAY too much data (a couple megabytes) each time you call it. There are thousands of trades on there now.

Ideally, MtGox could add a few api parameters so you could ask for trades from a certain trade number or date instead of getting all trades from the past 48 hrs.

I have been checking out http://socket.io/ as an alternative as well.

BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 03, 2011, 09:45:13 PM
 #13

Had this open for hours, more fun to watch than the pretty color charts Smiley
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 03, 2011, 09:59:54 PM
 #14

Had this open for hours, more fun to watch than the pretty color charts Smiley

Glad you liked it. Out of curiosity, did you update the number of output lines for the console? And what did you settle on?

BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 04, 2011, 12:23:45 AM
 #15

Had this open for hours, more fun to watch than the pretty color charts Smiley

Glad you liked it. Out of curiosity, did you update the number of output lines for the console? And what did you settle on?
30
WakiMiko
Newbie
*
Offline Offline

Activity: 59
Merit: 0



View Profile
June 04, 2011, 08:32:26 PM
 #16

works in firefox 4, just set network.websocket.override-security-block to true
dingus
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
June 05, 2011, 02:33:16 AM
 #17

Very nice. I like it!  Smiley

ding·us/ˈdiNGgəs/
Noun: Used to refer to something whose name the speaker cannot remember, is unsure of, or is humorously or euphemistically omitting
RandyMarsh
Full Member
***
Offline Offline

Activity: 237
Merit: 100



View Profile
June 08, 2011, 07:05:07 PM
 #18

has something changed with the Ticker? Im not getting the list of trades scrolling down the screen anymore?

Stan?! STAN?!?!
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 08, 2011, 09:10:54 PM
 #19

has something changed with the Ticker? Im not getting the list of trades scrolling down the screen anymore?

Not enough donations  Wink


It still works for me, on multiple computers it various locations. Did you get a 'WebSocket closed' message? How long was it running before it stopped?

RandyMarsh
Full Member
***
Offline Offline

Activity: 237
Merit: 100



View Profile
June 08, 2011, 09:29:33 PM
 #20

It worked fine for me about 22 hours ago, last time i was online, im still getting the console lines at the bottom and the trades are comming up in there like normal, its just not generating a list of the trades in the main part of the page.

PS. I sent a donation before, because this is awesome.

Stan?! STAN?!?!
Pages: [1] 2 3 4 »  All
  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!