Estimating Order Precision from Exchange Order Book Depth
Summary
The document presents a workaround for trading across exchanges that do not expose a consistent function for retrieving order precision. It proposes reading ask-side depth and inferring price and amount decimal precision from the values shown there, retaining the greatest number of decimal places observed.
This can help a strategy adapt its order formatting to different markets, but the example repeatedly fetches depth and only examines asks. Depth values may not reveal an exchange’s actual permitted tick size or lot size, so the inferred precision can be incomplete or misleading. The document recommends querying an exchange’s native API when handling multiple currencies. It provides no comparison or test results establishing that the depth-based estimate is reliable.
Key ideas
- The proposed workaround infers order precision from decimal places in ask-side depth values.
- It tracks price and amount precision separately and keeps the highest observed decimal count.
- The approach is intended to address inconsistent precision interfaces across exchanges.
- Depth-derived precision may not match the exchange’s actual order increments.
- The document suggests using native API queries when supporting multiple currencies.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.