Principle:Nautechsystems Nautilus trader Instrument Specification
| Field | Value |
|---|---|
| Sources | GitHub Repository, NautilusTrader Documentation |
| Domains | Financial Instruments, Market Microstructure, Trading System Configuration |
| Last Updated | 2026-02-10 12:00 GMT |
Overview
Instrument specification is the practice of defining the complete set of metadata -- including price precision, size precision, tick increments, lot sizes, fee schedules, margin requirements, and notional limits -- that characterizes a tradable financial instrument.
Description
Every financial instrument traded on an exchange or venue carries a set of structural properties that govern how orders can be placed, how prices are quoted, and how risk is calculated. These properties include:
- Price precision -- the number of decimal places in which prices are quoted (e.g., 2 for BTCUSDT at $0.01 increments, 5 for EUR/USD at 0.00001 increments).
- Size precision -- the number of decimal places in which order quantities are expressed.
- Price and size increments -- the minimum tick size and minimum order size step, which constrain the valid values for limit prices and quantities.
- Lot sizes -- the minimum tradable unit, often defined by the exchange (e.g., 1000 units for FX, 100 shares for US equities).
- Maximum and minimum quantities and notionals -- exchange-imposed limits that prevent orders outside acceptable ranges.
- Margin requirements -- initial and maintenance margin rates that determine capital allocation for leveraged positions.
- Fee schedules -- maker and taker fee rates that affect net P&L calculations and strategy profitability analysis.
Without accurate instrument specifications, a backtesting engine or live trading system cannot correctly validate orders, calculate slippage, compute fees, or assess margin requirements. The principle ensures that all downstream components -- order validation, risk management, fill simulation, and accounting -- operate with consistent and venue-accurate parameters.
Usage
Instrument specification is essential in the following scenarios:
- Backtesting setup -- before running any historical simulation, instruments must be defined with their full metadata so the engine can validate orders and simulate realistic fills.
- Strategy development -- strategies that calculate position sizes, set limit prices, or manage risk require accurate tick sizes, lot sizes, and margin rates.
- Multi-venue systems -- when trading the same underlying across multiple venues (e.g., BTC/USDT on Binance vs. Bybit), each venue's specific instrument specification must be represented independently.
- Order validation -- the system uses instrument constraints (min/max quantity, min/max price, min notional) to reject invalid orders before they reach the venue.
Theoretical Basis
Instrument Metadata Model
An instrument specification can be modeled as a structured record:
InstrumentSpec {
instrument_id: unique identifier (symbol + venue)
raw_symbol: venue-native symbol string
asset_class: FX | EQUITY | CRYPTO | INDEX | COMMODITY
price_precision: int (number of decimal places for prices)
size_precision: int (number of decimal places for quantities)
price_increment: Decimal (minimum price tick)
size_increment: Decimal (minimum size step)
lot_size: Decimal | None (standard trading lot)
max_quantity: Decimal | None (venue maximum order size)
min_quantity: Decimal | None (venue minimum order size)
max_notional: Money | None (maximum order value)
min_notional: Money | None (minimum order value)
margin_init: Decimal (initial margin rate, 0.0 to 1.0)
margin_maint: Decimal (maintenance margin rate, 0.0 to 1.0)
maker_fee: Decimal (fee rate for passive orders)
taker_fee: Decimal (fee rate for aggressive orders)
}
Precision and Increment Constraints
For any valid price p and quantity q:
p = round(p, price_precision)
p mod price_increment == 0
q = round(q, size_precision)
q mod size_increment == 0
If a lot size is defined, the quantity must also satisfy:
q mod lot_size == 0
Order Validation Pseudocode
function validate_order(order, instrument):
if order.price mod instrument.price_increment != 0:
reject("Price not aligned to tick increment")
if order.quantity mod instrument.size_increment != 0:
reject("Quantity not aligned to size increment")
if instrument.min_quantity and order.quantity < instrument.min_quantity:
reject("Below minimum quantity")
if instrument.max_quantity and order.quantity > instrument.max_quantity:
reject("Exceeds maximum quantity")
notional = order.price * order.quantity
if instrument.min_notional and notional < instrument.min_notional:
reject("Below minimum notional")
accept()
Instrument Type Hierarchy
Different asset classes extend the base specification with additional fields:
- CurrencyPair -- adds base_currency and quote_currency.
- CryptoPerpetual -- adds settlement_currency and is_inverse flag.
- CryptoFuture -- adds activation and expiration timestamps, underlying asset.
- Equity -- adds ISIN identifier, currency.
- FuturesContract -- adds exchange, underlying, multiplier, activation/expiration.
- OptionContract -- adds option_kind (CALL/PUT), strike_price, underlying.