7 ms·
Show HN: Binance Orderbooks Consumer in C++
- yelnatz 3y agoWindows support soon?
- nazgulsenpai 3y agoIs there any reason you couldn't use WSL for something like this?
- gumballindie 3y agoBetter yet - Linux. Why would someone want windows to snoop on their trading? Let alone the poor performance of that OS.
- RektBoy 3y agoor windows update
- m0rissette 3y agoRight? Windows should never even come into your mind. Always think Linux.
- jwestbury 3y agoLoads of quant and HFT funds run their trading software on Windows.
- gumballindie 3y agoLoads of people do silly things :-) In all seriousness use the best tool for the task at hand, but Linux is easier to fine tune for demanding loads.
- shric 3y agoCan you name some, I'm curious. I assume you mean the actual trading software not just the UIs?
- super256 3y agoWSL is linux. HyperV runs windows and linux as guests. It’s only slower if you trigger many world switches.
- jeroenhd 3y agoIt's cmake based, you can download cmake and the other dependencies and just compile it. Edit: actually no, the networking bits have some platform specific #ifdefs. The code looks not too difficult to rewrite into a WinHTTP based client, though.
- paketick 3y agoWindows will be supported. Not sure when, but likely in a month or two.
- dmaa 3y agoYou say realtime feed, but at the same time use the websocket feed that updates every 100ms as your source. Am I missing something?
- ot1138 3y agoWhew! 100ms?? Ancient history.
- paketick 3y agoYou are correct. When I referred to 'real-time', I meant it in the sense that it is as efficient as consuming data directly from the exchange's WebSocket because, during the consumption stage, data is directly consumed from the exchange, not an intermediate server. Since Binance only provides 100ms diffs, there isn’t 'real-time' in the sense of receiving each atomic orderbook change. Thank you for your feedback, I changed the description.
- rohith2506 3y ago`bookTicker` is realtime but the caveat is you will only get bbo (best bid and ask)
- Anya200 3y ago[dead]
- p0w3n3d 3y agoWhy bother? The FPGAs HFTs connected directly to fiber will trade the sh*t out of you.
- rohith2506 3y agoIn traditional finance where machines are colocated, yes. That's not the case for crypto
- posnet 3y agoThe crypto/cloud equivalent is letting market makers connect directly to the exchange front end servers via AWS VPC peer or equivalent rather than going via the public load balancers.
- anonymoushn 3y agoWe have the VPC thing for Gate but it's slower than the public thing.
- shric 3y agoAnd even in non-crypto it's not only about who is the fastest.
- dist-epoch 3y agoThere are exchanges which offer that in crypto too - Deribit has colocation in Equinix LD4.
- chinathrow 3y agoRigged markets as a service!
- loveparade 3y agoNo such thing as colo for most crypto exchanges, at least not officially. But your general point still stands. This is a cute project that's likely useless for anything serious. People go to great lengths to shave a bunch of ms off these feeds.
- nly 3y agoUsing doubles for crypto prices instead of fixed point seems like a disaster waiting to happen?
- paketick 3y agoThe orderbook class uses original strings received from the exchange as keys. However, in some places, numbers are compared with a precision of 1e-12 as long doubles. I plan to modify this to use the symbols' price step from exchangeInfo.
- virtualritz 3y ago> Using doubles for crypto prices instead of fixed point seems like a disaster waiting to happen? TDLR; nope. That depends what you use the incoming data for. Bookkeeping, yeah. And that's about it. This doesn't look like it was meant for that. Some sort of trading where you track a bunch of indicators over a day (not HFT at their timings at the moment but along those lines): you absolutely want to avoid fixed point because of the speed penalty. See also [1]. [1] https://news.ycombinator.com/item?id=15808316 https://news.ycombinator.com/item?id=15808316
- bnastic 3y agoIndeed. Although I don't know what precisions are required in crypto products, in traditional trading an 8 byte double is quite enough - the price submitted will have to be rounded to the instrument's precision anyway (e.g. most spot FX products are rounded to 5 decimal places). With a caveat here, after a very quick look at the code: The price here is defined as long double, which can be different among platforms... My Mac/clang says that long double is still 8 bytes, Linux on that same arm64 machine says it's 16 bytes (and I'm not sure what that's mapped to these days - 80bit FPU instructions, or some Float128 representation)
- VHRanger 3y agoI think it's down the list among several dozen other issues for accurate crypto pricing on binance
- dist-epoch 3y ago
- daveed 3y agoIsn't binance going away? Feels like they're going under heavy pressure and are getting restricted everywhere.
- landoftheice 3y ago[dead]