獲取券商席位 ID
該接口用於獲取券商席位 ID 數據 (可每天同步一次)。
SDK Links
Python  | longport.openapi.QuoteContext.participants | 
Rust  | longport::quote::QuoteContext#participants | 
Go  | QuoteContext.Participants | 
Node.js  | QuoteContext#participants | 
ℹ️Info
業務指令:16
Request 
Request Example 
python
# 獲取券商席位 id
# https://open.longportapp.com/docs/quote/pull/broker-ids
# 運行前請訪問“開發者中心“確保賬戶有正確的行情權限。
# 如沒有開通行情權限,可以通過“LongPort”手機客戶端,並進入“我的 - 我的行情 - 行情商城”購買開通行情權限。
from longport.openapi import QuoteContext, Config
config = Config.from_env()
ctx = QuoteContext(config)
resp = ctx.participants()
print(resp)Response 
Response Properties 
| Name | Type | Description | 
|---|---|---|
| participant_broker_numbers | object[] | 券商席位 | 
| ∟ broker_ids | int32[] | 券商對應的多個席位 ID | 
| ∟ participant_name_cn | string | 券商名稱 (简) | 
| ∟ participant_name_en | string | 券商名稱 (英) | 
| ∟ participant_name_hk | string | 券商名稱 (繁) | 
Protobuf 
protobuf
message ParticipantBrokerIdsResponse {
  repeated ParticipantInfo participant_broker_numbers = 1;
}
message ParticipantInfo {
  repeated int32 broker_ids = 1;
  string participant_name_cn = 2;
  string participant_name_en = 3;
  string participant_name_hk = 4;
}Response JSON Example 
json
{
  "participant_broker_numbers": [
    {
      "broker_ids": [7738, 7739],
      "participant_name_cn": "华兴金融 (香港)",
      "participant_name_en": "China Renaissance(HK)",
      "participant_name_hk": "華興金融 (香港)"
    },
    {
      "broker_ids": [6390, 6396, 6398, 6399],
      "participant_name_cn": "国信 (香港)",
      "participant_name_en": "Guosen(HK)",
      "participant_name_hk": "國信 (香港)"
    },
    {
      "broker_ids": [3168, 3169],
      "participant_name_cn": "泰嘉",
      "participant_name_en": "Tiger",
      "participant_name_hk": "泰嘉"
    }
  ]
}錯誤碼 
| 協議錯誤碼 | 業務錯誤碼 | 描述 | 排查建議 | 
|---|---|---|---|
| 3 | 301600 | 無效的請求 | 請求參數有誤或解包失敗 | 
| 3 | 301606 | 限流 | 降低請求頻次 | 
| 7 | 301602 | 服務端內部錯誤 | 請重試或聯繫技術人員處理 |