跳至主要内容

資金事件

為便於第三方系統即時取得換匯及出入金操作的執行結果,Broker OpenAPI 提供換匯與出入金交易事件的非同步主動推送機制。

用戶端可透過訂閱方式接收相關事件,以即時掌握交易處理結果及狀態變化。

即時資金

即時資金事件推送

{
"id": "event_c4b2c210-ce32-41d4-a9a1-cfad4fdf191c",
"event_type": "FUNDING",
"timestamp": "2025-03-29T07:02:33.200962333Z",
"payload": {
"account_id": "93IUJ28O9VO2KBGHDHR4H9",
"client_request_id": "LJIS16BACHQG9LPP44L9IQHGAB",
"instant_funding_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"amount": "100",
"currency": "HKD",
"type": "DEPOSIT",
"status": "CANCELED",
"reason": "xxxxxx",
"biz_type": "INSTANT_FUNDING"
}
}

響應欄位

字段類型描述
idstring唯一事件識別碼
event_typestring事件類型,固定為 FUNDING
timestampstringISO 8601 格式的事件時間戳記
payloadobject事件有效載荷資料

載荷欄位

字段類型描述
account_idstring帳號 ID
client_request_idstring客戶端請求 ID,每個請求唯一。
instant_funding_idstring系統產生的請求 ID。
amountstring金額。
currencystring貨幣,請查看查詢即時資金請求 API 回應中的currency欄位。
typestring即時融資請求類型,請查看查詢即時資金請求 API 回應中的type欄位。
statusstring請求狀態,請查看查詢即時資金請求 API 回應中的status欄位。
reasonstring原因。若終態不是「COMPLETED」,則返回原因。
biz_typestring業務類型,固定為INSTANT_FUNDING

即時換匯

即時換匯事件推送

{
"id": "event_c4b2c210-ce32-41d4-a9a1-cfad4fdf191c",
"event_type": "FUNDING",
"timestamp": "2025-03-29T07:02:33.200962333Z",
"payload": {
"account_id": "93IUJ28O9VO2KBGHDHR4H9",
"client_request_id": "LJIS16BACHQG9LPP44L9IQHGAB",
"instant_exchange_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"from_amount": "100",
"to_amount": "700",
"from_currency": "USD",
"to_currency": "HKD",
"status": "CANCELED",
"reason": "xxxxxx",
"biz_type": "INSTANT_EXCHANGE"
}
}

響應欄位

字段類型描述
idstring唯一事件識別碼
event_typestring事件類型,固定為 FUNDING
timestampstringISO 8601 格式的事件時間戳記
payloadobject事件有效載荷資料

載荷欄位

字段類型描述
account_idstring帳號 ID
client_request_idstring客戶端請求 ID,每個請求唯一。
instant_exchange_idstring系統產生的請求 ID。
from_amountstring兌換基準金額。
to_amountstring兌換後金額。
from_currencystring用於兌換的基礎貨幣。請參閱查詢即時換匯 API 回應中的from_currency欄位。
to_currencystring兌換後的貨幣。請參閱查詢即時換匯 API 回應中的to_currency欄位。
statusstring請求狀態。請參閱查詢即時換匯 API 回應中的status欄位。
reasonstring原因。若終態不是「COMPLETED」,則返回原因。
biz_typestring業務類型,固定為INSTANT_EXCHANGE

換匯

換匯事件推送

{
"id": "event_c4b2c210-ce32-41d4-a9a1-cfad4fdf191c",
"event_type": "FUNDING",
"timestamp": "2025-03-29T07:02:33.200962333Z",
"payload": {
"account_id": "93IUJ28O9VO2KBGHDHR4H9",
"client_request_id": "LJIS16BACHQG9LPP44L9IQHGAB",
"fx_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"from_amount": "100",
"from_currency": "USD",
"to_currency": "HKD",
"status": "CANCELED",
"reason": "xxxxxx",
"biz_type": "EXCHANGE"
}
}

響應欄位

字段類型描述
idstring唯一事件識別碼
event_typestring事件類型,固定為 FUNDING
timestampstringISO 8601 格式的事件時間戳記
payloadobject事件有效載荷資料

載荷欄位

字段類型描述
account_idstring帳號 ID
client_request_idstring客戶端請求 ID,每個請求唯一。
fx_idstring系統產生的請求 ID。
from_amountstring兌換基準金額。
to_amountstring兌換後金額。
from_currencystring用於兌換的基礎貨幣。請參閱查詢換匯 API回應中的from_currency欄位。
to_currencystring兌換後的貨幣。請參閱查詢換匯 API回應中的to_currency欄位。
fx_ratestring外匯匯率。
statusstring請求狀態。請參閱查詢換匯 API回應中的status欄位。
reasonstring原因。若終態不是「COMPLETED」,則返回原因。
biz_typestring業務類型,固定為EXCHANGE