Bitcoin derivatives exchange with kdb+

Use Case: Kdb+ integral to BitMEX Bitcoin derivatives exchange growth strategy

27 Sep 2017 | , , , , ,
Share on:

The Bitcoin Mercantile Exchange, or BitMEX, was launched in 2014 as one of the first Bitcoin derivatives exchanges. The founders of BitMEX, experienced securities traders and engineers, understood that investing in the right technology at the start would be key to their success. Anticipating fast growth, their trading infrastructure needed to be robust, flexible and scalable.

The kdb+ advantage

Having worked with kdb+ for almost a decade as an equities trader, co-founder Arthur Hayes knew that kdb+, with its built-in programming language q, would give them a competitive edge in the nascent cryptocurrency derivatives market.

Co-founder Ben Delo also worked extensively with kdb+ at financial institutions where he built trading systems. He recognized that with kdb+ he could build a system architecture for BitMEX faster than in Java or any other programming language, because it is so powerful, productive and expressive.

Based on his experience, Ben knew that with kdb+ and q he could build a trading system layer that could submit either 100 orders or one order at once, and process both at the same time effectively. This is because kdb+ is a vector-based language that can book all orders, in bulk and batch operations, at the same time. Other systems don’t atomically update their systems in bulk. Additionally, with kdb+ Ben was able to easily join one accounting system to another.

BitMEX credits kdb+ for how it has been able to establish a reputation in its industry for reliability and accuracy. BitMEX’s numbers are correct all of the time because of how the kdb+ platform is designed, removing the possibility of issues like negative balances and rounding errors.

BitMEX also distinguishes itself at the speed with which it is creating new products. Taking advantage of the dynamic nature of kdb+, they have built a platform that can easily be modified on the fly. With kdb+ they can manually change functions without having to break down the whole system. For example, they can download a key change, or add new features live. This is an important element of the correctness of their system.

With kdb+ BiMEX can sum up every order position in the system every time a client places an order. This means they can guarantee the integrity of the system during the whole trading process, making sure every penny is in place. This level of certainty is essential for BitMEX because they offer up to 100x leverage on their products.


Today, BitMEX is the world’s most advanced Bitcoin derivatives exchange and API. After three years BitMEX’s monthly trading volume exceeds US$4,000,000,000 of derivatives products, and continues to expand at a high rate. They anticipate $1 billion average daily volume by the end of their fourth year of operations.

BitMEX is known in the industry as one of the most innovative trading platforms, creating products faster than anyone else, with the help of kdb+. Despite the success of the cryptocurrency industry in attracting investors over the past eight years, in general Bitcoin exchanges lag capital markets exchanges in the sophistication of their trading technology. This knowledge gap, and their kdb+ implementation in particular, has given BitMEX a critical edge over their competition.

BitMex growth chart BitMEX growth in trading volume since its founding

© 2017 Kx Systems
Kx® and kdb+ are registered trademarks of Kx Systems, Inc., a subsidiary of First Derivatives plc.


Kx collaborating with Fintech startup chartiq

Collaboration: The Dominant Trend in Finance

13 Dec 2017 | , , , ,

In December we are re-blogging some of our favorite content from Kx partners and affiliated companies, starting with this article on the ChartIQ blog. ChartIQ is an agile FinTech company that sells an advanced HTML5 charting library used in technical data analysis, trading configurations and for charting in the capital markets industry. Kx offers a ChartIQ integration as an addition to our Dashboards. In “Collaboration: The Dominant Trend in Finance,” ChartIQ’s Hanni Chehak writes about the rise of FinTech companies, and the role collaboration plays as FinTech companies are increasingly disrupting the traditional banking sector.

Water system workers with kdb+ historical database

Kdb+ Use Case: Machine Learning Water System Maintenance Application

6 Dec 2017 | , , , ,

Kdb+ is being used much more widely in machine learning applications today. Its ability to quickly ingest and process data, particularly large, fragmented datasets, is one way that developers are adding kdb+ to their technology stack of artificial intelligence and machine learning tools.
For Australian kdb+ developer Sherief Khorshid, who also develops machine learning systems, incorporating kdb+ into a predictive maintenance application gave him the edge in a hackathon win that landed him a cash prize and a contract with the Water Corporation of Western Australia.

kdb+ FFI

Kdb+ FFI: Access external libraries more easily from q

22 Nov 2017 | , , ,

Following on from the hugely popular Python library and interface embedPy and PyQ, Kx has released an FFI as part of the Fusion for kdb+ interfaces. As with embedPy and PyQ, this FFI is open-sourced under the Apache 2 license.
The kdb+ FFI is a foreign function interface library for loading and calling dynamic libraries from q code. It has been adapted and expanded upon from a library originally written by Alex Belopolsky of Enlightenment Research. With the kdb+ FFI you can now call your favorite C/C++ libraries directly from q without the overhead of having to compile shared objects and load into q using the 2: command.