API Support Forum
OEC API > FIX Support > Market depth over FAST
Author Topic: Market depth over FAST
(10 messages, Page 1 of 1)
Moderators: VPfau
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 05, 2014 @ 02:54 PM             Msg. 1 of 10
This is a continuation of an email discussion.

Response from OEC:

I suppose the first delete came from this message:
19:30:51.622 {3, X, MD2, [
[MDEntries -> {2, 0, 135.179992675781, , , , , }]
[MDEntries -> {1, 0, 135.22, 53, 20140205, 13051572, 0, }]
[MDEntries -> {1, 0, 135.21, 86, , , 1, }]
[MDEntries -> {1, 0, 135.2, 102, , , 2, }]
[MDEntries -> {1, 0, 135.19, 112, , , 3, }]
[MDEntries -> {1, 0, 135.18, 161, , , 4, }]
[MDEntries -> {1, 1, 135.24, 29, , , 0, }]
[MDEntries -> {1, 1, 135.25, 90, , , 1, }]
[MDEntries -> {1, 1, 135.27, 86, , , 3, }] ], }

Unfortunately, it is not reflected in our documentation, but we do not specify optional MDEntryPositionNo field for DELETE update action. Please do not treat missed MDEntryPositionNo as 0. We suppose that price value would be enough to find out and delete the level.

Misaligned price by tick size for DELETE entries will definitely be fixed on our side.

It would be great, if you will use our API Forum.

Thank you!



Quote:
In the log below for the depth for 6EH4, I have excluded the updates from the best bid/ask and trade incremental subscription.

Notice an update at 135.23 on the bid side at the top. And then at the bottom there is an update at 135.23 on the ask side. This is fine, but then there is a delete on the ask side just before it for the price of 135.229996. This makes no sense because this level does not exist yet on the ask side. Instead there should have been a delete on the ask side for 135.28 which was the previous fifth level. This was never given.

If you need the actual FAST log, I can give you that, I thought this would be easier to work with now that I gave you the IDs.

Bid Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.230000.
Size: 5. | 2014-02-04 20:30:30
Bid Depth - Id: MD2. Position Number: 3. Action: Change, Price: 135.200000.
Size: 102. | 2014-02-04 20:30:30
Ask Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.250000.
Size: 90. | 2014-02-04 20:30:30
Bid Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.220000.
Size: 62. | 2014-02-04 20:30:33
Bid Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.220000.
Size: 54. | 2014-02-04 20:30:37
Ask Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.240000.
Size: 28. | 2014-02-04 20:30:51
Ask Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.250000.
Size: 88. | 2014-02-04 20:30:51
Bid Depth - Id: MD2. Position Number: 0. Action: Delete, Price: 135.179993.
Size: 0. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.220000.
Size: 53. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.210000.
Size: 86. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 2. Action: Change, Price: 135.200000.
Size: 102. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 3. Action: Change, Price: 135.190000.
Size: 112. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 4. Action: Change, Price: 135.180000.
Size: 161. | 2014-02-04 20:30:52
Ask Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.240000.
Size: 29. | 2014-02-04 20:30:52
Ask Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.250000.
Size: 90. | 2014-02-04 20:30:52
Ask Depth - Id: MD2. Position Number: 3. Action: Change, Price: 135.270000.
Size: 86. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.220000.
Size: 53. | 2014-02-04 20:30:52
Bid Depth - Id: MD2. Position Number: 4. Action: Change, Price: 135.180000.
Size: 161. | 2014-02-04 20:30:52
Ask Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.240000.
Size: 31. | 2014-02-04 20:30:58
Bid Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.220000.
Size: 50. | 2014-02-04 20:30:58
Bid Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.210000.
Size: 86. | 2014-02-04 20:30:59
Ask Depth - Id: MD2. Position Number: 0. Action: Delete, Price: 135.229996.
Size: 0. | 2014-02-04 20:31:00
Bid Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.220000.
Size: 42. | 2014-02-04 20:31:00
Bid Depth - Id: MD2. Position Number: 1. Action: Change, Price: 135.210000.
Size: 83. | 2014-02-04 20:31:00
Ask Depth - Id: MD2. Position Number: 0. Action: Change, Price: 135.230000.
Size: 1. | 2014-02-04 20:31:00



