資金事件
為便於第三方系統即時取得換匯及出入金操作的執行結果,Broker OpenAPI 提供換匯與出入金交易事件的非同步主動推送機制。
用戶端可透過訂閱方式接收相關事件,以即時掌握交易處理結果及狀態變化。
即時資金
即時資金事件推送
- CANCELED
- REJECTED
- FAILED
- COMPLETED
{
"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"
}
}
{
"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": "REJECTED",
"reason": "xxxxxx",
"biz_type": "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_funding_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"amount": "100",
"currency": "HKD",
"type": "DEPOSIT",
"status": "FAILED",
"reason": "xxxxxx",
"biz_type": "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_funding_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"amount": "100",
"currency": "HKD",
"type": "DEPOSIT",
"status": "COMPLETED",
"biz_type": "INSTANT_FUNDING"
}
}
響應欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| id | string | 唯一事件識別碼 |
| event_type | string | 事件類型,固定為 FUNDING |
| timestamp | string | ISO 8601 格式的事件時間戳記 |
| payload | object | 事件有效載荷資料 |
載荷欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| account_id | string | 帳號 ID |
| client_request_id | string | 客戶端請求 ID,每個請求唯一。 |
| instant_funding_id | string | 系統產生的請求 ID。 |
| amount | string | 金額。 |
| currency | string | 貨幣,請查看查詢即時資金請求 API 回應中的currency欄位。 |
| type | string | 即時融資請求類型,請查看查詢即時資金請求 API 回應中的type欄位。 |
| status | string | 請求狀態,請查看查詢即時資金請求 API 回應中的status欄位。 |
| reason | string | 原因。若終態不是「COMPLETED」,則返回原因。 |
| biz_type | string | 業務類型,固定為INSTANT_FUNDING |
即時換匯
即時換匯事件推送
- CANCELED
- REJECTED
- FAILED
- COMPLETED
{
"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"
}
}
{
"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": "REJECTED",
"reason": "xxxxxx",
"biz_type": "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",
"instant_exchange_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"from_amount": "100",
"to_amount": "700",
"from_currency": "USD",
"to_currency": "HKD",
"status": "FAILED",
"reason": "xxxxxx",
"biz_type": "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",
"instant_exchange_id": "89JGKD4LKIVI5UU6L3KHNU10IA",
"from_amount": "100",
"to_amount": "700",
"from_currency": "USD",
"to_currency": "HKD",
"status": "COMPLETED",
"biz_type": "INSTANT_EXCHANGE"
}
}
響應欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| id | string | 唯一事件識別碼 |
| event_type | string | 事件類型,固定為 FUNDING |
| timestamp | string | ISO 8601 格式的事件時間戳記 |
| payload | object | 事件有效載荷資料 |
載荷欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| account_id | string | 帳號 ID |
| client_request_id | string | 客戶端請求 ID,每個請求唯一。 |
| instant_exchange_id | string | 系統產生的請求 ID。 |
| from_amount | string | 兌換基準金額。 |
| to_amount | string | 兌換後金額。 |
| from_currency | string | 用於兌換的基礎貨幣。請參閱查詢即時換匯 API 回應中的from_currency欄位。 |
| to_currency | string | 兌換後的貨幣。請參閱查詢即時換匯 API 回應中的to_currency欄位。 |
| status | string | 請求狀態。請參閱查詢即時換匯 API 回應中的status欄位。 |
| reason | string | 原因。若終態不是「COMPLETED」,則返回原因。 |
| biz_type | string | 業務類型,固定為INSTANT_EXCHANGE。 |
換匯
換匯事件推送
- CANCELED
- REJECTED
- FAILED
- COMPLETED
{
"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"
}
}
{
"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": "REJECTED",
"reason": "xxxxxx",
"biz_type": "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": "FAILED",
"reason": "xxxxxx",
"biz_type": "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",
"to_amount": "801",
"from_currency": "USD",
"to_currency": "HKD",
"fx_rate": "8.01",
"status": "COMPLETED",
"biz_type": "EXCHANGE"
}
}
響應欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| id | string | 唯一事件識別碼 |
| event_type | string | 事件類型,固定為 FUNDING |
| timestamp | string | ISO 8601 格式的事件時間戳記 |
| payload | object | 事件有效載荷資料 |
載荷欄位
| 字段 | 類型 | 描述 |
|---|---|---|
| account_id | string | 帳號 ID |
| client_request_id | string | 客戶端請求 ID,每個請求唯一。 |
| fx_id | string | 系統產生的請求 ID。 |
| from_amount | string | 兌換基準金額。 |
| to_amount | string | 兌換後金額。 |
| from_currency | string | 用於兌換的基礎貨幣。請參閱查詢換匯 API回應中的from_currency欄位。 |
| to_currency | string | 兌換後的貨幣。請參閱查詢換匯 API回應中的to_currency欄位。 |
| fx_rate | string | 外匯匯率。 |
| status | string | 請求狀態。請參閱查詢換匯 API回應中的status欄位。 |
| reason | string | 原因。若終態不是「COMPLETED」,則返回原因。 |
| biz_type | string | 業務類型,固定為EXCHANGE |