Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取当日订单接口报错 #39

Closed
772435284 opened this issue Jun 24, 2024 · 4 comments
Closed

获取当日订单接口报错 #39

772435284 opened this issue Jun 24, 2024 · 4 comments

Comments

@772435284
Copy link

772435284 commented Jun 24, 2024

问题描述

获取当日订单接口报错

代码例子

from longport.openapi import TradeContext, Config, OrderStatus, OrderSide, Market
config = Config.from_env()
ctx = TradeContext(config)
resp = ctx.today_orders(
    symbol = "AGFY.US",
    status = [OrderStatus.Filled, OrderStatus.New],
    side = OrderSide.Buy,
    market = Market.US,
)
print(resp)

错误信息或结果截图

Traceback (most recent call last):
File "get_today_orders.py", line 4, in
resp = ctx.today_orders(
^^^^^^^^^^^^^^^^^
longport.OpenApiException: OpenApiException: deserialize response body error: invalid timestamp at line 1 column 387

你的环境信息

  • 操作系统: Linux
  • 开发语言: Python
  • SDK 版本号:1.0.27
@sunli829
Copy link
Collaborator

请问 memberid 是多少?

调用 QuoteContext.member_id() 函数可得到 memberid

@772435284
Copy link
Author

memberid为12519320

@lorian7392
Copy link

格式有点问题, 已经修复

@772435284
Copy link
Author

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants