I have tick and quote live data from Polygon and Interactive Brokers.

Looking at the conditions I can't see info on market or iceberg orders:

  1. https://polygon.io/docs/get_v1_meta_conditions__ticktype__anchor
  2. https://www.interactivebrokers.com/en/index.php?f=7235

Per this related question Market, Limit and Cancellation orders it defines order types within time frames.

Are market and iceberg order conditions transmitted to the exchange and relayed by providers, if so which ones please?

Or is it up to us to determine by the trades and order book at the time of trade?


I understand ice bergs are kept private, as this is their selling point and premium charged. Well noted.

I have the quotes from https://polygon.io/docs/websockets/ws_stocks_Q_anchor this is different from the "depth of book data" mentioned? Do data providers offer this?

  • $\begingroup$ In addition to my answer, let me add that since I work at polygon now, you can ask questions on the public Slack channel there if you want faster answers. $\endgroup$ – deftfyodor Jun 2 at 22:34
  • $\begingroup$ Amazing thank you. I am looking to recreate some aspects of bookmap and their market order detection for my algos. Great fan of polygon by the way, have made a connector for your websocket via nuget in c# github.com/unified-dev/polygonio and nuget.org/packages/PolygonIo.WebSocket $\endgroup$ – morleyc Jun 2 at 22:41
  • $\begingroup$ I can't say I'm familiar with bookmap in particular, but a quick perusal of their website suggests to me that they are using depth of book data for their visualizations, which can be a bit harder to access. You would probably need to do some more manual inference to emulate what they're doing. I'm glad to hear you appreciate it! We love seeing these kinds of projects in the wild. $\endgroup$ – deftfyodor Jun 3 at 1:21

In general you cannot determine this information from the public data feeds- the purpose of Iceberg orders in particular is to be hidden and difficult to detect. Also, there isn't really a standardized definition of an Iceberg, so there would be no consistent way of performing this labeling. If you could reliably identify them though, there is good money in that :). You could get an approximation of market order identification by combining trades in a given symbol that have identical timestamps- however that will treat both market orders and deep-book limit orders the same way.


In regard to the updated question- depth of book data is much more extensive than what is provided at the data vendors you mentioned. The most common type of available market data is so-called TAQ (trade and quote) or NBBO.

Generally, providers of this so-called Level 1 or L1 data will offer all trades, as well as the best available bid and ask price, along with the volume available at that price. In the case of Polygon, the data comes from the consolidated feed which means that it includes trades from all public exchanges, as well as the best bid and ask from all exchanges.

Depth of book data, on the other hand, would individually show every order which is currently resting on the order book for each exchange. Generally to work with depth of book data, you would need to reconstruct the order book yourself and "emulate" the matching engine to figure out what the current best bid or ask are. Depth of book data tends to be harder to work with and is much bigger, but on the other hand it opens up new kinds of analysis that you can't do with L1 data, such as analyzing the structure of the order book and the composition of individual orders in it.

There are compromise products, so-called Level 2 or L2 data, which will already have the order book creation done, and will give you the aggregate volume at each level of the book. You can see this, for example, in the crypto feed at polygon.io, or the L2 proprietary feeds offered by most exchanges.

Currently, there is no standard consolidated feed for either L2 or DOB data, and generally users who want it will need to get the data themselves and perform the consolidation suitable to their own purposes. Right now there is a proposal that is working it's way through the SEC to make L2 data more easily available, but the state of affairs now is that it's still quite expensive for an individual to work with.

  • $\begingroup$ That makes sense. Waiting limit orders or market orders are ok, I would expect to see the ask or bid in the quote book for longer time frame. It's more the momentum and aggressive hitting the ask or bid I am looking for. Timestamps would definitely be a reasonable proxy fit this. To confirm, whilst exchange or ECN can receive different order types (market, iceberg etc) this information is not sent on the NBBO that consolidates all exchanges? Do some not offer this for a fee (not planning on paying, just curious)? $\endgroup$ – morleyc Jun 2 at 22:45
  • $\begingroup$ So Iceberg can mean a bunch of things- the most common are smart orders and pegged orders. Smart orders are generally provider by brokers or SORs, and examples would be TWAP. VWAP, POV, etc. These type of orders are normally broken up by a broker and submitted over time to the exchange, who only ever knows about the part of it which the broker has already submitted. Pegged orders are those which are either hidden or show only a small part of their size at a time, and generally track BBO or Midpoint. On the datafeed, they get converted to either hidden or limit orders. $\endgroup$ – deftfyodor Jun 3 at 1:29
  • 1
    $\begingroup$ Even for the latter kind, there is generally no way to know after execution whether the order was submitted as pegged or as a normal limit order- they all get "converted" to limit orders when actual execution takes place. $\endgroup$ – deftfyodor Jun 3 at 14:41
  • Iceberg order detection requires access to the full order log. Last trade and Level 1 (top of book) is not sufficient.
  • Trading venues never translate iceberg order flag or non-displayed size in real-time feeds. This information is often obfuscated even in archive products.
  • Generally, there are two criteria to detect icebergs from the order feed: a) traded quantity vs order quantity and b) new order timestamp vs preceding order timestamp.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.