fix bug
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user