Skip to main content

Get Today Executions

This API is used to get today executions

Request

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

Parameters

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

NameTypeRequiredDescription
symbolstringNOStock symbol, use ticker.region format, example: AAPL.US
order_idstringNOOrder ID, example: 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
200Get Today Executions SuccessNone
400The query failed with an error in the request parameter.None

Response Schema

Schemas

today_executions_rsp

NameTypeRequiredDescription
tradesobject[]falseExecution Detail
∟ order_idstringtrueOrder ID
∟ trade_idstringtrueExecution ID
∟ symbolstringtrueStock symbol, use ticker.region format, example: AAPL.US
∟ trade_done_atstringtrueTrade done time, formatted as a timestamp (second)
∟ quantitystringtrueExecuted quantity
∟ pricestringtrueExecuted price