跳轉到內容

全部成交明細

該接口用於獲取訂單的成交明細,包括買入和賣出的成交記錄,同時支持當日成交和歷史成交查詢。

Request

HTTP MethodGET
HTTP URL/v3/trade/execution/all

Parameters

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

NameTypeRequiredDescription
symbolstringNO股票代碼,使用 ticker.region 格式,例如:AAPL.US
order_idstringNO訂單 ID,例如:701276261045858304
start_atstringNO開始時間,格式為時間戳 (秒),例如:1650410999

開始時間為空時,默認為結束時間或當前時間前九十天。
end_atstringNO結束時間,格式為時間戳 (秒),例如:1650410999

結束時間為空時,默認為開始時間後九十天或當前時間。
pageint32NO頁碼,從 1 開始。單次查詢最多返回 1000 條記錄,若結果超過 1000 條,has_moretrue,可結合 has_more 翻頁。

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

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

Response Status

StatusDescriptionSchema
200獲取全部成交明細成功all_executions_rsp
400請求參數有誤,查詢失敗None

Schemas

all_executions_rsp

NameTypeRequiredDescription
has_morebooleantrue是否有更多記錄。

單次查詢最多返回 1000 條記錄,若結果超過 1000 條,has_more 為 true
tradesobject[]false成交明細
∟ order_idstringtrue訂單 ID
∟ trade_idstringtrue成交 ID
∟ symbolstringtrue股票代碼,使用 ticker.region 格式,例如:AAPL.US
∟ trade_done_atstringtrue成交時間,格式為時間戳 (秒)
∟ quantitystringtrue成交數量
∟ pricestringtrue成交價格
∟ sidestringtrue買賣方向

可選值:
Buy - 買入
Sell - 賣出