交易

資金流水

GEThttps://openapi.longbridge.com/v1/asset/cashflow

鑑權

簽名方式:每個請求用 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 cash-flow

請求

查詢參數

名稱類型必填說明
start_timestring必填開始時間,時間戳,以 `秒` 爲單位,例如:`1650037563`
end_timestring必填結束時間,時間戳,以 `秒` 爲單位,例如:`1650747581`
business_typestring可選資金類型。<b>可選值:</b>, `1` - 現金,`2` - 股票,`3` - 基金
symbolstring可選標的代碼,例如:`AAPL.US`
pagestring可選起始頁。<b>默認值:</b> `1`, <b>數據校驗規則:</b>, <b>取值範圍:</b> `>=1`
sizestring可選每頁大小。<b>默認值:</b> `50`, <b>數據校驗規則:</b> `1~10000`

響應

響應欄位

名稱類型必填說明
listobject[]可選流水信息
└ transaction_flow_namestring必填流水名稱
└ directionstring必填流出方向。<b>可選值:</b>, `1` - 流出,`2` - 流入
└ business_typestring必填資金類別。<b>可選值:</b>, `1` - 現金,`2` - 股票,`3` - 基金
└ balancestring必填資金金額
└ currencystring必填資金幣種
└ business_timestring必填業務時間
└ symbolstring可選關聯股票代碼信息
└ descriptionstring可選資金流水說明

響應 JSON 示例

{
  "code": 0,
  "data": {
    "list": [
      {
        "transaction_flow_name": "BuyContract-Stocks",
        "direction": 1,
        "balance": "-248.60",
        "currency": "USD",
        "business_time": "1621507957",
        "symbol": "AAPL.US",
        "description": "AAPL"
      },
      {
        "transaction_flow_name": "BuyContract-Stocks",
        "direction": 1,
        "balance": "-125.16",
        "currency": "USD",
        "business_time": "1621504824",
        "symbol": "AAPL.US",
        "description": "AAPL"
      }
    ]
  }
}

錯誤碼

參見錯誤碼文檔。