Skip to content

fix(order): tick_size should return arr[0].tick_size, not price_tick#310

Open
MukundaKatta wants to merge 1 commit into
nkaz001:masterfrom
MukundaKatta:fix/order-tick-size-returning-price-tick
Open

fix(order): tick_size should return arr[0].tick_size, not price_tick#310
MukundaKatta wants to merge 1 commit into
nkaz001:masterfrom
MukundaKatta:fix/order-tick-size-returning-price-tick

Conversation

@MukundaKatta

Copy link
Copy Markdown

Fixes #309.

Real bug — copy/paste error in py-hftbacktest/hftbacktest/order.py: the tick_size property was returning self.arr[0].price_tick (integer tick count) instead of self.arr[0].tick_size (float tick size). The underlying dtype in types.py has both fields:

('price_tick', 'i8'),
('tick_size', 'f8'),

So current code returns the wrong value and wrong type (int instead of float64). Trivial 1-character fix.

  @property
  def tick_size(self) -> float64:
      """
      Returns the tick size.
      """
-     return self.arr[0].price_tick
+     return self.arr[0].tick_size

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes. Give us feedback

@github-actions github-actions Bot added the Stale label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo in order.tick_size

1 participant