Thank You,
Sierra Chart Engineering
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 05, 2014 @ 02:56 PM             Msg. 2 of 10
This is understood:

Quote: Please do not treat missed MDEntryPositionNo as 0. We suppose that price value would be enough to find out and delete the level
. I have already changed our market depth handling not to rely on MDEntryPositionNo .

However, there still is the question as to why there was not a delete
on the ask side for 135.28 which was the previous fifth level. This was never given. It should have been because the 6E only has five levels of depth. And once the price at 135.23 came in, the maximum depth price should have been 135.27.

Thank You,
Sierra Chart Engineering
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 05, 2014 @ 03:06 PM             Msg. 3 of 10
What line in your log are you referring to?

Victor Vins
Lead Software Developer
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 05, 2014 @ 04:59 PM             Msg. 4 of 10
The log provided does not include a market depth delete operation on the ask side for 135.28 . My point is there should have been one because otherwise with the change at 135.23 on the ask side which would be an insert, 135.28 should no longer be valid because there are only 5 levels of depth for the 6E.

Thank You,
Sierra Chart Engineering
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 07, 2014 @ 03:24 PM             Msg. 5 of 10
Is it clear the issue I am pointing out?

The problem is that we have no way to know to remove levels from the depth without a delete being given, for the levels which are beyond the number of levels for a particular symbol.

Have a look at this image:
http://www.sierrachart.com/images/OEC%20market%20depth.png

You can see there are additional levels beyond the 10 levels, which continue to remain because we never got a delete for them. How do we solve this?

Thank You,
Sierra Chart Engineering
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 07, 2014 @ 04:37 PM             Msg. 6 of 10
We will try to figure out why you do not receive delete records

Victor Vins
Lead Software Developer
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 20, 2014 @ 10:29 PM             Msg. 7 of 10
I think the best way to solve this problem is to have documentation provided for how to process the incremental market depth updates in order to maintain the initial order book from the market data full refresh.

We have worked with market depth with a lot of different services and this is the first one, where we cannot see how to do this without there being a problem with the final result.

Thank You,
Sierra Chart Engineering
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Feb 20, 2014 @ 11:51 PM             Msg. 8 of 10
I don't see any problems with maintaining market depth.

Victor Vins
Lead Software Developer
SierraChart
Posts: 111
Joined: Jul 17, 2007


Posted: Feb 21, 2014 @ 01:07 AM             Msg. 9 of 10
Message: The reason we asked for a technical explanation of how the depth is processed because maybe we are not understanding how it should be done.

For example, you pointed out that in the case of a delete operation , to ignore the position number. Currently we ignore the position number in all cases and work strictly off of the prices.

Look at the following log. See my comments in parentheses.

