This commit is contained in:
2026-09-06 11:34:23 +08:00
parent b38ff12f2a
commit ac9e9193ad
32 changed files with 235 additions and 61 deletions

View File

@@ -1,4 +1,5 @@
from datetime import datetime
import json
from sdk import Client
@@ -8,8 +9,20 @@ TOKEN = "QMTbyYanweidong"
STOCK_CODE = "000021.SZ"
VOLUME = 100
def main() -> None:
"""只读查询四类原始数据,输出 JSON 便于核对字段。"""
with Client(BASE_URL, TOKEN) as client:
for datatype in ("account", "order", "deal", "position"):
print(f"\n=== {datatype} ===")
try:
result = client.org(datatype)
print(f"记录数:{len(result)}")
print(json.dumps(result, ensure_ascii=False, indent=2, default=str))
except Exception as exc:
print(f"查询失败:{exc}")
def main1() -> None:
order = {
"opType": 23,
"orderType": 1101,