Product documentation ยท v1.0

HX Africa Docs

The complete guide to the HX Africa real-estate exchange โ€” from how a property becomes a listing (created by an admin and verified by an independent custodian) to how it trades on a price-time-priority matching engine, and how to build on the API.

Introduction

HX Africa is a real-estate exchange where landmark African properties are tokenized into fungible shares and traded against the Nigerian Naira (NGN) on an institutional-grade order book โ€” the same market structure a top crypto exchange uses, applied to bricks and mortar.

A property only becomes tradeable after a controlled onboarding process: an admin creates the listing and an independent custodian verifies the underlying asset, legal title, valuation and custody arrangements before a single token is minted. Once approved, the market opens and price is discovered continuously on the order book.

๐Ÿ™๏ธ

Tokenized property

Each building is divided into millions of fungible, tradeable tokens backed 1:1 by SPV shares.

๐Ÿ›ก๏ธ

Custodian-verified

Nothing lists until an independent custodian verifies title, valuation and custody.

๐Ÿ“ˆ

Live order book

Continuous price-time-priority matching with limit, market, IOC and FOK orders.

๐Ÿ’ฐ

Real yield

Token holders receive a pro-rata share of net rental income.

System architecture

HX Africa separates the control plane (listing, verification, custody) from the trading plane (matching, market data, settlement). The two meet only at one gate: a market cannot open until its listing is Live.

Admin ConsoleCreate & manage listings
Custodian PortalVerify & sign off assets
ComplianceKYC / AML / disclosures
Matching EnginePrice-time priority book
Market DataKlines, depth, trade tape
REST + WebSocket APIRead & trade access

The matching engine is deliberately single-threaded and deterministic: all book mutations are serialised through one logical sequence so ordering is reproducible and auditable. Everything time-based (candles, 24h stats) lives in a separate market-data layer.

Core concepts

  • Listing โ€” the record of a property being onboarded, moving through a defined state machine before it can trade.
  • Market โ€” a tradeable, live listing identified by a symbol such as EKO/NGN (base token / quote asset).
  • Token โ€” one fungible share of a property, backed 1:1 by a share in its SPV. Quantities are whole tokens.
  • Price โ€” quoted in NGN. On the wire, prices are integer kobo (a token worth โ‚ฆ12.50 has price 1250), so money math is exact.
  • Maker / Taker โ€” a maker rests liquidity on the book; a taker crosses the spread to consume it.
๐Ÿ’ก

Working in integers means the engine never rounds โ€” a kobo is always a kobo, and every fill reconciles exactly against custody.

Roles & responsibilities

Onboarding a property is a separation-of-duties process. No single party can both create and approve a listing.

Admin HX Africa

  • Creates and edits listing drafts
  • Uploads the property document pack
  • Submits listings for verification
  • Operates the exchange & configures fees

Custodian Independent

  • Verifies title, valuation & SPV structure
  • Holds legal title & tokens in segregated custody
  • Signs off (or rejects) each listing
  • Safeguards client assets & cash

Issuer Property SPV

  • Legal owner of the property
  • Provides deeds, valuations, insurance, rent roll
  • Bankruptcy-remote from HX Africa

Investor Trader

  • Completes KYC, funds an account
  • Buys / sells tokens on the order book
  • Receives pro-rata rental distributions

An independent Auditor periodically reconciles minted tokens against SPV shares and reviews valuations.

Listing lifecycle

A property moves from an admin draft to a live market through the following stages. Each transition is recorded with an actor, a timestamp and an immutable audit entry.

1

Draft created Admin

An admin creates a listing in the Admin Console: property details, city/country, appraised value, proposed token supply, reference price, target yield, and the supporting document pack (title deed, valuation, SPV formation, insurance, rent roll).

2

Submitted for verification Admin

The completed draft is submitted to the custodian. The listing locks to editing and enters the custodian's verification queue.

3

Custodian verification Custodian

The independent custodian verifies legal title, the third-party valuation, the SPV structure and the 1:1 share-to-token mapping, insurance and occupancy, and the issuer's KYC. Any failure returns the listing to the admin as Rejected with reasons.

4

Compliance review Compliance

KYC/AML and regulatory checks are completed and investor disclosures (risk, fees, valuation cadence) are finalised and published.

5

Approved & signed off Custodian

The custodian cryptographically signs the approval. The listing is now cleared for tokenization.

6

Tokenized & funded Custodian

Tokens are minted 1:1 against SPV shares and placed under custody. Opening liquidity is seeded and the reference price is set.

7

Market live System

The market opens for trading. Price is discovered continuously on the order book; market data begins streaming over REST and WebSocket.

๐Ÿ”’

Two-key rule: an admin creates and submits a listing, but only the custodian can approve it. The exchange will refuse to open a market whose listing is not custodian-signed and Live.

Custodian verification

