# Market Data

Every price or size values should be represented with FineryMarkets internal corresponding types.

Description of all the types can be found [here](https://faq.finerymarkets.com/api-reference/data-types).

## Market Data Request\<V>

Market data request allows the client to receive market data on a subscription basis.

<table><thead><tr><th width="150" align="center">Tag</th><th width="200" align="center">Name</th><th width="150" align="center">Required</th><th align="center">Example</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">262</td><td align="center">MDReqID</td><td align="center">Y</td><td align="center">1</td><td align="center">Unique market data request Id</td></tr><tr><td align="center">263</td><td align="center">SubscriptionRequestType</td><td align="center">Y</td><td align="center">2</td><td align="center">Subscription request type(see below)</td></tr><tr><td align="center">265</td><td align="center">MDUpdateType</td><td align="center">N</td><td align="center">1</td><td align="center"><p>Required if SubscriptionRequestType&#x3C;263> is 1.</p><p>1 means incremental update.</p></td></tr><tr><td align="center">267</td><td align="center">NoMDEntryTypes</td><td align="center">Y</td><td align="center">2</td><td align="center">Number of MDEntryType &#x3C;269> fields requested. Should always be 2 for bid and offer.</td></tr><tr><td align="center">269</td><td align="center">=> MDEntryType</td><td align="center">Y</td><td align="center">0</td><td align="center">Must be the first field in this repeating group. This is a list of all the types of Market Data Entries that the firm requesting the Market Data is interested in receiving (see below)</td></tr><tr><td align="center">146</td><td align="center">NoRelatedSym</td><td align="center">Y</td><td align="center">1</td><td align="center">Number of symbols (instruments) requested.</td></tr><tr><td align="center">55</td><td align="center">=> Symbol</td><td align="center">Y</td><td align="center">BTC-USD</td><td align="center">Requested instruments</td></tr></tbody></table>

| Subscription Request Type | Description |
| :-----------------------: | :---------: |
|             1             |  Subscribe  |
|             2             | Unsubscribe |

| MDEntryType | Description |
| :---------: | :---------: |
|      0      |     Bid     |
|      1      |    Offer    |

| MDUpdateType |     Description     |
| :----------: | :-----------------: |
|       1      | Incremental refresh |

In case of successful subscription **Market Data - Snapshot/Full Refresh\<W>** message sent to the client. Masters and makers will receive **Market Data - Snapshot/Full Refresh\<W>**  messages when the book changes. Takers will receive **Market Data - Incremental Refresh\<X>**  upon every book update.

If subscription failed **Market Data Request Reject\<Y>** message sent to the client.

Makers and Masters are subscribed to the [feed 'B'](/api-reference/websocket-api/feed-b-global-order-book.md). Takers are subscribed to the [feed 'F'](/api-reference/websocket-api/feed-f-firm-market-data.md).

## **Market Data - Snapshot/Full Refresh\<W>**

The Market Data messages are used as the response to a **Market Data Request\<V>** message. In all cases, one Market Data message refers only to one **Market Data Request\<V>** . Each Market Data message contains information about only one symbol(instrument).

<table><thead><tr><th width="150" align="center">Tag</th><th width="200" align="center">Name</th><th width="150" align="center">Required</th><th align="center">Example</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">262</td><td align="center">MDReqID</td><td align="center">Y</td><td align="center">1</td><td align="center">Contains MDReqId&#x3C;262> from corresponding Market Data Request</td></tr><tr><td align="center">55</td><td align="center">Symbol</td><td align="center">Y</td><td align="center">BTC-USD</td><td align="center">Instrument</td></tr><tr><td align="center">268</td><td align="center">NoMDEntries</td><td align="center">Y</td><td align="center">1</td><td align="center">Number of entries following.</td></tr><tr><td align="center">269</td><td align="center">=> MDEntryType</td><td align="center">Y</td><td align="center">0</td><td align="center">Must be the first field of the repeating group. Entry type(see below)</td></tr><tr><td align="center">270</td><td align="center">=> MDEntryPx</td><td align="center">Y</td><td align="center">1</td><td align="center">Price, value of type Price</td></tr><tr><td align="center">271</td><td align="center">=> MDEntrySize</td><td align="center">Y</td><td align="center">1</td><td align="center">Size, value of type Size</td></tr></tbody></table>

| MDEntryType | Description |
| :---------: | :---------: |
|      0      |     Bid     |
|      1      |    Offer    |
|      J      |  Empty Book |

## **Market Data - Incremental Refresh\<X>**

The Market Data messages are used as the response to a **Market Data Request\<V>** message. In all cases, one Market Data message refers only to one **Market Data Request\<V>** . Contains incremental update for market data.

<table><thead><tr><th width="150" align="center">Tag</th><th width="200" align="center">Name</th><th width="150" align="center">Required</th><th align="center">Example</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">262</td><td align="center">MDReqID</td><td align="center">Y</td><td align="center">1</td><td align="center">Contains MDReqId&#x3C;262> from corresponding Market Data Request</td></tr><tr><td align="center">268</td><td align="center">NoMDEntries</td><td align="center">Y</td><td align="center">1</td><td align="center">Number of entries following.</td></tr><tr><td align="center">279</td><td align="center">=> MDUpdateAction</td><td align="center">Y</td><td align="center">0</td><td align="center">Update Action(see below)</td></tr><tr><td align="center">269</td><td align="center">=> MDEntryType</td><td align="center">Y</td><td align="center">0</td><td align="center">Must be the first field of the repeating group. Entry type(see below)</td></tr><tr><td align="center">55</td><td align="center">=> Symbol</td><td align="center">Y</td><td align="center">BTC-USD</td><td align="center">Instrument</td></tr><tr><td align="center">270</td><td align="center">=> MDEntryPx</td><td align="center">Y</td><td align="center">1</td><td align="center">Price, value of type Price</td></tr><tr><td align="center">271</td><td align="center">=> MDEntrySize</td><td align="center">Y</td><td align="center">1</td><td align="center">Size, value of type Size</td></tr></tbody></table>

| Update Action Code |                                                             Description                                                             |
| :----------------: | :---------------------------------------------------------------------------------------------------------------------------------: |
|          0         |                                                                 New                                                                 |
|          1         |                                                                Change                                                               |
|          2         |                                                                Delete                                                               |
|          3         | Top of the book removed till specified price. Price and size of a new top level are returned (both zeros if book side became empty) |

{% hint style="warning" %}
If you receive tag <279>=3; <270>=12300000000; <271> =100000000, then you must delete levels from the existing order book starting from the top of the book and ending with the order at a price of 123 and size of 1. Therefore, price 123 and size 1 is the new top of the book

If you receive the following update <279>=3; <270>=0; <271> =0, the described side of the book is empty.&#x20;
{% endhint %}

| MDEntryType | Description |
| :---------: | :---------: |
|      0      |     Bid     |
|      1      |    Offer    |
|      J      |  Empty Book |

## **Market Data - Reject \<Y>**

The **Market Data Request Reject\<Y>** is used when FineryMarkets cannot honor the **Market Data Request\<V>** , due to business or technical reasons.

<table><thead><tr><th width="150" align="center">Tag</th><th width="200" align="center">Name</th><th width="150" align="center">Required</th><th align="center">Example</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">262</td><td align="center">MDReqID</td><td align="center">Y</td><td align="center">1</td><td align="center">Contains MDReqId&#x3C;262> from corresponding Market Data Request</td></tr><tr><td align="center">281</td><td align="center">MDReqRejReason</td><td align="center">N</td><td align="center">0</td><td align="center">Rejection reason code(see below)</td></tr><tr><td align="center">58</td><td align="center">Text</td><td align="center">N</td><td align="center">25</td><td align="center">Contains FM error code if MDReqRejReason&#x3C;281> == F</td></tr></tbody></table>

| Rejection reason code |                    Description                   |
| :-------------------: | :----------------------------------------------: |
|           0           |            Unknown symbol(instrument)            |
|           3           |             Insufficient Permissions             |
|           4           |     Unsupported SubscriptionRequestType <263>    |
|           F           | Finery Markets error, see code in Text<58> field |
|           A           | Finery Markets error, see code in Text<58> field |


---

# 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://faq.finerymarkets.com/api-reference/fix-api/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.
