帳戶

定投列表

GEThttps://openapi.longbridge.com/v1/dailycoins/query

鑑權

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

僅支援 Longbridge 香港 / 新加坡賬戶

此方法僅支援 Longbridge 香港 / 新加坡賬戶,可操作任意標的,包括美股。

獲取當前用戶的所有定投(DCA)計劃。

>_ CLI
longbridge dca
longbridge dca --status Active

請求

查詢參數

名稱類型必填說明
statusstring可選按計劃狀態篩選:`Active`、`Suspended`、`Finished`。
symbolstring可選按標的代碼篩選,如 `AAPL.US`。

響應

響應欄位

名稱類型必填說明
plansobject[]必填定投計劃列表,
└ plan_idstring必填定投計劃 ID
└ symbolstring必填證券代碼
└ stock_namestring可選標的名稱
└ marketstring可選市場
└ statusstring可選計劃狀態:`Active`(進行中)、`Suspended`(已暫停)、`Finished`(已結束)
└ per_invest_amountstring可選每次投入金額
└ invest_frequencystring可選投資頻率:`Daily`、`Weekly`、`Fortnightly`、`Monthly`
└ invest_day_of_weekstring可選每週扣款日
└ invest_day_of_monthstring可選每月扣款日
└ next_trd_datestring可選下次交易日
└ cum_amountstring可選累計投入金額
└ cum_profitstring可選累計盈虧
└ average_coststring可選平均持倉成本
└ allow_margin_financeboolean可選是否允許融資
└ alter_hoursstring可選提前提醒小時數
└ display_accountstring可選賬戶顯示名稱
└ account_channelstring可選賬戶渠道
└ aaidstring可選賬戶資產 ID
└ member_idstring可選用戶 ID
└ issue_numberstring可選已執行次數
└ created_atstring可選創建時間
└ updated_atstring可選最後更新時間

響應 JSON 示例

{
  "code": 0,
  "message": "success",
  "data": {
    "plans": [
      {
        "plan_id": "1239402174908207104",
        "symbol": "AAPL.US",
        "stock_name": "Apple Inc.",
        "market": "US",
        "status": "Active",
        "per_invest_amount": "100",
        "invest_frequency": "Monthly",
        "invest_day_of_month": "15",
        "invest_day_of_week": "",
        "next_trd_date": "1778853600",
        "cum_amount": "0",
        "cum_profit": "0",
        "average_cost": "0",
        "allow_margin_finance": false,
        "alter_hours": "6",
        "display_account": "LBPT10065023",
        "member_id": "3162",
        "aaid": "20975338",
        "account_channel": "lb_papertrading",
        "issue_number": 0,
        "created_at": "1778725628",
        "updated_at": "1778725628"
      }
    ]
  }
}

錯誤碼

參見錯誤碼文檔。