交易

當日成交明細

GEThttps://openapi.longbridge.com/v1/trade/execution/today

鑑權

簽名方式:每個請求用 App Key / Secret 簽名。請求頭如下:

名稱類型必填說明
Authorizationstring · header必填OpenAPI 後台 上的賬戶 Access Token,作為原始 token 傳入(不帶 Bearer 前綴),並參與簽名計算。
X-Api-Keystring · header必填你的 App Key。
X-Timestampstring · header必填請求時間戳,單位秒(Unix 時間)。
X-Api-Signaturestring · header必填HMAC-SHA256 簽名。格式:HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=。

該接口用於獲取當日訂單的成交明細。

>_ CLI
longbridge order executions

請求

查詢參數

名稱類型必填說明
symbolstring可選股票代碼,使用 `ticker.region` 格式,例如:`AAPL.US`
order_idstring可選訂單 ID,用於指定訂單 ID 查詢,例如:`701276261045858304`

響應

響應欄位

名稱類型必填說明
tradesobject[]可選成交明細信息
└ trade_idstring可選成交 ID
└ order_idstring可選訂單 ID
└ symbolstring可選股票代碼,使用 `ticker.region` 格式,例如:`AAPL.US`
└ pricestring可選成交價格
└ quantitystring可選成交數量
└ trade_done_atstring可選成交時間,格式為時間戳 (秒)
└ sidestring可選買賣方向。**可選值:**, `Buy` - 買入,`Sell` - 賣出
has_moreboolean可選是否還有更多數據。. 每次查詢最大訂單數量為 1000,如果查詢結果數量超過 1000,那麼 has_more 就會為 true

響應 JSON 示例

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

錯誤碼

參見錯誤碼文檔。