應用程式介面詳細規格
API URL:
https://api.hkma.gov.hk/public/financial-market-infra/trade-repository/hktr-data-disclose-fx?segment=positions參數名稱 | 描述 |
---|---|
segment | 用於指示要檢索哪組數據。
格式: segment=data segment name (positions | turnover) 例子: segment=positions |
未平倉合約輸出字段(JSON) |
Swagger格式 |
名稱 | 類型 | 計量單位 | 描述 |
---|---|---|---|
end_of_date | Date | As at Date in ISO format yyyy-mm-dd For example, 2021-02-01 |
|
on_total_asset_class | Number | 百萬美元 | Outstanding Notional Total (Asset Class) |
on_prod_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product Non-deliverable Forward |
on_prod_intend_clear_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Intention to Clear Intended to Clear / Non-deliverable Forward |
on_prod_not_intend_clear_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Intention to Clear Not Intended to Clear / Non-deliverable Forward |
on_prod_usd_cny_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/CNY / Non-deliverable Forward |
on_prod_usd_idr_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/IDR / Non-deliverable Forward |
on_prod_usd_inr_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/INR / Non-deliverable Forward |
on_prod_usd_krw_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/KRW / Non-deliverable Forward |
on_prod_usd_myr_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/MYR / Non-deliverable Forward |
on_prod_usd_php_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/PHP / Non-deliverable Forward |
on_prod_usd_twd_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency USD/TWD / Non-deliverable Forward |
on_prod_other_curr_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Currency Others / Non-deliverable Forward |
on_prod_0m_3m_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 0 – 3 Months / Non-deliverable Forward |
on_prod_3m_6m_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 3 – 6 Months / Non-deliverable Forward |
on_prod_6m_9m_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 6 – 9 Months / Non-deliverable Forward |
on_prod_9m_12m_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 9 – 12 Months / Non-deliverable Forward |
on_prod_1y_2y_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 1 – 2 Years / Non-deliverable Forward |
on_prod_2y_5y_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity 2 – 5 Years / Non-deliverable Forward |
on_prod_5y_more_non_deliver_fw | Number | 百萬美元 | Outstanding Notional By Product and Residual Maturity > 5 Years / Non-deliverable Forward |
not_total_asset_class | Number | Number of Outstanding Trades Total (Asset Class) |
|
not_prod_non_deliver_fw | Number | Number of Outstanding Trades By Product Non-deliverable Forward |
|
not_prod_intent_clear_non_deliver_fw | Number | Number of Outstanding Trades By Product and Intention to Clear Intended to Clear / Non-deliverable Forward |
|
not_prod_not_intent_clear_non_deliver_fw | Number | Number of Outstanding Trades By Product and Intention to Clear Not Intended to Clear / Non-deliverable Forward |
|
not_prod_usd_cny_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/CNY / Non-deliverable Forward |
|
not_prod_usd_idr_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/IDR / Non-deliverable Forward |
|
not_prod_usd_inr_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/INR / Non-deliverable Forward |
|
not_prod_usd_krw_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/KRW / Non-deliverable Forward |
|
not_prod_usd_myr_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/MYR / Non-deliverable Forward |
|
not_prod_usd_php_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/PHP / Non-deliverable Forward |
|
not_prod_usd_twd_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency USD/TWD / Non-deliverable Forward |
|
not_prod_other_curr_non_deliver_fw | Number | Number of Outstanding Trades By Product and Currency Others / Non-deliverable Forward |
|
not_prod_0m_3m_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 0 – 3 Months / Non-deliverable Forward |
|
not_prod_3m_6m_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 3 – 6 Months / Non-deliverable Forward |
|
not_prod_6m_9m_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 6 – 9 Months / Non-deliverable Forward |
|
not_prod_9m_12m_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 9 – 12 Months / Non-deliverable Forward |
|
not_prod_1y_2y_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 1 – 2 Years / Non-deliverable Forward |
|
not_prod_2y_5y_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity 2 – 5 Years / Non-deliverable Forward |
|
not_prod_5y_more_non_deliver_fw | Number | Number of Outstanding Trades By Product and Residual Maturity > 5 Years / Non-deliverable Forward |
交易量輸出字段(JSON) |
Swagger格式 |
名稱 | 類型 | 計量單位 | 描述 |
---|---|---|---|
period_date_from | Date | For the period from Date in ISO format yyyy-mm-dd For example, 2021-02-01 |
|
period_date_to | Date | For the period to Date in ISO format yyyy-mm-dd For example, 2021-02-01 |
|
nt_total_asset_class | Number | 百萬美元 | New Trade Turnover Total (Asset Class) |
nt_prod_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product Non-deliverable Forward |
nt_prod_intend_clear_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Intention to Clear Intended to Clear / Non-deliverable Forward |
nt_prod_not_intend_clear_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Intention to Clear Not Intended to Clear / Non-deliverable Forward |
nt_prod_usd_cny_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/CNY / Non-deliverable Forward |
nt_prod_usd_idr_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/IDR / Non-deliverable Forward |
nt_prod_usd_inr_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/INR / Non-deliverable Forward |
nt_prod_usd_krw_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/KRW / Non-deliverable Forward |
nt_prod_usd_myr_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/MYR / Non-deliverable Forward |
nt_prod_usd_php_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/PHP / Non-deliverable Forward |
nt_prod_usd_twd_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency USD/TWD / Non-deliverable Forward |
nt_prod_other_curr_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Currency Others / Non-deliverable Forward |
nt_prod_0m_3m_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 0 – 3 Months / Non-deliverable Forward |
nt_prod_3m_6m_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 3 – 6 Months / Non-deliverable Forward |
nt_prod_6m_9m_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 6 – 9 Months / Non-deliverable Forward |
nt_prod_9m_12m_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 9 – 12 Months / Non-deliverable Forward |
nt_prod_1y_2y_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 1 – 2 Years / Non-deliverable Forward |
nt_prod_2y_5y_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity 2 – 5 Years / Non-deliverable Forward |
nt_prod_5y_more_non_deliver_fw | Number | 百萬美元 | New Trade Turnover By Product and Residual Maturity > 5 Years / Non-deliverable Forward |
num_nt_total_asset_class | Number | Number of New Trade Total (Asset Class) |
|
num_nt_prod_non_deliver_fw | Number | Number of New Trade By Product Non-deliverable Forward |
|
num_nt_prod_intent_clear_non_deliver_fw | Number | Number of New Trade By Product and Intention to Clear Intended to Clear / Non-deliverable Forward |
|
num_nt_prod_not_intent_clear_non_deliver_fw | Number | Number of New Trade By Product and Intention to Clear Not Intended to Clear / Non-deliverable Forward |
|
num_nt_prod_usd_cny_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/CNY / Non-deliverable Forward |
|
num_nt_prod_usd_idr_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/IDR / Non-deliverable Forward |
|
num_nt_prod_usd_inr_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/INR / Non-deliverable Forward |
|
num_nt_prod_usd_krw_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/KRW / Non-deliverable Forward |
|
num_nt_prod_usd_myr_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/MYR / Non-deliverable Forward |
|
num_nt_prod_usd_php_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/PHP / Non-deliverable Forward |
|
num_nt_prod_usd_twd_non_deliver_fw | Number | Number of New Trade By Product and Currency USD/TWD / Non-deliverable Forward |
|
num_nt_prod_other_curr_non_deliver_fw | Number | Number of New Trade By Product and Currency Others / Non-deliverable Forward |
|
num_nt_prod_0m_3m_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 0 – 3 Months / Non-deliverable Forward |
|
num_nt_prod_3m_6m_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 3 – 6 Months / Non-deliverable Forward |
|
num_nt_prod_6m_9m_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 6 – 9 Months / Non-deliverable Forward |
|
num_nt_prod_9m_12m_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 9 – 12 Months / Non-deliverable Forward |
|
num_nt_prod_1y_2y_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 1 – 2 Years / Non-deliverable Forward |
|
num_nt_prod_2y_5y_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity 2 – 5 Years / Non-deliverable Forward |
|
num_nt_prod_5y_more_non_deliver_fw | Number | Number of New Trade By Product and Residual Maturity > 5 Years / Non-deliverable Forward |
備註:
1. 有關香港儲存庫數據披露的詳情,請參閱 https://hktr.hkma.gov.hk/ContentDetail.aspx?pageName=Data-Disclosure⟨=TC. |
應用程式介面例子
Javascript例子
$.ajax({url: 'https://api.hkma.gov.hk/public/financial-market-infra/trade-repository/hktr-data-disclose-fx?segment=positions&offset=0',dataType:'json',success:function(data){alert('results found:'+ data.result.datasize)}});
Python例子
import urllib.requesturl = 'https://api.hkma.gov.hk/public/financial-market-infra/trade-repository/hktr-data-disclose-fx?segment=positions&offset=0'with urllib.request.urlopen (url) as req:print (req.read())