RFC: Bitnomial DCM Integration

Date: 2026-05-24

Status: Draft, blocked on Bitnomial API/provisioning details

Background

AX is currently built as an exchange over Connamara EP3. We want to build a temporary Bitnomial Edition of AX while our own DCM is being spun up. Because this edition may only run for a few months, the preferred implementation shape is separate, copy-pasted services where that reduces abstraction work and risk.

This document summarizes the current recommendation after reviewing AX's EP3 integration seams and Bitnomial's public API documentation.

Recommendation

Build the Bitnomial Edition as separate hot-path services backed by a shared ax-bitnomial client crate. Do not do a broad EP3 abstraction refactor now.

Use this protocol split:

Reuse common AX components where practical: public SDK protocols, auth/session machinery, DB/Redis/ClickHouse helpers, transaction-engine, and risk-engine2. Copy or fork EP3-shaped services that directly encode venue behavior: order-gateway, marketdata-publisher, and fill/trade ingestion.

Why Not A Generic EP3 Adapter Refactor

AX's EP3 dependency is not isolated to one adapter. It appears in service-layer assumptions around identity, account provisioning, instruments, order lifecycle, market data, and settlement.

Important current coupling points:

Bitnomial is different enough that forcing it through EP3-shaped abstractions would create misleading compatibility:

Bitnomial Provisioning Story

The public docs do not describe an API for programmatic user or account provisioning.

What the docs do say:

What the docs do not show:

Practical AX implication: treat Bitnomial account and connection setup as an ops/admin workflow unless Bitnomial provides private APIs. Store Bitnomial account/connection mappings in Postgres, but do not assume api-gateway can provision Bitnomial users/accounts the way it provisions EP3 participants.

One Connection For Many AX Users

We would strongly prefer one Bitnomial connection that multiplexes many AX users/accounts. Public docs make this only partly viable.

The docs support one connection associated with many accounts for visibility:

However, public BTP order entry does not show per-order account routing. The BTP Open request only contains:

There is no documented account_id, clearing firm, CTI, customer capacity, or give-up field on BTP order entry. Public BTP reject reasons mention account and give-up errors, so there may be connection-level defaults or private routing configuration, but it is not documented publicly.

Practical interpretation:

This is the first question to ask Bitnomial: can one BTP order-entry connection route orders to multiple clearing accounts? If yes, where is account/give-up specified?

AX API Semantics

Keep AX's two-order replace model at the client/API boundary.

For Bitnomial:

Reject or document unsupported AX features:

Products

Initial scope is futures and perpetual futures.

Use REST /product/specs/?active=true as the product catalog source. Filter to futures and perpetual futures. Exclude options and spreads initially.

Bitnomial perpetual futures follow future-like notation with a far expiry, for example PBUCZ50. Funding rates are available through REST:

Store Bitnomial product_id as the routing key. Treat symbol as display/API identity.

Margin And Balances

Final authority is intentionally unresolved for now.

Working assumption:

Proposed Components

rs/bitnomial

Shared Bitnomial client crate:

bitnomial-order-gateway

Copied/forked from order-gateway where useful.

Responsibilities:

bitnomial-marketdata-publisher

Copied/forked from marketdata-publisher where useful.

Responsibilities:

bitnomial-fill-engine

Do not copy EP3 trade-engine literally. EP3 trade ingestion pairs both sides of the trade. Bitnomial FIX drop copy likely gives our account-side view, so fills should be single-sided and attributed through the order mapping table.

Responsibilities:

Private Or Missing Docs To Request

There is no public link to private docs. The public docs direct DMA customers to the Customer Portal and help@exchange.bitnomial.com for onboarding.

Ask Bitnomial for:

Open Questions

Initial Implementation Order

  1. Build ax-bitnomial BTP codec/session and order-entry client.
  2. Build REST product catalog and Bitnomial product mapping.
  3. Build bitnomial-order-gateway for one-connection/omnibus routing.
  4. Add FIX drop copy ingestion before production use.
  5. Add market data and funding-rate ingestion.
  6. Add reconciliation/backfill jobs.