Rates Connection Messages


Rates Connection Messages

Market Data Request <V>

FIX clients access OANDA real-time prices using a Market Data Request message.

Types of Market Data Requests:

  • Snapshots (SubscriptionRequestType=0) are best for one-time requests. If you require rates to be continually updated, we recommend the subscription request (SubscriptionRequestType=1) rather than rapid snapshot polling.

  • Subscriptions (SubscriptionRequestType=1) request a snapshot of the current rates be returned and updates continually provided until the subscription is canceled.

Tag Field Name Required Type / Value Description
standard headers Y MsgType=V
262 MDReqID Y string unique identifier for new market data request, or the ID of a previous request to disable if SubscriptionRequestType=2
263 SubscriptionRequestType Y char type of request:
  • 0 = snapshot only
  • 1 = snapshot plus updates (subscription)
  • 2 = disable previous subscription
  • 264 MarketDepth Y int depth of market to return, OANDA supports only one level of market depth
  • 1 = Top level
  • 265 MDUpdateType Y for subscriptions, N otherwise int for subscriptions, indicates the desired update type:
  • 0 = full refresh
  • 1 = incremental refresh
    267 NoMDEntryTypes Y int the number of MDEntryType entries following
    –> 269 MDEntryType Y char entries requested:
  • 0 = bid
  • 1 = offer
  • 146 NoRelatedSym Y int the number of Symbol entries following
    –> 55 Symbol Y string currency pair
    standard trailer Y

    Market Data Snapshot / Full Refresh <W>

    The Market Data Snapshot / Full Refresh message communicates the current price of the requested Symbol at one point in time. This message is the response to a valid snapshot request, the first response to a valid subscription request, and the message used to communicate all updates for subscriptions where MDUpdateType=0 was requested.

    A snapshot message gives market data for one symbol only. If multiple symbols were requested in a snapshot or subscription, multiple <W> messages are returned to communicate the market data.

    A snapshot message will give both bid and offer prices if both were requested (“267=2 269=0 269=1“).

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=W
    262 MDReqID N string ID of requesting Market Data Request
    55 Symbol Y string currency pair
    268 NoMDEntries Y int number of market data entries following
    –> 269 MDEntryType Y char type of market data entry:
  • 0 = bid
  • 1 = offer
  • –> 270 MDEntryPx Y price price of market data entry
    –> 271 MDEntrySize N int price tier / number of units available
    –> 272 MDEntryDate N UTC date date of market data entry
    –> 273 MDEntryTime N UTC time time of market data entry
    –> 276 QuoteCondition N multiple value string conditions on market data entry
    –> 64 FutSettDate (FIX.4.2, FIX.4.3), SettlDate (FIX.4.4+) N (non-standard) LocalMktDate for trades on the symbol, the specific settlement date for customers with prime brokerage arrangements
    value date accurate for MDEntryDate / MDEntryTime reported
    –> 58 Text N string notes on market data entry
    standard trailer Y

    SettlDate <64> is only provided to customers with prime brokerage arrangements and other specifically-configured customers.

    Indicative prices are marked “Indicative” in the text notes in addition to QuoteCondition=B.

    Halted symbols are marked “Halted” in the text notes in addition to QuoteCondition=B.

    When a symbol is only tradeable in certain account home currencies, the text notes will report

    • “Tradeable when account currency is currency
    • “Tradeable when account currency is one of [currencylist]

    Market Data Incremental Refresh <X>

    The Market Data Incremental Refresh message communicates all price updates for subscriptions where MDUpdateType=1 was requested.

    An incremental refresh message can provide market data for more than one symbol.

    An incremental refresh message will give both bid and offer prices if both were requested (“267=2 269=0 269=1“).

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=X
    262 MDReqID N string ID of requesting Market Data Request
    268 NoMDEntries Y int number of market data entries following
    –> 279 MDUpdateAction Y char type of update:
  • 1 = change
  • –> 269 MDEntryType Y char type of market data entry:
  • 0 = bid
  • 1 = offer
  • –> 55 Symbol N string currency pair
    –> 270 MDEntryPx Y price price of market data entry
    –> 271 MDEntrySize N int price tier / number of units available
    –> 272 MDEntryDate N UTC date date of market data entry
    –> 273 MDEntryTime N UTC time time of market data entry
    –> 276 QuoteCondition N multiple value string conditions on market data entry
    –> 64 FutSettDate (FIX.4.2, FIX.4.3), SettlDate (FIX.4.4+) N (non-standard) LocalMktDate for trades on the symbol, the specific settlement date for customers with prime brokerage arrangements
    value date accurate for MDEntryDate / MDEntryTime reported
    –> 58 Text N string notes on market data entry
    standard trailer Y

    SettlDate <64> is only provided to customers with prime brokerage arrangements and other specifically-configured customers.

    Please also consult the notes on market data snapshot messages.

    Market Data Request Reject <Y>

    The Market Data Request Reject message is returned to the client when a market data request cannot be honored due to business or technical reasons. The tags and text field will describe the reason for the rejection.

    Tag Field Name Required Type / Value Description
    standard headers Y MsgType=Y
    262 MDReqID N string ID of requesting Market Data Request
    281 MDReqRejReason N char rejection reason
    58 Text N string optional explanatory text
    standard trailer Y