获取当日订单
该接口用于获取当日订单和订单查询。
SDK Links
Python |
Rust |
Go |
Node.js |
Request
HTTP Method | GET |
HTTP URL | /v1/trade/order/today |
Parameters
Content-Type: application/json; charset=utf-8
Name | Type | Required | Description |
---|---|---|---|
symbol | string | NO | 股票代码,使用 ticker.region 格式,例如:AAPL.US |
status | string[] | NO | 订单状态 例如: status=FilledStatus&status=NewStatus |
side | string | NO | 买卖方向 可选值: Buy - 买入Sell - 卖出 |
market | string | NO | 市场 可选值: US - 美股HK - 港股 |
order_id | string | NO | 订单 ID,用于指定订单 ID 查询,例如:701276261045858304 |
Request Example
from longport.openapi import TradeContext, Config, OrderStatus, OrderSide, Market
config = Config.from_env()
ctx = TradeContext(config)
resp = ctx.today_orders(
symbol = "700.HK",
status = [OrderStatus.Filled, OrderStatus.New],
side = OrderSide.Buy,
market = Market.HK,
)
print(resp)
Response
Response Headers
- Content-Type: application/json