行情

管理分組標的

PUThttps://openapi.longbridge.com/v1/watchlist/groups

鑑權

簽名方式:每個請求用 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=。
行情權限要求免費

開通 OpenAPI 後自動獲得,無需額外購買。

更新自選股分組

>_ CLI
# add symbols to a group
longbridge watchlist update <id> --add TSLA.US --add AAPL.US
# remove a symbol from a group
longbridge watchlist update <id> --remove NVDA.US
# add and remove at the same time
longbridge watchlist update <id> --add TSLA.US --remove AAPL.US

請求

請求體

名稱類型必填說明
idinteger必填自選股分組 ID。
namestring可選新的分組名稱。
securitiesarray可選按 `mode` 增/刪/替換的證券代碼列表。
modestring必填證券更新模式:`add`、`remove`、`replace`。

響應

響應 JSON 示例

{
  "code": 0
}

錯誤碼

參見錯誤碼文檔。