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, as is demonstrated in this chart showing BitMEX’s growth in trading volume since its founding.

BitMex growth chart


BitMEX is a Seychelles based P2P crypto-coin trading platform.

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


Head of Products, Solutions and Innovation at Kx on Product Design and the Vision for the Future

16 Mar 2018 | , , ,

As the SVP of Products, Solutions and Innovation at Kx Systems, James Corcoran is part of a new chapter in software development at Kx. Since joining Kx parent First Derivatives as a financial engineer in 2009, James has worked around the world building enterprise systems at top global investment banks before moving to the Kx product team in London. James sat down with us recently to discuss his perspective on product design and our technology strategy for the future.

Kdb+ Utilities: Essential utility for identifying performance problems

28 Feb 2018 | ,

If you are a kdb+/q developer, you will find the utilities created by Kx Managing Director and Senior Solution Architect Leslie Goldsmith to be a valuable resource. The “Kdb+ Utilities” series of blog posts gives a quick introduction to the utilities, available at Leslie Goldsmith’s GitHub. In this third part of the series we look at Leslie’s qprof, which allows a programmer to drill down into q functions or applications to inspect performance and CPU usage in a fine-grained fashion.

kdb+ utility to search codebase

Kdb+ Utilities: Q code Workspace Utilities

6 Feb 2018 | , ,

If you are a kdb+/q developer, you will find the workspace utilities created by Kx Managing Director and Senior Solution Architect Leslie Goldsmith to be a valuable resource. This is the first in a series of blog posts that give a quick introduction to several utilities available at Leslie Goldsmith’s GitHub. In this part of the series we look at an essential tool which contains routines for summarizing and searching the contents of a workspace, ws.