Before sign-off, the custodian works through a fixed checklist. Verification is all-or-nothing: every item must pass, or the listing is rejected with an itemised reason.

  • Legal title โ€” deed authenticity, registered owner, and a clean encumbrance/lien search.
  • Independent valuation โ€” a third-party appraisal within tolerance of the listed appraised value.
  • SPV structure โ€” a bankruptcy-remote vehicle whose cap table maps 1:1 to the proposed token supply.
  • Insurance & condition โ€” current insurance coverage and a satisfactory building condition report.
  • Rent roll & occupancy โ€” verified tenancy schedule supporting the stated occupancy and yield.
  • Issuer KYC/AML โ€” beneficial-owner identification and sanctions screening of the issuer.
  • Custody arrangement โ€” confirmation that title and tokens will be held segregated and insured.

The signed verification record (checklist results, appraisal reference, custodian signature and timestamp) is retained and surfaced in the property's public disclosures.

Listing states

Every listing is governed by an explicit state machine. Only the roles shown may trigger each transition.

StateMeaningNext
draftBeing prepared by an admin.submitted
submittedIn the custodian's verification queue.verifying
verifyingCustodian working the checklist.rejected ยท compliance
rejectedFailed verification; returned to admin with reasons.draft
complianceKYC/AML & disclosures being finalised.approved
approvedCustodian-signed; cleared to tokenize.tokenized
tokenizedTokens minted; liquidity seeded.live
liveOpen for trading on the order book.suspended ยท delisted
suspendedTrading paused (revaluation, corporate action).live ยท delisted
delistedRedeemed / wound down; tokens burned.โ€”
// Example listing record
{
  "symbol": "EKO/NGN",
  "status": "live",
  "issuer_spv": "Eko Atlantic Tower SPV Ltd",
  "appraised_value": 72000000000,
  "total_tokens": 3840000,
  "reference_price": 1875000,
  "verification": {
    "custodian": "HX Custody Trust",
    "signed_at": "2026-07-30T09:14:00Z",
    "checklist_passed": true
  }
}

Tokenization & minting

On approval, the custodian mints exactly total_tokens units โ€” one token per SPV share โ€” and holds them in segregated custody. The invariant tokens_minted == spv_shares is enforced at mint time and reconciled by the auditor. Tokens are only ever created through this path; the exchange itself cannot mint.

Opening liquidity is seeded around the reference price so the book has depth on day one, and price discovery takes over from there.

Corporate actions

  • Revaluation โ€” periodic third-party appraisals update the reference valuation; the market may be briefly suspended around a revaluation.
  • Rental distribution โ€” net rental income is distributed pro-rata to holders of record on a snapshot date.
  • Suspension โ€” the custodian or admin can pause trading for a corporate action or investigation.
  • Delisting โ€” on sale or wind-down of the underlying asset, tokens are redeemed and burned, closing the market.

Matching engine

The engine matches orders with price-time priority:

  • Price priority โ€” orders that improve the price match first.
  • Time priority โ€” among orders at the same price, the earliest to arrive matches first (FIFO).

Trades always execute at the maker's resting price โ€” the passive order sets the price and the aggressor accepts it. A taker sweeps as many price levels as needed until it is filled or its limit is reached.

Data structures

Each side of the book is a BTreeMap<Price, VecDeque<Order>>: the sorted map exposes best bid/ask in O(log n), and the per-price queue preserves arrival order for time priority. A hash index maps every resting order id to its (side, price) so cancellation is O(log n) rather than a scan.

Worked example

Book asks:  101 ร— 5   (maker A, earlier)
            101 ร— 5   (maker B, later)
            105 ร— 5

Taker: BUY 8 @ limit 110
 โ†’ fill 5 @ 101 against A   (price then time priority)
 โ†’ fill 3 @ 101 against B
 โ†’ 0 remaining; taker fully filled at the makers' prices.

Order types & time-in-force

FieldValuesMeaning
typelimit, marketLimit executes at a price or better; market takes the best available, ignoring price.
time_in_forceGTC, IOC, FOKGood-'til-cancelled (rest the remainder), Immediate-or-cancel (cancel the remainder), Fill-or-kill (fill fully or reject).
sidebuy, sellWhich side of the book.

Behaviour by combination

  • Limit + GTC โ€” matches what it can; any remainder rests on the book.
  • Limit + IOC โ€” matches what it can immediately; the remainder is cancelled.
  • Limit + FOK โ€” only executes if the entire quantity can fill immediately; otherwise rejected with no fills.
  • Market + IOC โ€” sweeps the opposite side until filled or liquidity is exhausted; never rests.

Order lifecycle

Every submission returns an execution report whose status is one of:

StatusDescription
filledFully executed; nothing rests.
partially_filledSome filled; the remainder rests (GTC limit).
restingNothing filled; the order now rests on the book.
cancelledUnfilled remainder cancelled (IOC, or a market order out of liquidity).
rejectedRejected before any fills (FOK not fully fillable, or invalid input).

Order book & depth

The order book aggregates resting quantity by price into levels, returned best-first per side and depth-limited by the depth query parameter. The exchange UI renders cumulative depth bars, the spread (absolute and in basis points), and the mid price.

Market data

Executed trades form the tape, aggregated into OHLCV candlesticks (klines) at 1m, 5m, 15m, 1h, 4h and 1d intervals, plus rolling 24-hour statistics: last price, signed change, high, low, base volume and quote volume.

