Skip to content
All library documents

Estimating Exchange Price and Quantity Precision from Order Book Depth

Article Strategy library · Author: 斯巴达玩量化

Summary

This utility estimates price and quantity decimal precision by scanning ask-side order book entries. It converts scientific-notation values to ordinary decimal strings, then records the greatest number of digits after the decimal point seen among prices and amounts. The returned pair represents the estimated price precision and amount precision.

A wrapper retrieves market depth for the selected exchange and trading pair, caches the result by exchange name and pair, and can be instructed to refresh the cache. It returns no estimate in virtual exchange mode. The method is limited to precision up to the units place and may be inaccurate when order book depth is too shallow to expose the true increment. It is an operational aid for trading systems that need to format prices and quantities, not a trading signal or a method for confirming an exchange's authoritative tick and lot sizes.

Key ideas

  • The method estimates price and amount decimal places from ask-side depth entries.
  • Scientific-notation values are expanded before decimal places are counted.
  • The exchange and trading pair identify a cached estimate that can be refreshed.
  • Virtual exchange mode returns no precision estimate.
  • Shallow order books may conceal the true precision, and the method does not handle increments at tens, hundreds, or larger place values.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.