跳到主要內容

获取当日成交明细

该接口用于获取当日订单的成交明细

Request

HTTP MethodGET
HTTP URL/v1/trade/execution/today

Parameters

Content-Type: application/json; charset=utf-8

NameTypeRequiredDescription
symbolstringNO股票代码,使用 ticker.region 格式,例如:AAPL.US
order_idstringNO订单 ID,用于指定订单 ID 查询,例如:701276261045858304

Request Example

from longport.openapi import TradeContext, Config

config = Config.from_env()
ctx = TradeContext(config)

resp = ctx.today_executions(symbol = "700.HK")
print(resp)

Response

Response Headers

  • Content-Type: application/json

Response Example

{
"code": 0,
"message": "success",
"data": {
"trades": [
{
"order_id": "693664675163312128",
"price": "388",
"quantity": "100",
"symbol": "700.HK",
"trade_done_at": "1648611351",
"trade_id": "693664675163312128-1648611351433741210"
}
]
}
}

Response Status

StatusDescriptionSchema
200查询成功None
400查询失败,请求参数错误。None

Response Schema

Schemas

today_executions_rsp

NameTypeRequiredDescription
tradesobject[]false成交明细信息
∟ order_idstringtrue订单 ID
∟ trade_idstringtrue成交 ID
∟ symbolstringtrue股票代码,使用 ticker.region 格式,例如:AAPL.US
∟ trade_done_atstringtrue成交时间,格式为时间戳 (秒)
∟ quantitystringtrue成交数量
∟ pricestringtrue成交价格