Protocol-level order matching

XDEX Trading Engine module powers a protocol-based marketplace function built on top of the consensus and operations layer of the XDEX Network blockchain.

It is a native, protocol-level application feature that does not rely on user defined code execution, as all functionality is built into the protocol node software itself.

The XDEX Trading Engine permits XDEX Network Authorized Users to create limit orders to trade different digital assets on the XDEX Network blockchain. When an Authorized User creates a trade, it is placed on a market. The market tracks all open and filled orders for a certain trading pair and tracks the last price and 24h volume. XDEX Trading Engine supports an arbitrary number of markets (as well as assets). Any order is matched within the engine logic by the criteria of best price and time of creation once a fitting order is created. The orders can be partially filled, with the remainder remaining in an open position. A user also has the option to create a fill-or-kill order that must be matched on creation. Authorized Users may also cancel open orders at any time.

Order book

The XDEX Trading Engine order book is enabled by user signed operations that create and cancel limit orders. The user must properly sign a valid create limit order operation in order to create a limit order. The operation is considered valid if the user has enough verified funds to create the order. Once the operation is executed, the XDEX Trading Engine will attempt to match the order. This is NOT tied to block creation or the consensus mechanism of confirming transactions. 

The XDEX Trading Engine will proceed to search all limit orders for a given market pair sorted by price ratio and time of creation. If a match is made, and the order is fully filled, the XDEX Trading Engine will exchange the assets between trading accounts, swapping the appropriate amounts of tokens to complete the trade.

If the order is partially matched, or if it is not matched, a unique order object is created on the global share state, and the authorized user is notified of its id. This unique order object contains the information about the amount and type of tokens to sell, as well as the minimal amount to receive. The values are equal to the original values input by the user in the create limit order operation if the order was not filled, or they are adjusted to match the partial filling of the order if a match has happened, but the order was not fully filled. 

This object persists in the state until it is either filled entirely by another created limit order or cancelled by the authorized user. The user may cancel an open limit order by properly signing a valid cancel limit order operation. The operation is valid if it contains an id of an existing limit order object and is signed by the creator of the object (and the limit order itself).

An important thing to note is that trades are executed immediately, regardless of confirmation. To achieve additional confidence, the user may wish to wait for a confirmed limit order to appear, meaning only such order that was confirmed in a block, and then trade in accordance with the confirmed order.

Depending on the jurisdiction, asset class, and token, there are potential regulatory issues that require XDEX Business Rule Engine to ensure the regulatory compliance of a particular trade operation and venue between Authorized Users.

For example, securities are only legally tradable through a licensed securities exchange. In this case, the entire XDEX Trading Engine and tokens constituting securities would only be activated for active order trading through a licensed securities exchange or broker dealer operating as an ATS (Alternative Trading System) with regulatory approval.

More XDEX capabilities

Asset Transfers & Payments

XDEX has the ability to send and receive assets to and from any account on the network. Each account can send tokens from their authenticated network wallet to any other named wallet account across the XDEX Network within seconds.


Blockchain Ledger

The core production XDEX Network blockchain is a decentralized protocol based on Delegated Proof of Stake consensus (DPoS).


Document Types

The basic unit of record data in XDEX is the document type, which gets assigned to each document loaded into the network.


Event Logging

XDEX logs and hashes every discreet event at every level across the network to provide immutable tracking of who did what, when, and where.


Key Management & Custody

XDEX has a robust certificate-based key management system that provides users with the ability to import and manage public and private keys for key signing and access control function.



Metadata defines extended information about documents and data objects that enables powerful functions and capabilities.


OCR Processing

XDEX can be configured to automatically runs basic OCR (optical character recognition) on documents imported into the system.



The XDEX Advanced Search system allows network-wide searching of documents, document content, vaults, metadata, users and more.


Trading Engine

XDEX Trading Engine module powers a protocol-based marketplace function built on top of the consensus and operations layer of the XDEX Network blockchain.


Workflow States & Transitions

With the addition of state actions and transition triggers, the workflows in XDEX are no longer just informative but can be part of your actual business automation process.