# FIX Market Data

For assistance or information regarding implementation of the FIX API, please contact <support@sfox.com>

{% hint style="info" %}
sFOX uses FIX 4.4
{% endhint %}

## Connectivity

Before logging onto a FIX session, you must establish a secure connection to the FIX gateway

### Endpoints

<table><thead><tr><th width="157">Environment</th><th width="436">URL</th><th>SSL Required</th></tr></thead><tbody><tr><td>Production</td><td><code>fix-md.sfox.com:5001</code></td><td>Y</td></tr><tr><td>Sandbox</td><td><code>fix-md.staging.sfox.com:5001</code><br><a href="mailto:support@sfox.com">Contact support</a> to access the Sandbox environment</td><td>Y</td></tr></tbody></table>

### TCP SSL

If your FIX implementation does not support establishing a native TCP SSL connection with SNI support, set up a local proxy such as [stunnel](https://www.stunnel.org/) to establish a secure connection to the FIX gateway. Refer to our [QuickFIX Integration Guide](/fix-api/quickfix-guide.md) for details and examples

## Standard Header

{% hint style="info" %}
`SenderCompID`s must be provided by sFOX. Contact <support@sfox.com> to be provided with a `SenderCompID` for your session.
{% endhint %}

<table><thead><tr><th width="94">Tag</th><th width="175">Field</th><th>Description</th></tr></thead><tbody><tr><td>8</td><td>BeginString</td><td>Must be <code>FIX.4.4</code></td></tr><tr><td>108</td><td>HeartBtInt</td><td>Must be &#x3C;= <code>30</code> (seconds)</td></tr><tr><td>49</td><td>SenderCompID</td><td>Value provided by sFOX. Must be unique per session</td></tr><tr><td>56</td><td>TargetCompID</td><td>Must be <code>SFOX</code></td></tr><tr><td></td><td>StartDay</td><td><code>Sunday</code></td></tr><tr><td></td><td>EndDay</td><td><code>Sunday</code></td></tr><tr><td></td><td>StartTime</td><td><code>00:00:01</code></td></tr><tr><td></td><td>EndTime</td><td><code>00:00:00</code></td></tr><tr><td></td><td>TimeZone</td><td><code>ETC</code> / <code>UTC</code></td></tr></tbody></table>

## Messages

### Logon - A

{% hint style="info" %}
Only one session may exist per SenderCompId. Attempting to logon using a SenderCompId of an active session will result in an error.
{% endhint %}

<table><thead><tr><th width="92">Tag</th><th width="134">Name</th><th width="129">Required</th><th>Description</th></tr></thead><tbody><tr><td>554</td><td>Password</td><td>Y</td><td>Your API Key</td></tr></tbody></table>

{% hint style="warning" %}
**QuickFIX:** If you are implementing the FIX protocol using QuickFIX please refer to our [QuickFIX Integration Guide](/fix-api/quickfix-guide.md)
{% endhint %}

### Market Data Request – V <a href="#market-data-request-v" id="market-data-request-v"></a>

Subscribes the current session to Market Data

<table><thead><tr><th width="117">Tag</th><th width="231">Name</th><th width="111">Required</th><th>Description</th></tr></thead><tbody><tr><td>262</td><td>MDReqID</td><td>Y</td><td>Market data request ID, included in all MarketDataSnapshotFullRefresh updates</td></tr><tr><td>263</td><td>SubscriptionRequestType</td><td>Y</td><td><code>1</code>: Snapshot Plus Updates<br><code>2</code>: Disable Previous Snapshot Plus Updates</td></tr><tr><td>20030</td><td>FeedType</td><td>Y</td><td>Which marketdata feed:<br><code>net</code>: Net Price (default)<br><code>smart</code>: Smart</td></tr><tr><td>264</td><td>MarketDepth</td><td>N</td><td>Depth of the orderbook (per-side). The orderbook may be depth limited to a smaller number than the requested depth.</td></tr><tr><td>267</td><td>NoMDEntryType</td><td>N</td><td>Number of MDEntryTypes requested. If empty the default is to subscribe to the orderbook.</td></tr><tr><td>-> 269</td><td>MDEntryType</td><td>N</td><td><code>0</code>: Bid<br><code>1</code>: Offer<br><code>2</code>: Trade<br><br>Note: <code>0</code> and/or <code>1</code> will give both sides of the book.</td></tr><tr><td>146</td><td>NoRelatedSym</td><td>Y</td><td>Number of symbols in this request</td></tr><tr><td>-> 55</td><td>Symbol</td><td>Y</td><td>Pair to subscribe to, <code>basequote</code> format.</td></tr></tbody></table>

### Market Data Snapshot/Full Refresh - W

<table><thead><tr><th width="143">Tag</th><th width="174">Name</th><th>Description</th></tr></thead><tbody><tr><td>262</td><td>MDReqID</td><td>Original MDReqID that generated this refresh</td></tr><tr><td>55</td><td>Symbol</td><td>Symbol/currency pair of the market data entry</td></tr><tr><td>106</td><td>Issuer</td><td>The full feed recipient, e.g. <code>orderbook.net.btcusd</code></td></tr><tr><td>268</td><td>NoMDEntries</td><td>Number of market data entries in this message</td></tr><tr><td>-> 269</td><td>MDEntryType</td><td><code>0</code>: Bid<br><code>1</code>: Offer<br><code>2</code>: Trade</td></tr><tr><td>-> 270</td><td>MDEntryPx</td><td>Price of the market data entry</td></tr><tr><td>-> 271</td><td>MDEntrySize</td><td>Size/Quantity of the market data entry</td></tr><tr><td>-> 273</td><td>MDEntryTime</td><td>Only for trades</td></tr><tr><td>-> 37</td><td>OrderID</td><td>Only for trades</td></tr><tr><td>-> 275</td><td>MDMkt</td><td>Market of the entry, not applicable in the compact/enterprise feed</td></tr><tr><td>-> 2446</td><td>AggressorSide</td><td><code>1</code>: Buy<br><code>2</code>: Sell</td></tr></tbody></table>

### Security List Request - x

Returns a [Security List - y](#security-list-y) response containing supported symbols

<table><thead><tr><th width="113">Tag</th><th width="222">Name</th><th width="131">Required</th><th>Description</th></tr></thead><tbody><tr><td>320</td><td>SecurityReqID</td><td>Y</td><td></td></tr><tr><td>559</td><td>SecurityListRequestType</td><td>Y</td><td><code>4</code>: All Securities</td></tr></tbody></table>

### Security List - y

The response containing the list of symbols from a [Security List Request - x](#security-list-request-x) request

<table><thead><tr><th width="115">Tag</th><th width="225">Name</th><th>Description</th></tr></thead><tbody><tr><td>320</td><td>SecurityReqID</td><td>SecurityReqID from the SecurityListRequest</td></tr><tr><td>322</td><td>SecurityResponseID</td><td>Unique identifier of the response</td></tr><tr><td>560</td><td>SecurityRequestResult</td><td><code>0</code>: Valid Request</td></tr><tr><td>146</td><td>NoRelatedSym</td><td>Specifies the number of returned symbols</td></tr><tr><td>-> 55</td><td>Symbol</td><td>Underlying asset symbol in <code>basequote</code> format. i.e. <code>btcusd</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sfox.com/fix-api/fix-market-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
