Skip to main content
Version: nightly

AX Exchange

AX Exchange is the world's first centralized and regulated exchange for perpetual futures on traditional underlying asset classes. Operated by Architect Bermuda Ltd. and licensed by the Bermuda Monetary Authority (BMA), AX brings crypto-style perpetual contracts to traditional financial markets including foreign exchange, metals, energy, equity indices, and interest rates.

This integration supports live market data ingest and order execution with AX Exchange.

Examples

You can find live example scripts here.

Overview

This guide assumes a trader is setting up for both live market data feeds, and trade execution. The AX Exchange adapter includes multiple components, which can be used together or separately depending on the use case.

  • AxHttpClient: Low-level HTTP API connectivity.
  • AxMdWebSocketClient: Market data WebSocket connectivity.
  • AxOrdersWebSocketClient: Orders WebSocket connectivity.
  • AxInstrumentProvider: Instrument parsing and loading functionality.
  • AxDataClient: A market data feed manager.
  • AxExecutionClient: An account management and trade execution gateway.
  • AxLiveDataClientFactory: Factory for AX data clients (used by the trading node builder).
  • AxLiveExecClientFactory: Factory for AX execution clients (used by the trading node builder).
note

Most users will define a configuration for a live trading node (as below), and won't need to necessarily work with these lower level components directly.

AX Exchange documentation

AX Exchange provides documentation for users which can be found at the Architect documentation site. It's recommended you also refer to the AX Exchange documentation in conjunction with this NautilusTrader integration guide.

Products

AX Exchange specializes in perpetual futures contracts on traditional asset classes. Perpetual contracts never expire, eliminating rollover costs associated with standard futures.

Asset ClassExamplesNotes
Foreign exchangeGBPUSD-PERP, EURUSD-PERP.Major and minor FX pairs.
Stock indicesEquity index perpetuals.
MetalsXAU-PERP (gold), XAG-PERP (silver).Precious metals perpetuals.
EnergyCrude oil, natural gas.Energy commodity perpetuals.
Interest ratesSOFR, treasury yields.Rate perpetuals.
info

All instruments on AX Exchange are perpetual futures using a netting account model with cross-margin. The adapter uses MARGIN account type and NETTING order management.

Symbology

AX Exchange uses a straightforward naming convention. All instruments are perpetual futures identified by the -PERP suffix appended to the underlying asset symbol.

Format: {SYMBOL}-PERP

UnderlyingAX SymbolNautilus InstrumentId
GBP/USDGBPUSD-PERPGBPUSD-PERP.AX
EUR/USDEURUSD-PERPEURUSD-PERP.AX
GoldXAU-PERPXAU-PERP.AX
SilverXAG-PERPXAG-PERP.AX

The venue identifier is AX. To construct a Nautilus InstrumentId:

from nautilus_trader.model.identifiers import InstrumentId

instrument_id = InstrumentId.from_str("GBPUSD-PERP.AX")

Environments

AX Exchange provides two trading environments. Configure the appropriate environment using the environment parameter in your client configuration.

EnvironmentConfigDescription
Sandboxenvironment=AxEnvironment.SANDBOXTest environment with simulated funds.
Productionenvironment=AxEnvironment.PRODUCTIONLive trading with real funds.

Sandbox

The default environment for development and testing with simulated funds.

config = AxExecClientConfig(
environment=AxEnvironment.SANDBOX,
)

Production

For live trading with real funds. Requires a verified AX Exchange account.

config = AxExecClientConfig(
environment=AxEnvironment.PRODUCTION,
)
warning

Ensure you are using the correct environment before placing orders. The sandbox environment is the default to prevent accidental live trading.

Market data

The adapter provides real-time market data via WebSocket subscriptions, with HTTP endpoints for historical data backfill.

Data types

AX DataNautilus Data TypeNotes
Order book (L1)QuoteTickBest bid/ask top-of-book from L1 book subscription.
Order book (L2)OrderBookDeltaAggregated price levels.
Order book (L3)OrderBookDeltaIndividual order quantities.
TradesTradeTickReal-time trade events from L1 subscription.
Bars/candlesBarOHLCV data (total volume only, no buy/sell breakdown).
Funding ratesFundingRateUpdatePolled via HTTP every 15 minutes (not real-time WebSocket).
note

Historical quote tick requests are not supported by AX Exchange. Only real-time quote data is available via WebSocket L1 book subscriptions.

Bar intervals

IntervalDescription
1s1-second
5s5-second
1m1-minute
5m5-minute
15m15-minute
1h1-hour
1d1-day

Orders capability

AX Exchange supports market and limit order types with stop triggers.

Order types

Order TypeSupportedNotes
MARKETExecute immediately at best available price.
LIMITExecute at specified price or better.
STOP_LIMITTrigger a limit order when stop price is breached.
LIMIT_IF_TOUCHED-Not currently implemented by AX Exchange.
STOP_MARKET-Not supported.
MARKET_IF_TOUCHED-Not supported.
TRAILING_STOP_MARKET-Not supported.

Execution instructions

InstructionSupportedNotes
post_onlyMaker-only; rejected if order would take liquidity.
reduce_only-Not supported.

Time in force

Time in ForceSupportedNotes
GTCGood Till Canceled.
GTDGood Till Date.
DAYValid until end of trading day.
IOCImmediate or Cancel.
FOKFill or Kill.
AT_THE_OPENExecute at market open or expire.
AT_THE_CLOSEExecute at market close or expire.

Advanced order features

