vnpy_okx 2025.11.1__py3-none-any.whl → 2025.11.4__py3-none-any.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.
- vnpy_okx/__init__.py +1 -1
- vnpy_okx/okx_gateway.py +9 -0
- {vnpy_okx-2025.11.1.dist-info → vnpy_okx-2025.11.4.dist-info}/METADATA +2 -2
- vnpy_okx-2025.11.4.dist-info/RECORD +6 -0
- vnpy_okx-2025.11.1.dist-info/RECORD +0 -6
- {vnpy_okx-2025.11.1.dist-info → vnpy_okx-2025.11.4.dist-info}/WHEEL +0 -0
- {vnpy_okx-2025.11.1.dist-info → vnpy_okx-2025.11.4.dist-info}/licenses/LICENSE +0 -0
vnpy_okx/__init__.py
CHANGED
vnpy_okx/okx_gateway.py
CHANGED
|
@@ -152,6 +152,8 @@ class OkxGateway(BaseGateway):
|
|
|
152
152
|
self.ping_count: int = 0
|
|
153
153
|
self.ping_interval: int = 20
|
|
154
154
|
|
|
155
|
+
self.subscribed_symbols: set[str] = set()
|
|
156
|
+
|
|
155
157
|
def connect(self, setting: dict) -> None:
|
|
156
158
|
"""
|
|
157
159
|
Start server connections.
|
|
@@ -218,11 +220,18 @@ class OkxGateway(BaseGateway):
|
|
|
218
220
|
Parameters:
|
|
219
221
|
req: Subscription request object containing symbol information
|
|
220
222
|
"""
|
|
223
|
+
# Check if symbol exists in contract map
|
|
221
224
|
contract: ContractData | None = self.symbol_contract_map.get(req.symbol, None)
|
|
222
225
|
if not contract:
|
|
223
226
|
self.write_log(f"Failed to subscribe data, symbol not found: {req.symbol}")
|
|
224
227
|
return
|
|
225
228
|
|
|
229
|
+
# Filter duplicate subscription
|
|
230
|
+
if req.vt_symbol in self.subscribed_symbols:
|
|
231
|
+
return
|
|
232
|
+
self.subscribed_symbols.add(req.vt_symbol)
|
|
233
|
+
|
|
234
|
+
# Send request to corresponding API
|
|
226
235
|
if contract.product == Product.SPREAD:
|
|
227
236
|
self.business_api.subscribe(req)
|
|
228
237
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vnpy_okx
|
|
3
|
-
Version: 2025.11.
|
|
3
|
+
Version: 2025.11.4
|
|
4
4
|
Summary: OKX trading gateway for VeighNa.
|
|
5
5
|
Project-URL: Homepage, https://www.github.com/veighna-global
|
|
6
6
|
Project-URL: Source, https://www.github.com/veighna-global
|
|
@@ -33,7 +33,7 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
</p>
|
|
34
34
|
|
|
35
35
|
<p align="center">
|
|
36
|
-
<img src ="https://img.shields.io/badge/version-2025.11.
|
|
36
|
+
<img src ="https://img.shields.io/badge/version-2025.11.04-blueviolet.svg"/>
|
|
37
37
|
<img src ="https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg"/>
|
|
38
38
|
<img src ="https://img.shields.io/badge/python-3.10|3.11|3.12|3.13-blue.svg" />
|
|
39
39
|
<img src ="https://img.shields.io/github/license/veighna-global/vnpy_okx.svg?color=orange"/>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
vnpy_okx/__init__.py,sha256=WKbwROSXbveQfJah7xCqB3ej97hai8IzHnDgR2T6yw0,1248
|
|
2
|
+
vnpy_okx/okx_gateway.py,sha256=-mNb33nTBVFo3RF9jHVAdomR1NrQ6KhM5vv9SJ1XzIE,72105
|
|
3
|
+
vnpy_okx-2025.11.4.dist-info/METADATA,sha256=PdUSP1DfJuD64Vx9dfK6Xsp1N2zBpoTLv-v6VEQvjaU,2840
|
|
4
|
+
vnpy_okx-2025.11.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
+
vnpy_okx-2025.11.4.dist-info/licenses/LICENSE,sha256=vKkW-EmD7w-5lDDjg15L8feZ1nkQeNpEHfyO2v9tprs,1099
|
|
6
|
+
vnpy_okx-2025.11.4.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
vnpy_okx/__init__.py,sha256=PIUzUKu48IL5EoZ_Ri0SfQg_dpY_dm33AJ4j60EaJF4,1248
|
|
2
|
-
vnpy_okx/okx_gateway.py,sha256=ksc7aYZJC9jIT7pePLjSHIjHbv1CG1IXO4bvjEIT5B4,71788
|
|
3
|
-
vnpy_okx-2025.11.1.dist-info/METADATA,sha256=o3PXIboJ2tHGqZOTxE4qMoyImKu0P4C5L-O1tfhlsxU,2840
|
|
4
|
-
vnpy_okx-2025.11.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
-
vnpy_okx-2025.11.1.dist-info/licenses/LICENSE,sha256=vKkW-EmD7w-5lDDjg15L8feZ1nkQeNpEHfyO2v9tprs,1099
|
|
6
|
-
vnpy_okx-2025.11.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|