Qubx 0.6.26__cp312-cp312-manylinux_2_39_x86_64.whl → 0.6.29__cp312-cp312-manylinux_2_39_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Qubx might be problematic. Click here for more details.

qubx/backtester/ome.py CHANGED
@@ -52,6 +52,7 @@ class OrdersManagementEngine:
52
52
  _fill_stops_at_price: bool
53
53
  _tick_size: float
54
54
  _last_update_time: dt_64
55
+ _last_data_update_time_ns: int
55
56
 
56
57
  def __init__(
57
58
  self,
@@ -74,6 +75,7 @@ class OrdersManagementEngine:
74
75
  self._fill_stops_at_price = fill_stop_order_at_price
75
76
  self._tick_size = instrument.tick_size
76
77
  self._last_update_time = np.datetime64(0, "ns")
78
+ self._last_data_update_time_ns = 0
77
79
 
78
80
  if not debug:
79
81
  self._dbg = lambda message, **kwargs: None
@@ -99,6 +101,11 @@ class OrdersManagementEngine:
99
101
  timestamp = self.time_service.time()
100
102
  _exec_report = []
101
103
 
104
+ # - pass through data if it's older than previous update
105
+ if mdata.time < self._last_data_update_time_ns:
106
+ return _exec_report
107
+ self._last_data_update_time_ns = mdata.time
108
+
102
109
  # - new quote
103
110
  if isinstance(mdata, Quote):
104
111
  _b, _a = mdata.bid, mdata.ask
@@ -574,9 +574,13 @@ class CcxtDataProvider(IDataProvider):
574
574
  ob = ccxt_convert_orderbook(ccxt_ob, instrument, levels=depth, tick_size_pct=tick_size_pct)
575
575
  if ob is None:
576
576
  return
577
+
577
578
  self._health_monitor.record_data_arrival(sub_type, dt_64(ob.time, "ns"))
578
- quote = ob.to_quote()
579
- self._last_quotes[instrument] = quote
579
+
580
+ if not self.has_subscription(instrument, DataType.QUOTE):
581
+ quote = ob.to_quote()
582
+ self._last_quotes[instrument] = quote
583
+
580
584
  channel.send((instrument, sub_type, ob, False))
581
585
 
582
586
  async def un_watch_orderbook(instruments: list[Instrument]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Qubx
3
- Version: 0.6.26
3
+ Version: 0.6.29
4
4
  Summary: Qubx - Quantitative Trading Framework
5
5
  Author: Dmitry Marienko
6
6
  Author-email: dmitry.marienko@xlydian.com
@@ -5,7 +5,7 @@ qubx/backtester/account.py,sha256=0yvE06icSeK2ymovvaKkuftY8Ou3Z7Y2JrDa6VtkINw,30
5
5
  qubx/backtester/broker.py,sha256=JMasxycLqCT99NxN50uyQ1uxtpHYL0wpp4sJ3hB6v2M,2688
6
6
  qubx/backtester/data.py,sha256=De2ioNv3Zh-cCGakzK0igb2caDcqbibZ_tsYmF7sTTQ,6601
7
7
  qubx/backtester/management.py,sha256=HuyzFsBPgR7j-ei78Ngcx34CeSn65c9atmaii1aTsYg,14900
8
- qubx/backtester/ome.py,sha256=hfqwvaMBccDpy6eMe04QupEA6BjfjAodbm707fbQUb0,14984
8
+ qubx/backtester/ome.py,sha256=Uus6xdcWwhb_G0a6hJSLuRTgMcbFA_zJxYkH6kF22Gw,15268
9
9
  qubx/backtester/optimization.py,sha256=HHUIYA6Y66rcOXoePWFOuOVX9iaHGKV0bGt_4d5e6FM,7619
10
10
  qubx/backtester/runner.py,sha256=zF56lXVRYJCBiwdqnylob-yf48r_aVK9gHpf8aT49cQ,20471
11
11
  qubx/backtester/simulated_data.py,sha256=niujaMRj__jf4IyzCZrSBR5ZoH1VUbvsZHSewHftdmI,17240
@@ -20,7 +20,7 @@ qubx/cli/release.py,sha256=JYdNt_ZM9jarmYiRDtKqbRqqllzm2Qwi6VggokB2j8A,28167
20
20
  qubx/connectors/ccxt/__init__.py,sha256=HEQ7lM9HS8sED_zfsAHrhFT7F9E7NFGAecwZwNr-TDE,65
21
21
  qubx/connectors/ccxt/account.py,sha256=HILqsSPfor58NrlP0qYwO5lkNZzUBG-SR5Hy1OSa7_M,24308
22
22
  qubx/connectors/ccxt/broker.py,sha256=UMAytmDCwELUv4-R4WmrEQdPnZjjF89XlgJst15WVSs,15305
23
- qubx/connectors/ccxt/data.py,sha256=jd6jeygq_3j5D3JkzQu_D-6ft0O5X-hRF6_RBTgl_as,29970
23
+ qubx/connectors/ccxt/data.py,sha256=-5ysiERXC6Ip5Hp9N6Lq4bTQVyMZvFFMMPcS6RfwmYk,30051
24
24
  qubx/connectors/ccxt/exceptions.py,sha256=OfZc7iMdEG8uLorcZta2NuEuJrSIqi0FG7IICmwF54M,262
25
25
  qubx/connectors/ccxt/exchanges/__init__.py,sha256=2Po4YfvLOcpXHCS9Q2SSy3TMUejkcd9RhQ-oyGaxcEc,1504
26
26
  qubx/connectors/ccxt/exchanges/binance/broker.py,sha256=BB2V82zaOm1EjP3GrsOqQQMeGpml6-w23iv7goKrjyU,2111
@@ -51,11 +51,11 @@ qubx/core/mixins/processing.py,sha256=dqehukrfqcLy5BeILKnkpHCvva4SbLKj1ZbQdnByu1
51
51
  qubx/core/mixins/subscription.py,sha256=V_g9wCPQ8S5SHkU-qOZ84cV5nReAUrV7DoSNAGG0LPY,10372
52
52
  qubx/core/mixins/trading.py,sha256=6XK712ZHECZnI-lleJfQ8taXfaBagPQBVqNoBxAkEyM,7204
53
53
  qubx/core/mixins/universe.py,sha256=L3s2Jw46_J1iDh4622Gk_LvCjol4W7mflBwEHrLfZEw,9899
54
- qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=Plj8Ib9Fh7sOrRnXkmlo6Hye0j-ROvgAnD1AtYkQEL4,978280
54
+ qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=fsbUVYNqAS42tjo3ZbPvyXTUO9hw1d-9nZcIXepfd4U,978280
55
55
  qubx/core/series.pxd,sha256=jBdMwgO8J4Zrue0e_xQ5RlqTXqihpzQNu6V3ckZvvpY,3978
56
56
  qubx/core/series.pyi,sha256=RaHm_oHHiWiNUMJqVfx5FXAXniGLsHxUFOUpacn7GC0,4604
57
57
  qubx/core/series.pyx,sha256=7cM3zZThW59waHiYcZmMxvYj-HYD7Ej_l7nKA4emPjE,46477
58
- qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=kQawfZtib9u8klFkguewIUuJoV-hzKeJQ58B6_NesrU,86568
58
+ qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=0AJgqHjRH-SBlVonHtpvhHITa0qCj-AxpT6ZHZOSHrA,86568
59
59
  qubx/core/utils.pyi,sha256=a-wS13V2p_dM1CnGq40JVulmiAhixTwVwt0ah5By0Hc,348
60
60
  qubx/core/utils.pyx,sha256=k5QHfEFvqhqWfCob89ANiJDKNG8gGbOh-O4CVoneZ8M,1696
61
61
  qubx/data/__init__.py,sha256=ELZykvpPGWc5rX7QoNyNQwMLgdKMG8MACOByA4pM5hA,549
@@ -116,7 +116,7 @@ qubx/restorers/signal.py,sha256=DBLqA7vDhoMTAzUC4N9UerrO0GbjeHdTeMoCz7U7iI8,6621
116
116
  qubx/restorers/state.py,sha256=duXyEHQhS1zdNdo3VKscMhieZ5sYNlfE4S_pPXQ1Tuw,4109
117
117
  qubx/restorers/utils.py,sha256=We2gfqwQKWziUYhuUnjb-xo-5tSlbuHWpPQn0CEMTn0,1155
118
118
  qubx/ta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
- qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=8JPrt_9nOLHvmcnvqEBwq8DPyJr9PQgdMQ4k5aMA4zo,654440
119
+ qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=Mss8usOoL6hmmXTTcoOH5yIUN0bRcFOEgWYsIueYlRo,654440
120
120
  qubx/ta/indicators.pxd,sha256=Goo0_N0Xnju8XGo3Xs-3pyg2qr_0Nh5C-_26DK8U_IE,4224
121
121
  qubx/ta/indicators.pyi,sha256=19W0uERft49In5bf9jkJHkzJYEyE9gzudN7_DJ5Vdv8,1963
122
122
  qubx/ta/indicators.pyx,sha256=Xgpew46ZxSXsdfSEWYn3A0Q35MLsopB9n7iyCsXTufs,25969
@@ -153,8 +153,8 @@ qubx/utils/runner/factory.py,sha256=vQ2dBTbrQE9YH__-TvuFzGF-E1li-vt_qQum9GHa11g,
153
153
  qubx/utils/runner/runner.py,sha256=iJsxTU9ne43Seh5rMfZLrXnV-RtA4BwzZYsjHeXajLs,29067
154
154
  qubx/utils/time.py,sha256=J0ZFGjzFL5T6GA8RPAel8hKG0sg2LZXeQ5YfDCfcMHA,10055
155
155
  qubx/utils/version.py,sha256=e52fIHyxzCiIuH7svCF6pkHuDlqL64rklqz-2XjWons,5309
156
- qubx-0.6.26.dist-info/LICENSE,sha256=qwMHOSJ2TD0nx6VUJvFhu1ynJdBfNozRMt6tnSul-Ts,35140
157
- qubx-0.6.26.dist-info/METADATA,sha256=Nnq0lh5xRBXKd5i1qvlJRuz7Uo1MF7Ckrw5lFXAMKdI,4444
158
- qubx-0.6.26.dist-info/WHEEL,sha256=XjdW4AGUgFDhpG9b3b2KPhtR_JLZvHyfemLgJJwcqOI,110
159
- qubx-0.6.26.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
160
- qubx-0.6.26.dist-info/RECORD,,
156
+ qubx-0.6.29.dist-info/LICENSE,sha256=qwMHOSJ2TD0nx6VUJvFhu1ynJdBfNozRMt6tnSul-Ts,35140
157
+ qubx-0.6.29.dist-info/METADATA,sha256=a7FpGiZmBlGzYdt3GrAuWr6skM_ow-yWuAkZHmCiBTM,4444
158
+ qubx-0.6.29.dist-info/WHEEL,sha256=XjdW4AGUgFDhpG9b3b2KPhtR_JLZvHyfemLgJJwcqOI,110
159
+ qubx-0.6.29.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
160
+ qubx-0.6.29.dist-info/RECORD,,
File without changes
File without changes