FeatureSupportedNotes
Order modification-Not supported by AX. Cancel and resubmit instead.
Cancel orderSingle order cancellation.
Cancel all ordersCancel all open orders for an instrument.
Batch cancelCancel multiple specified orders.
Order listsSequential submission (orders submitted individually, non-atomic).

Position management

FeatureSupportedNotes
Query positionsReal-time position updates.
Position mode-Netting mode only.
Cross marginCross-margin across all instruments.

Order querying

FeatureSupportedNotes
Query open ordersList all active orders.
Query single orderBy venue order ID or client order ID (any order state).
Order status reportsReconciliation from open orders; see note below.
Fill reportsExecution and fill history.
note

Order status reports for reconciliation are generated from the open orders endpoint. Filled or canceled orders are not included in the reconciliation snapshot. Single-order queries via query_order use the dedicated /order-status endpoint which works for any order state.

Authentication

AX Exchange uses bearer token authentication:

  1. API key and secret obtain a session token via /authenticate.
  2. The session token is used as a bearer token for subsequent REST and WebSocket requests.
  3. Session tokens expire after a configurable period (default: 86400 seconds).

Configuration

Environments and endpoints

EnvironmentHTTP API (market data)HTTP API (orders)Market Data WSOrders WS
Sandboxhttps://gateway.sandbox.architect.exchange/apihttps://gateway.sandbox.architect.exchange/orderswss://gateway.sandbox.architect.exchange/md/wswss://gateway.sandbox.architect.exchange/orders/ws
Productionhttps://gateway.architect.exchange/apihttps://gateway.architect.exchange/orderswss://gateway.architect.exchange/md/wswss://gateway.architect.exchange/orders/ws
info

Order management HTTP endpoints (place, cancel, order status) use a separate base URL from market data endpoints. This is handled automatically by the adapter configuration.

Data client configuration options

OptionDefaultDescription
api_keyNoneAPI key; loaded from AX_API_KEY env var when omitted.
api_secretNoneAPI secret; loaded from AX_API_SECRET env var when omitted.
environmentSANDBOXTrading environment (SANDBOX or PRODUCTION).
base_url_httpNoneOverride for the REST base URL.
base_url_wsNoneOverride for the WebSocket URL.
http_proxy_urlNoneOptional HTTP proxy URL.
http_timeout_secs60Timeout (seconds) for REST requests.
max_retries3Maximum retry attempts for REST requests.
retry_delay_initial_ms1000Initial delay (milliseconds) between retries.
retry_delay_max_ms10000Maximum delay (milliseconds) between retries (exponential backoff).
update_instruments_interval_mins60Interval (minutes) between instrument catalog refreshes.

Execution client configuration options

OptionDefaultDescription
api_keyNoneAPI key; loaded from AX_API_KEY env var when omitted.
api_secretNoneAPI secret; loaded from AX_API_SECRET env var when omitted.
environmentSANDBOXTrading environment (SANDBOX or PRODUCTION).
base_url_httpNoneOverride for the REST base URL.
base_url_wsNoneOverride for the orders WebSocket URL.
http_proxy_urlNoneOptional HTTP proxy URL.
http_timeout_secs60Timeout (seconds) for REST requests.
max_retries3Maximum retry attempts for REST requests.
retry_delay_initial_ms1000Initial delay (milliseconds) between retries.
retry_delay_max_ms10000Maximum delay (milliseconds) between retries (exponential backoff).

The most common use case is to configure a live TradingNode to include AX Exchange data and execution clients. To achieve this, add an AX section to your client configuration(s):

from nautilus_trader.adapters.architect_ax import AX
from nautilus_trader.adapters.architect_ax import AxDataClientConfig
from nautilus_trader.adapters.architect_ax import AxEnvironment
from nautilus_trader.adapters.architect_ax import AxExecClientConfig
from nautilus_trader.config import InstrumentProviderConfig
from nautilus_trader.config import TradingNodeConfig

config = TradingNodeConfig(
..., # Omitted
data_clients={
AX: AxDataClientConfig(
environment=AxEnvironment.SANDBOX,
instrument_provider=InstrumentProviderConfig(load_all=True),
),
},
exec_clients={
AX: AxExecClientConfig(
environment=AxEnvironment.SANDBOX,
instrument_provider=InstrumentProviderConfig(load_all=True),
),
},
)

Then, create a TradingNode and add the client factories:

from nautilus_trader.adapters.architect_ax import AX
from nautilus_trader.adapters.architect_ax import AxLiveDataClientFactory
from nautilus_trader.adapters.architect_ax import AxLiveExecClientFactory
from nautilus_trader.live.node import TradingNode

# Instantiate the live trading node with a configuration
node = TradingNode(config=config)

# Register the client factories with the node
node.add_data_client_factory(AX, AxLiveDataClientFactory)
node.add_exec_client_factory(AX, AxLiveExecClientFactory)

# Finally build the node
node.build()

API credentials

There are two options for supplying your credentials to the AX Exchange clients. Either pass the corresponding api_key and api_secret values to the configuration objects, or set the following environment variables:

  • AX_API_KEY
  • AX_API_SECRET
tip

We recommend using environment variables to manage your credentials.

When starting the trading node, you'll receive immediate confirmation of whether your credentials are valid and have trading permissions.

Implementation notes

  • Whole contracts only: AX Exchange uses integer contract quantities. Fractional quantities are not supported and will be rejected.
  • Rate limiting: The adapter applies a conservative rate limit of 10 requests/second with automatic exponential backoff on rate limit responses.
  • Market orders: AX does not support native market orders. The adapter uses a preview endpoint to determine the take-through price and submits an aggressive IOC limit order.

Contributing

info

For additional features or to contribute to the AX Exchange adapter, please see our contributing guide.