hyperquant 1.49__tar.gz → 1.52__tar.gz
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.
- {hyperquant-1.49 → hyperquant-1.52}/PKG-INFO +1 -1
- {hyperquant-1.49 → hyperquant-1.52}/pyproject.toml +1 -1
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/polymarket.py +6 -2
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/polymarket.py +3 -0
- {hyperquant-1.49 → hyperquant-1.52}/uv.lock +1 -1
- {hyperquant-1.49 → hyperquant-1.52}/.gitignore +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/README.md +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/requirements-dev.lock +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/requirements.lock +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/__init__.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/auth.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/bitget.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/bitmart.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/coinw.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/deepcoin.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/edgex.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/hyperliquid.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lbank.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/edgex_sign.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/hpstore.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/hyper_types.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/polymarket/ctfAbi.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/polymarket/safeAbi.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lib/util.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/lighter.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/apexpro.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/bitget.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/bitmart.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/coinw.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/deepcoin.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/edgex.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/hyperliquid.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/lbank.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/lighter.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/models/ourbit.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/ourbit.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/broker/ws.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/core.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/datavison/_util.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/datavison/binance.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/datavison/coinglass.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/datavison/okx.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/db.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/draw.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/logkit.py +0 -0
- {hyperquant-1.49 → hyperquant-1.52}/src/hyperquant/notikit.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperquant
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.52
|
|
4
4
|
Summary: A minimal yet hyper-efficient backtesting framework for quantitative trading
|
|
5
5
|
Project-URL: Homepage, https://github.com/yourusername/hyperquant
|
|
6
6
|
Project-URL: Issues, https://github.com/yourusername/hyperquant/issues
|
|
@@ -120,8 +120,8 @@ class Position(DataStore):
|
|
|
120
120
|
"""通过order更新持仓,处理LIVE时部分成交的增量统计"""
|
|
121
121
|
# print(order)
|
|
122
122
|
# order写入本地尝试后续分析
|
|
123
|
-
with open("polymarket_orders.log", "a") as f:
|
|
124
|
-
|
|
123
|
+
# with open("polymarket_orders.log", "a") as f:
|
|
124
|
+
# f.write(json.dumps(order) + "\n")
|
|
125
125
|
order_id = order.get("id")
|
|
126
126
|
asset_id = order.get("asset_id")
|
|
127
127
|
outcome = order.get("outcome")
|
|
@@ -185,6 +185,7 @@ class Position(DataStore):
|
|
|
185
185
|
"side": side,
|
|
186
186
|
"size": new_size,
|
|
187
187
|
"totalBought": total_bought,
|
|
188
|
+
"totalAvgPrice": avg_price,
|
|
188
189
|
"avgPrice": avg_price,
|
|
189
190
|
"ts": int(time.time() * 1000),
|
|
190
191
|
}
|
|
@@ -876,6 +877,9 @@ class PolymarketDataStore(DataStoreCollection):
|
|
|
876
877
|
|
|
877
878
|
# 🧮 累计交易信息
|
|
878
879
|
"totalBought": 123, # 累计买入数量(含历史)
|
|
880
|
+
|
|
881
|
+
# 新增字段
|
|
882
|
+
"totalAvgPrice": 123, # 累计买入均价(含历史)
|
|
879
883
|
|
|
880
884
|
# ⚙️ 状态标志
|
|
881
885
|
"redeemable": True, # 是否可赎回(True 表示市场已结算且你是赢家,可提取 USDC)
|
|
@@ -2162,6 +2162,9 @@ class Polymarket:
|
|
|
2162
2162
|
hourly_match = await _try_slug(hourly_slug)
|
|
2163
2163
|
if hourly_match:
|
|
2164
2164
|
return hourly_match
|
|
2165
|
+
|
|
2166
|
+
if '5m' in base_slug:
|
|
2167
|
+
interval = 5 * 60
|
|
2165
2168
|
|
|
2166
2169
|
now_ts = int(datetime.now(UTC).timestamp())
|
|
2167
2170
|
base_ts = (now_ts // interval) * interval
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|