The time zone is US Eastern time in the timestamps at the end. This is in the API environment.

Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 158. | 2014-02-21 00:28:53
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 160. | 2014-02-21 00:28:55
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 161. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 93. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 2. Action: Change, Price: 1841.500000. Size: 129. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 9. Action: Change, Price: 1839.750000. Size: 358. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 163. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 101. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 2. Action: Change, Price: 1841.500000. Size: 124. | 2014-02-21 00:28:59
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 161. | 2014-02-21 00:29:04
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 162. | 2014-02-21 00:29:05
Bid Depth - Id: MD2D. Position Number: 8. Action: Change, Price: 1840.000000. Size: 304. | 2014-02-21 00:29:06
Bid Depth - Id: MD2D. Position Number: 4. Action: Change, Price: 1841.000000. Size: 137. | 2014-02-21 00:29:06
Bid Depth - Id: MD2D. Position Number: 5. Action: Change, Price: 1840.750000. Size: 148. | 2014-02-21 00:29:06
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 163. | 2014-02-21 00:29:07
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 162. | 2014-02-21 00:29:07
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 164. | 2014-02-21 00:29:10
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 96. | 2014-02-21 00:29:10
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 111. | 2014-02-21 00:29:13
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 163. | 2014-02-21 00:29:15
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 112. | 2014-02-21 00:29:18
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 170. | 2014-02-21 00:29:19
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 109. | 2014-02-21 00:29:19
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 175. | 2014-02-21 00:29:19
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 176. | 2014-02-21 00:29:21
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 171. | 2014-02-21 00:29:22
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 176. | 2014-02-21 00:29:22
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 112. | 2014-02-21 00:29:22
Bid Depth - Id: MD2D. Position Number: 7. Action: Change, Price: 1840.250000. Size: 319. | 2014-02-21 00:29:22
Bid Depth - Id: MD2D. Position Number: 8. Action: Change, Price: 1840.000000. Size: 302. | 2014-02-21 00:29:22
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 113. | 2014-02-21 00:29:23
Bid Depth - Id: MD2D. Position Number: 2. Action: Change, Price: 1841.500000. Size: 129. | 2014-02-21 00:29:23
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 118. | 2014-02-21 00:29:23
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 177. | 2014-02-21 00:29:28
Bid Depth - Id: MD2D. Position Number: 7. Action: Change, Price: 1840.250000. Size: 318. | 2014-02-21 00:29:28
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 179. | 2014-02-21 00:29:29
Bid Depth - Id: MD2D. Position Number: 7. Action: Change, Price: 1840.250000. Size: 316. | 2014-02-21 00:29:29
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 177. | 2014-02-21 00:29:29
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 172. | 2014-02-21 00:29:32
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 171. | 2014-02-21 00:29:32
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 166. | 2014-02-21 00:29:36
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 168. | 2014-02-21 00:29:42
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 169. | 2014-02-21 00:29:44
Bid Depth - Id: MD2D. Position Number: 8. Action: Change, Price: 1840.000000. Size: 301. | 2014-02-21 00:29:52
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 170. | 2014-02-21 00:29:56
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 175. | 2014-02-21 00:29:56
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 174. | 2014-02-21 00:29:57
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 169. | 2014-02-21 00:29:59
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 174. | 2014-02-21 00:30:00
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 115. | 2014-02-21 00:30:00
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1841.750000. Size: 118. | 2014-02-21 00:30:00
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 162. | 2014-02-21 00:30:01
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 163. | 2014-02-21 00:30:02
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 164. | 2014-02-21 00:30:02
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 165. | 2014-02-21 00:30:03
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 166. | 2014-02-21 00:30:03
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 167. | 2014-02-21 00:30:06
Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.000000. Size: 166. | 2014-02-21 00:30:06

+ DeleteDOMLevelByPrice. Price does not exist. Side: 1. Price: 1842.25 | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 0. Action: Delete, Price: 1842.250000. Size: 0. | 2014-02-21 00:30:07

(please explain how the above delete operation makes sense? The bid side never contained a price of 1842.25. The log above contains all of the incremental refreshes since the initial full book received. As you can see above, there were never any updates at that price and the market depth book never contained it as is confirmed by the line above the Delete indicating that the level never existed.)

(Notice below, we now have a change at 1842.25. This is a new level. And what is the purpose of deleting it (assuming it actually existed which it did not) and adding it again right after? I can find no logical explanation for what we are seeing.)

Bid Depth - Id: MD2D. Position Number: 0. Action: Change, Price: 1842.250000. Size: 53. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 1. Action: Change, Price: 1842.000000. Size: 197. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 2. Action: Change, Price: 1841.750000. Size: 120. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 3. Action: Change, Price: 1841.500000. Size: 124. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 4. Action: Change, Price: 1841.250000. Size: 124. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 5. Action: Change, Price: 1841.000000. Size: 151. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 6. Action: Change, Price: 1840.750000. Size: 149. | 2014-02-21 00:30:07
Bid Depth - Id: MD2D. Position Number: 7. Action: Change, Price: 1840.500000. Size: 182. | 2014-02-21 00:30:07


The username is SierraChartTM


As I was working through preparing this message, and looking at the depth updates, I finally realized what you are doing. When there is a shift of the market depth, you send out the entire book and we need to rely on the position numbers.

What may have been clear to you, because you know how you do the market depth, was not to us. This whole thing was confusing. The documentation did not provide a detailed explanation as to how the depth works.

And also, it seems like these Deletes are meaningless. What is the point of even sending those?

Thank You,
Sierra Chart Engineering