Bitcoin Forum
May 09, 2024, 06:53:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 »  All
  Print  
Author Topic: Real Time MtGox Order Book  (Read 26716 times)
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 10, 2011, 07:13:11 AM
Last edit: November 10, 2011, 08:31:53 PM by Clark
 #1

The second installment of WebSockets-enabled MtGox market data is here:

http://bitcoin.clarkmoody.com/

Update: MtGox now broadcasts with socket.io, which provides increased compatibility and maintains real time data streaming.

You should be able to view the order book in real time, with all bid and ask entries posted. The price grouping feature in the Controls section allows you to view the size of all orders within the corresponding price range. You may select a few different intervals on which to group prices. The service is set to show up to 1000 entries on each side of the market.

There is a calculator at the top of the screen that allows you to specify how many BTC you want to sell or USD you want to spend, and it tells you what the estimated outcome of that trade would be (in a market order sense).

The slippage field is a measure of how much profit you lose by selling at the market. For instance if the inside bid is for 10.00 and I have 100 BTC to sell, I should make $1000, right? Wrong. You only make $1000 if there are 100 BTC on that inside bid. If not, you have experience slippage due to accepting lower prices for the BTC greater than the size of the inside bid.

Please enjoy, and remember to donate Wink It keeps me motivated.


In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
June 10, 2011, 10:27:27 AM
 #2


nice!

When I looked at the site, I thought I'm seeing my own python app.



very similar display of depth data.

One differency strikes me, though: you're ordering the asks the other way around than me.

I think having the lowest ask at the bottom makes sense: You have the bids coming down on the left and the asks going back up on the right. So it's shaped like a "U" with the lowest point of the U being where the action is.

So by looking at the last line, you can already tell what the lowest ask and highest bids are. With your ordering, I have to look at the last and the first line.. confuses the hell out of me. While that's probably because I'm used to my own ordering, I would still like to suggest you think about this and maybe change it.

Thanks for your work, Clark, it's really pretty cool.

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

Activity: 700
Merit: 500



View Profile
June 10, 2011, 10:31:20 AM
 #3

Some of the numbers in the "Sum" columns are white, while the rest are gray. Does that mean anything?

EDIT: Never mind, those are on the round price numbers 26,27 etc.

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

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 10, 2011, 02:40:35 PM
 #4


One differency strikes me, though: you're ordering the asks the other way around than me.

I think having the lowest ask at the bottom makes sense: You have the bids coming down on the left and the asks going back up on the right. So it's shaped like a "U" with the lowest point of the U being where the action is.

So by looking at the last line, you can already tell what the lowest ask and highest bids are. With your ordering, I have to look at the last and the first line.. confuses the hell out of me. While that's probably because I'm used to my own ordering, I would still like to suggest you think about this and maybe change it.


I based my ordering on two things. First, I wanted to list all of the orders I got (up to 1000), and it would be really inconvenient to scroll all the way to the bottom to see the strike price. Second, I have only ever seen an order book listed with strike prices at the top (on professional trading software).

I'm glad you like it!

bitoption
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile WWW
June 10, 2011, 02:46:09 PM
 #5

Clark, looks really nice!

AtomicTrader
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
June 10, 2011, 03:10:01 PM
 #6

What would be really cool is a graphical representation of the order book, sort of like an equalizer on a stereo.
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 10, 2011, 03:22:29 PM
 #7

What would be really cool is a graphical representation of the order book, sort of like an equalizer on a stereo.

Others have already done this. I don't know the links right now, but you could search for them on the forum.

bitoption
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile WWW
June 10, 2011, 06:57:31 PM
 #8

Websockets are down. I am sad.
zhalox
Full Member
***
Offline Offline

Activity: 176
Merit: 106


XMR = BTC in 2010. Rise chikun.


View Profile
June 10, 2011, 07:04:55 PM
Last edit: June 11, 2011, 01:46:13 AM by zhalox
 #9

Yes, for some reason all my websockets are down, and my live SierraChart feed stopped working too, right when the Mt. Gox prices crashed.  The Mountain of Gox has fallen, and I am sad too Cry

wahbasah
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
June 10, 2011, 07:07:30 PM
 #10

~

edit: oops.. appearently websockets are down
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 14, 2011, 05:24:55 AM
 #11

I've gone in and updated the code to be more careful about keeping the depth table honest. Some earlier versions seemed to let a series of quick trades get the depth table all out of whack (since the WebSocket sends deltas instead of absolute sizes at each price).

So you should see some 'Fixing depth table.' messages in the console when a ticker update comes in that disagrees with the current inside bids and asks.

jaybny
Sr. Member
****
Offline Offline

Activity: 410
Merit: 250


Proof-of-Skill - protoblock.com


View Profile WWW
June 15, 2011, 01:29:41 PM
 #12

anyway to see the full book all the way up and all the way down?

ty

Protoblock turns knowledge of American football into Fantasybit coin, a margin token used to monetize leveraged skill.

https://twitter.com/jaybny/status/1022596877332762624
aandreas
Member
**
Offline Offline

Activity: 116
Merit: 10



View Profile
June 15, 2011, 03:51:43 PM
 #13

hi clark. i stumbeld upon ur time & sales site a few days ago. tried it several times in the last days, but doesnt´t show anything. same with the new time & sales site. it says opening websocket, and about 10 sec later websocket closed.

my sierrachartfeed is running the whole time.

is there a regulation of users on ur site, or something? or some geoip thing? i am from germany.

or is it because i only use chrome for this and mtgoxlive and google wants me to open a gmailaccount andor browse other sites so they can track me  Grin
YoYa
Hero Member
*****
Offline Offline

Activity: 809
Merit: 501


Always verify deals with me through my public key!


View Profile WWW
June 15, 2011, 07:38:02 PM
 #14

Clark,

Just to say thanks, your page is the BIZ!

Have sent a small donation already, will be happy to do so again should business be good.
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 15, 2011, 07:42:03 PM
 #15

@jaybny: I have added a select box control that allows you to change the number of rows of the depth table displayed, all the way up to 1000. This should allow you to see the whole table, potentially at the expense of JavaScript performance.

@aandreas: It seems that you might be behind some sort of transparent proxy that cannot handle the WebSocket protocol handshake properly. There are no regulations from me on this. As I've pointed out other places, if MtGox implements the Secure WebSockets protocol, it will fix many of these compatibility issues.

@YoYa: Thank you for the donation!

hlksis
Jr. Member
*
Offline Offline

Activity: 55
Merit: 3


View Profile
June 17, 2011, 10:26:20 AM
 #16

Nice project. Which technology is behind your online order book? Are you using something like Socket.IO (+node.JS)?
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 17, 2011, 03:56:39 PM
 #17

I am not using Socket.IO. I simply used the built-in WebSocket object and jQuery to run everything else.

cronopio
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
June 18, 2011, 04:12:55 PM
 #18

Hi Clarck

First, Thanks for that great site!!!

Second, Today i cant load the orders list. In the console bottom said "Buffering Ask" or "Buffering Bid". What this buffering thing?

I leave the window open for a while if at some time filled the buffer and showed me something but nothing.

Are you doing new improvements??

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

Activity: 548
Merit: 502


So much code.


View Profile WWW
June 18, 2011, 05:11:00 PM
 #19

There is some IP switching going on with the server, so after that finishes it should be back.

cronopio
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
June 18, 2011, 05:15:21 PM
 #20

Great!!! Thanks a lot.

Thanks for your quick reply!!
Pages: [1] 2 3 4 5 6 »  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!