Fees & settlement

A taker fee of 0.10% of trade value applies to liquidity-taking fills; resting (maker) orders are not charged in this model. Fees and the order's notional value are shown in the order form before submission.

Settlement is atomic with matching: on each fill, base tokens and quote NGN move between the counterparties' custodied balances in the same operation, so positions and cash always reconcile against custody.

Custody model

Client tokens and cash are held by an independent, regulated custodian, segregated from HX Africa's own funds and insured. The custodian also holds legal title to each property's SPV, which is what gives the tokens real economic backing rather than being a mere IOU.

KYC & AML

Both issuers and investors are identity-verified. Investors complete KYC before funding; issuers undergo beneficial-owner identification and sanctions screening as part of listing verification. Ongoing transaction monitoring applies to both sides.

SPV structure

Each property is owned by its own bankruptcy-remote special-purpose vehicle. Isolating each asset in a dedicated SPV means a problem with one property โ€” or with HX Africa itself โ€” does not put other assets or client holdings at risk. The SPV's share register maps 1:1 to the token supply.

Audits & transparency

  • Independent audits reconcile minted tokens against SPV shares.
  • Live order books and a public trade tape make price formation observable.
  • Valuation reports and the custodian's signed verification record are published per property.

Risk factors

Real-estate tokens carry risk: property values and rents can fall, occupancy can drop, liquidity can be thin for individual markets, and tokenized assets may be less liquid than listed equities. Nothing in this documentation is investment advice.

REST API

Base path /api. Prices are integer kobo; quantities are integer tokens. The public API is read & trade only โ€” listing, verification and custody actions are performed off the public API through the Admin Console and Custodian Portal.

MethodPathPurpose
GET/api/healthLiveness probe
GET/api/marketsAll live markets + 24h stats
GET/api/markets/:symbolOne market (metadata + stats)
GET/api/book/:symbol?depth=NOrder-book snapshot
GET/api/klines/:symbol?interval=&limit=OHLCV candles
GET/api/trades/:symbol?limit=NRecent trades
POST/api/ordersSubmit an order
DELETE/api/orders/:symbol/:idCancel a resting order

Submit an order

curl -X POST http://localhost:8080/api/orders \
  -H 'Content-Type: application/json' \
  -d '{
    "symbol": "EKO/NGN",
    "side": "buy",
    "type": "limit",
    "price": 1250,
    "quantity": 100,
    "time_in_force": "GTC"
  }'
{
  "order_id": 1000,
  "symbol": "EKO/NGN",
  "status": "partially_filled",
  "filled_quantity": 40,
  "remaining_quantity": 60,
  "trades": [ { "price": 1249, "quantity": 40, "taker_side": "buy" } ]
}

Data types

FieldTypeNotes
priceintegerNGN kobo. Required for limit orders; omitted for market.
quantityintegerWhole tokens, > 0.
sidestringbuy | sell
typestringlimit | market
time_in_forcestringGTC | IOC | FOK (default GTC)
client_order_idstring?Optional; echoed back in reports.

Errors

Validation and routing errors return a JSON body with an error field. Business rejections (e.g. FOK that can't fully fill) come back as a normal execution report with status: "rejected" and a reject_reason.

HTTPWhen
200Order accepted (may still be rejected in-body by business rules).
400Malformed request or unknown kline interval.
404Unknown symbol, or cancelling an order that isn't resting.

WebSocket feed

Connect to /api/ws for a live stream of execution reports. Messages containing trades drive the price, chart and trade tape in real time.

const ws = new WebSocket(`ws://${location.host}/api/ws`);
ws.onmessage = (e) => {
  const report = JSON.parse(e.data);
  report.trades.forEach(t => console.log(t.price, t.quantity, t.taker_side));
};

Running locally

# build & test
cargo test

# run the exchange (API + UI on :8080)
cargo run

# custom port
PORT=8099 cargo run

Open http://localhost:8080/ for the landing page and /exchange.html for the trading terminal. On startup the server seeds demo markets, price history, a two-sided book, and a background market-maker. In production these markets would instead originate from the admin-listing / custodian-verification workflow described above.

Tokenomics & yield

  • Appraised value โ€” independent valuation of the whole asset.
  • Tokens issued โ€” fixed supply, equal to SPV shares.
  • Implied market cap โ€” last token price ร— supply.
  • Net rental yield โ€” projected annual net income as a % of value.
  • Occupancy โ€” share of the asset currently let.

Glossary

TermDefinition
SPVSpecial-purpose vehicle; a bankruptcy-remote company that owns a single property.
CustodianIndependent, regulated party that verifies assets and safeguards client tokens and cash.
Maker / TakerA maker rests liquidity; a taker crosses the spread to consume it.
KlineAn OHLCV candlestick over a fixed time interval.
TIFTime-in-force โ€” how long an order stays active (GTC/IOC/FOK).

Disclaimer

โš ๏ธ

This is a demonstration environment. Market data is synthetic and the listed properties are illustrative โ€” nothing here is an offer of securities or investment advice.