香港储存库数据披露 – 外汇衍生工具

应用程式介面详细规格

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⟨=SC.

应用程式介面例子

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.request
url = '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())

如何使用应用程式介面

有关详情,请浏覧「应用程式介面规格」。