Skip to content

Exchange and Broker Adapter

Exchange Connectivity & Adapters

A liquidity venue in BlitzTrader is identified as an Exchange Segment.

BlitzTrader supports connectivity to multiple markets for:

  • Market data sourcing
  • Order routing
  • Or both

Each connection to an Exchange or Broker gateway system is managed by a programmable component called an Adapter.


Adapters act as intermediaries between BlitzTrader and external systems.

They are responsible for:

  • Establishing sessions with exchanges
  • Communicating with OMS (Order Management System)
  • Translating messages between BlitzTrader and exchange formats
  • Enabling seamless interoperability

The BlitzTrader API provides a well-defined communication interface between:

  • BlitzTrader OMS
  • Exchange Adapter

The Exchange Adapter acts as the gateway to liquidity providers and supports:

  • Market data sourcing
  • Order routing
  • Trade execution

Adapters can also include additional capabilities such as:

  • Market data feeders
  • Custom integrations

BlitzTrader also provides a FIX component for building FIX-based adapters, enabling:

  • High-performance FIX routing
  • Simplified integration with counterparties

Exchange Segment

BlitzTrader enables trading across multiple exchanges and liquidity venues.

Each liquidity venue is represented as an Exchange Segment.

Each adapter is uniquely identified using an Exchange Segment identifier.

Every tradable instrument is linked to a specific Exchange Segment, allowing the system to route orders correctly.


Example Exchange Segments

Exchanges Exchange Segment Identifier
NSE Futures and Options NSEFO
NSE Equity NSECM
NSE Commodity NSECOM
BSE Futures and Options BSEFO
BSE Equity BSECM
MCX Commodities MCXFO

Instrument

An instrument is a core component of a trading system and represents tradable securities within an exchange segment.

The BlitzTrader API provides an abstract Instrument class that supports:

  • Equities
  • Futures
  • Options
  • Spreads
  • Forex (Spot)

Each instrument includes standard properties such as:

  • Name
  • Exchange ID
  • Exchange Segment
  • Tick Size
  • Lot Size

Additional properties for derivatives include:

  • Expiry Date
  • Strike Price
  • Option Type (CE, PE, CA, PA)

Custom properties can be added using Extended Market Properties, allowing key-value extensions.

BlitzTrader also provides mechanisms to:

  • Import instrument definitions
  • Persist instruments internally

Adapters are responsible for providing the list of tradable instruments to the system.

Example Instruments

Name Security Type Exchange Segment TickSize LotSize Expiry Strike Price Option Type
ESM15 FUTURES CME 0.25 1 June 2015 - -
GOOG EQUITY NASDAQ 0.01 1 - - -
NIFTY FUTURES NSEFO 0.05 50 26Feb2015 - -
SBIN OPTIONS NSEFO 0.05 500 26Feb2015 295 CE
RELIANCE EQUITY NSECM 0.05 300 - - -
USD/INR FUTURES NSECD 0.0025 1000 26Feb2015 - -
EUR/USD FOREX FXCM 0.0001 1000 - - -

Instrument Naming Convention

Instrument Type Format Example
Equity Symbol GOOG
Spot Symbol EUR/USD
Futures Symbol + Expiry NIFTY FEB 2015
Options Symbol + Expiry + Type + Strike NIFTY FEB 2015 CE 8800

Accessing Market Data

Click to view code example
IMarketDataContainerInfo marketDataContainerInfo = base.GetMarketDataContainer(
    ExchangeSegment.NSEFO, 
    "NIFTY FEB 2015 CE 8800"
);

if (marketDataContainerInfo != null)
{
    ITouchLineInfo touchlineInfo = marketDataContainerInfo.TouchLineInfo;

    double bestBidPrice = touchlineInfo.BestBidPrice;
    int bestBidSize = touchlineInfo.BestBidSize;

    double bestAskPrice = touchlineInfo.BestAskPrice;
    int bestAskSize = touchlineInfo.BestAskSize;

    double lastPrice = touchlineInfo.LastPrice;
    int lastSize = touchlineInfo.LastSize;

    long lastTradedTime = touchlineInfo.LastTradedTime;
}