How to read modify order in DepthByOrder.proto

I’m using Rithmic’s R | Protocol and didn’t find details on how to read DepthByOrder responses. The code is straightforward to understand how NEW and DELETE update type worked, but I’m misunderstanding how to read CHANGE update.

Typically change orders alters the price and lot size of some original price and original size. The fields in DepthByOrder.proto don’t have prev_depth_size or something similar, so I’m not sure how to read how much size was modified before/after the change order.

2 Likes

I figured out how to keep track of original price and size of an order.

When an order is created, a depth_exchange_order_id is associated with the order. Each CHANGE update_type will reference an existing depth_exchange_order_id. If you store the order details along with its order id at the time of creation, you can lookup the original price and original size.

2 Likes

Hello @wtroughton,

Thanks for following up on your own question and providing a valuable solution!

If you ran into this issue initially, it is likely that someone else down the line will run into this as well. We hope your solution provides as a great resource for any other traders using the RAPI that stumble upon this post down the line.

Thanks for your contribution,
Jake
Optimus Futures Support

1 Like