Qubx 0.6.87__cp312-cp312-manylinux_2_39_x86_64.whl → 0.6.89__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/core/series.cpython-312-x86_64-linux-gnu.so +0 -0
- qubx/core/utils.cpython-312-x86_64-linux-gnu.so +0 -0
- qubx/exporters/formatters/base.py +0 -1
- qubx/exporters/formatters/target_position.py +2 -0
- qubx/exporters/redis_streams.py +24 -4
- qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so +0 -0
- {qubx-0.6.87.dist-info → qubx-0.6.89.dist-info}/METADATA +1 -1
- {qubx-0.6.87.dist-info → qubx-0.6.89.dist-info}/RECORD +11 -11
- {qubx-0.6.87.dist-info → qubx-0.6.89.dist-info}/WHEEL +0 -0
- {qubx-0.6.87.dist-info → qubx-0.6.89.dist-info}/entry_points.txt +0 -0
- {qubx-0.6.87.dist-info → qubx-0.6.89.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -134,7 +134,6 @@ class DefaultFormatter(IExportFormatter):
|
|
|
134
134
|
"exchange": target.instrument.exchange,
|
|
135
135
|
"target_size": str(target.target_position_size),
|
|
136
136
|
"price": str(target.price) if target.price is not None else "",
|
|
137
|
-
"signal_id": str(id(target.signal)) if target.signal else "",
|
|
138
137
|
}
|
|
139
138
|
|
|
140
139
|
def format_position_change(
|
|
@@ -19,6 +19,7 @@ class TargetPositionFormatter(DefaultFormatter):
|
|
|
19
19
|
self,
|
|
20
20
|
alert_name: str,
|
|
21
21
|
exchange_mapping: Optional[dict[str, str]] = None,
|
|
22
|
+
account: Optional[IAccountViewer] = None,
|
|
22
23
|
):
|
|
23
24
|
"""
|
|
24
25
|
Initialize the TargetPositionFormatter.
|
|
@@ -27,6 +28,7 @@ class TargetPositionFormatter(DefaultFormatter):
|
|
|
27
28
|
alert_name: The name of the alert to include in the messages
|
|
28
29
|
exchange_mapping: Optional mapping of exchange names to use in messages.
|
|
29
30
|
If an exchange is not in the mapping, the instrument's exchange is used.
|
|
31
|
+
account: The account viewer to get account information like total capital, leverage, etc.
|
|
30
32
|
"""
|
|
31
33
|
super().__init__()
|
|
32
34
|
self.alert_name = alert_name
|
qubx/exporters/redis_streams.py
CHANGED
|
@@ -152,16 +152,27 @@ class RedisStreamsExporter(ITradeDataExport):
|
|
|
152
152
|
return
|
|
153
153
|
|
|
154
154
|
try:
|
|
155
|
+
exported_count = 0
|
|
155
156
|
for signal in signals:
|
|
156
157
|
# Format the signal using the formatter
|
|
157
158
|
data = self._formatter.format_signal(time, signal, account)
|
|
158
159
|
|
|
160
|
+
# Skip if formatter returned empty data
|
|
161
|
+
if not data:
|
|
162
|
+
logger.debug(
|
|
163
|
+
f"[RedisStreamsExporter] Skipping signal for {signal.instrument} - formatter returned empty data"
|
|
164
|
+
)
|
|
165
|
+
continue
|
|
166
|
+
|
|
159
167
|
# Add to Redis stream in background thread
|
|
160
168
|
self._add_to_redis_stream(self._signals_stream, data)
|
|
169
|
+
exported_count += 1
|
|
161
170
|
|
|
162
|
-
logger.debug(
|
|
171
|
+
logger.debug(
|
|
172
|
+
f"[RedisStreamsExporter] Queued {exported_count}/{len(signals)} signals for export to {self._signals_stream}"
|
|
173
|
+
)
|
|
163
174
|
except Exception:
|
|
164
|
-
logger.exception(
|
|
175
|
+
logger.exception("[RedisStreamsExporter] Failed to export signals")
|
|
165
176
|
|
|
166
177
|
def export_target_positions(self, time: dt_64, targets: List[TargetPosition], account: IAccountViewer) -> None:
|
|
167
178
|
"""
|
|
@@ -176,18 +187,27 @@ class RedisStreamsExporter(ITradeDataExport):
|
|
|
176
187
|
return
|
|
177
188
|
|
|
178
189
|
try:
|
|
190
|
+
exported_count = 0
|
|
179
191
|
for target in targets:
|
|
180
192
|
# Format the target position using the formatter
|
|
181
193
|
data = self._formatter.format_target_position(time, target, account)
|
|
182
194
|
|
|
195
|
+
# Skip if formatter returned empty data
|
|
196
|
+
if not data:
|
|
197
|
+
logger.debug(
|
|
198
|
+
f"[RedisStreamsExporter] Skipping target position for {target.instrument} - formatter returned empty data"
|
|
199
|
+
)
|
|
200
|
+
continue
|
|
201
|
+
|
|
183
202
|
# Add to Redis stream in background thread
|
|
184
203
|
self._add_to_redis_stream(self._targets_stream, data)
|
|
204
|
+
exported_count += 1
|
|
185
205
|
|
|
186
206
|
logger.debug(
|
|
187
|
-
f"[RedisStreamsExporter] Queued {len(targets)} target positions for export to {self._targets_stream}"
|
|
207
|
+
f"[RedisStreamsExporter] Queued {exported_count}/{len(targets)} target positions for export to {self._targets_stream}"
|
|
188
208
|
)
|
|
189
209
|
except Exception:
|
|
190
|
-
logger.exception(
|
|
210
|
+
logger.exception("[RedisStreamsExporter] Failed to export target positions")
|
|
191
211
|
|
|
192
212
|
def export_position_changes(
|
|
193
213
|
self, time: dt_64, instrument: Instrument, price: float, account: IAccountViewer
|
|
Binary file
|
|
@@ -77,12 +77,12 @@ qubx/core/mixins/subscription.py,sha256=2nUikNNPsMExS9yO38kNt7jk1vKE-RPm0b3h1bU6
|
|
|
77
77
|
qubx/core/mixins/trading.py,sha256=7KwxHiPWkXGnkHS4VLaxOZ7BHULkvvqPS8ooAG1NTxM,9477
|
|
78
78
|
qubx/core/mixins/universe.py,sha256=UBa3OIr2XvlK04O7YUG9c66CY8AZ5rQDSZov1rnUSjQ,10512
|
|
79
79
|
qubx/core/mixins/utils.py,sha256=P71cLuqKjId8989MwOL_BtvvCnnwOFMkZyB1SY-0Ork,147
|
|
80
|
-
qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
80
|
+
qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=MeZdu0YZwIw978g-3xDUEQO69wjl3dX5L6z_Sf-sPRQ,1027944
|
|
81
81
|
qubx/core/series.pxd,sha256=4WpEexOBwZdKvqI81yR7wCnQh2rKgVZp9Y0ejr8B3E4,4841
|
|
82
82
|
qubx/core/series.pyi,sha256=30F48-oMp-XuySh5pyuoZcV20R4yODRpYBgLv7yxhjY,5534
|
|
83
83
|
qubx/core/series.pyx,sha256=9d3XjPAyI6qYLXuKXqZ3HrxBir1CRVste8GpGvgqYL4,52876
|
|
84
84
|
qubx/core/stale_data_detector.py,sha256=NHnnG9NkcivC93n8QMwJUzFVQv2ziUaN-fg76ppng_c,17118
|
|
85
|
-
qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
85
|
+
qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=EHgyf8V9FxVEOp-a4W_QjL_Dh5p8fPY1ReH9EVP5RHM,86568
|
|
86
86
|
qubx/core/utils.pyi,sha256=a-wS13V2p_dM1CnGq40JVulmiAhixTwVwt0ah5By0Hc,348
|
|
87
87
|
qubx/core/utils.pyx,sha256=UR9achMR-LARsztd2eelFsDsFH3n0gXACIKoGNPI9X4,1766
|
|
88
88
|
qubx/data/__init__.py,sha256=BlyZ99esHLDmFA6ktNkuIce9RZO99TA1IMKWe94aI8M,599
|
|
@@ -103,11 +103,11 @@ qubx/emitters/questdb.py,sha256=o_sQQZIG0mSjzM2PtSk1ki-IDSD-HIwaL-Fw326TTy8,1181
|
|
|
103
103
|
qubx/exporters/__init__.py,sha256=7HeYHCZfKAaBVAByx9wE8DyGv6C55oeED9uUphcyjuc,360
|
|
104
104
|
qubx/exporters/composite.py,sha256=c45XcMC0dsIDwOyOxxCuiyYQjUNhqPjptAulbaSqttU,2973
|
|
105
105
|
qubx/exporters/formatters/__init__.py,sha256=nyPFrsRJczffszAV2gXE_23qwRPOkNJo72PhI9LiI5g,616
|
|
106
|
-
qubx/exporters/formatters/base.py,sha256=
|
|
106
|
+
qubx/exporters/formatters/base.py,sha256=rhfStE_ORLTj4dV5l10gpwmQEvGtMxeRJp8SE77IDzQ,5597
|
|
107
107
|
qubx/exporters/formatters/incremental.py,sha256=V8kbxKDqjQm82wR8wDjHs2bR5WsHqSDFn_O5mI3yBxg,5260
|
|
108
108
|
qubx/exporters/formatters/slack.py,sha256=MPjbEFh7PQufPdkg_Fwiu2tVw5zYJa977tCemoI790Y,7017
|
|
109
|
-
qubx/exporters/formatters/target_position.py,sha256=
|
|
110
|
-
qubx/exporters/redis_streams.py,sha256=
|
|
109
|
+
qubx/exporters/formatters/target_position.py,sha256=uuO9-TJhWzOvUUDHYD4VNQ3XGzgXiomxKsty-um_mWg,3137
|
|
110
|
+
qubx/exporters/redis_streams.py,sha256=wu9ianwMiKfFerSaCFMNz6XMRjOMev02UN00D2pxxLg,10048
|
|
111
111
|
qubx/exporters/slack.py,sha256=wnVZRwWOKq9lMQyW0MWh_6gkW1id1TUanfOKy-_clwI,7723
|
|
112
112
|
qubx/features/__init__.py,sha256=ZFCX7K5bDAH7yTsG-mf8zibW8UW8GCneEagL1_p8kDQ,385
|
|
113
113
|
qubx/features/core.py,sha256=GT02m5yfrQafGi4ByHQBuQ7yKD40YirEQ-GKpar3PsU,10750
|
|
@@ -157,7 +157,7 @@ qubx/restorers/signal.py,sha256=5nK5ji8AucyWrFBK9uW619YCI_vPRGFnuDu8JnG3B_Y,1451
|
|
|
157
157
|
qubx/restorers/state.py,sha256=I1VIN0ZcOjigc3WMHIYTNJeAAbN9YB21MDcMl04ZWmY,8018
|
|
158
158
|
qubx/restorers/utils.py,sha256=We2gfqwQKWziUYhuUnjb-xo-5tSlbuHWpPQn0CEMTn0,1155
|
|
159
159
|
qubx/ta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
|
-
qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
160
|
+
qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=QwjXANt1P_Q1-SXrkZzNMapRf4prNK91B9iCKILpW8g,804392
|
|
161
161
|
qubx/ta/indicators.pxd,sha256=r9mYcpDFxn3RW5lVJ497Fiq2-eqD4k7VX0-Q0xcftkk,4913
|
|
162
162
|
qubx/ta/indicators.pyi,sha256=T87VwJrBJK8EuqtoW1Dhjri05scH_Y6BXN9kex6G7mQ,2881
|
|
163
163
|
qubx/ta/indicators.pyx,sha256=jJMZ7D2kUspwiZITBnFuNPNvzqUm26EtEfSzBWSrLvQ,39286
|
|
@@ -212,8 +212,8 @@ qubx/utils/runner/factory.py,sha256=hmtUDYNFQwVQffHEfxgrlmKwOGLcFQ6uJIH_ZLscpIY,
|
|
|
212
212
|
qubx/utils/runner/runner.py,sha256=q3b80zD4za6dFSOA6mUCuSQXe0DKS6LwGBMxO1aL3aw,34324
|
|
213
213
|
qubx/utils/time.py,sha256=xOWl_F6dOLFCmbB4xccLIx5yVt5HOH-I8ZcuowXjtBQ,11797
|
|
214
214
|
qubx/utils/version.py,sha256=e52fIHyxzCiIuH7svCF6pkHuDlqL64rklqz-2XjWons,5309
|
|
215
|
-
qubx-0.6.
|
|
216
|
-
qubx-0.6.
|
|
217
|
-
qubx-0.6.
|
|
218
|
-
qubx-0.6.
|
|
219
|
-
qubx-0.6.
|
|
215
|
+
qubx-0.6.89.dist-info/METADATA,sha256=zt2b-yd4YaWFLhtQj6wibB5azRt7nNMyrNkRnlCCxVg,5909
|
|
216
|
+
qubx-0.6.89.dist-info/WHEEL,sha256=RA6gLSyyVpI0R7d3ofBrM1iY5kDUsPwh15AF0XpvgQo,110
|
|
217
|
+
qubx-0.6.89.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
|
|
218
|
+
qubx-0.6.89.dist-info/licenses/LICENSE,sha256=qwMHOSJ2TD0nx6VUJvFhu1ynJdBfNozRMt6tnSul-Ts,35140
|
|
219
|
+
qubx-0.6.89.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|