HKTR Data Disclosure – Foreign Exchange Derivatives

API Detailed Documentation

API URL:

https://api.hkma.gov.hk/public/financial-market-infra/trade-repository/hktr-data-disclose-fx?segment=positions

Request Parameters (Mandatory)

Parameter Name Description
segment Used to indicate which sets of data are going to retrieve.
Format: segment=data segment name (positions | turnover)
Example: segment=positions

Positions

Output Fields (JSON)
Swagger Format
Name Type Unit Of Measure Description
end_of_date Date As at
Date in ISO format yyyy-mm-dd
For example, 2021-02-01
on_total_asset_class Number US$mn Outstanding Notional
Total (Asset Class)
on_prod_non_deliver_fw Number US$mn Outstanding Notional
By Product
Non-deliverable Forward
on_prod_intend_clear_non_deliver_fw Number US$mn Outstanding Notional
By Product and Intention to Clear
Intended to Clear / Non-deliverable Forward
on_prod_not_intend_clear_non_deliver_fw Number US$mn Outstanding Notional
By Product and Intention to Clear
Not Intended to Clear / Non-deliverable Forward
on_prod_usd_cny_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/CNY / Non-deliverable Forward
on_prod_usd_idr_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/IDR / Non-deliverable Forward
on_prod_usd_inr_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/INR / Non-deliverable Forward
on_prod_usd_krw_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/KRW / Non-deliverable Forward
on_prod_usd_myr_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/MYR / Non-deliverable Forward
on_prod_usd_php_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/PHP / Non-deliverable Forward
on_prod_usd_twd_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
USD/TWD / Non-deliverable Forward
on_prod_other_curr_non_deliver_fw Number US$mn Outstanding Notional
By Product and Currency
Others / Non-deliverable Forward
on_prod_0m_3m_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
0 – 3 Months / Non-deliverable Forward
on_prod_3m_6m_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
3 – 6 Months / Non-deliverable Forward
on_prod_6m_9m_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
6 – 9 Months / Non-deliverable Forward
on_prod_9m_12m_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
9 – 12 Months / Non-deliverable Forward
on_prod_1y_2y_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
1 – 2 Years / Non-deliverable Forward
on_prod_2y_5y_non_deliver_fw Number US$mn Outstanding Notional
By Product and Residual Maturity
2 – 5 Years / Non-deliverable Forward
on_prod_5y_more_non_deliver_fw Number US$mn 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

Turnover

Output Fields (JSON)
Swagger Format
Name Type Unit Of Measure Description
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 US$mn New Trade Turnover
Total (Asset Class)
nt_prod_non_deliver_fw Number US$mn New Trade Turnover
By Product
Non-deliverable Forward
nt_prod_intend_clear_non_deliver_fw Number US$mn New Trade Turnover
By Product and Intention to Clear
Intended to Clear / Non-deliverable Forward
nt_prod_not_intend_clear_non_deliver_fw Number US$mn New Trade Turnover
By Product and Intention to Clear
Not Intended to Clear / Non-deliverable Forward
nt_prod_usd_cny_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/CNY / Non-deliverable Forward
nt_prod_usd_idr_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/IDR / Non-deliverable Forward
nt_prod_usd_inr_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/INR / Non-deliverable Forward
nt_prod_usd_krw_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/KRW / Non-deliverable Forward
nt_prod_usd_myr_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/MYR / Non-deliverable Forward
nt_prod_usd_php_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/PHP / Non-deliverable Forward
nt_prod_usd_twd_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
USD/TWD / Non-deliverable Forward
nt_prod_other_curr_non_deliver_fw Number US$mn New Trade Turnover
By Product and Currency
Others / Non-deliverable Forward
nt_prod_0m_3m_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
0 – 3 Months / Non-deliverable Forward
nt_prod_3m_6m_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
3 – 6 Months / Non-deliverable Forward
nt_prod_6m_9m_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
6 – 9 Months / Non-deliverable Forward
nt_prod_9m_12m_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
9 – 12 Months / Non-deliverable Forward
nt_prod_1y_2y_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
1 – 2 Years / Non-deliverable Forward
nt_prod_2y_5y_non_deliver_fw Number US$mn New Trade Turnover
By Product and Residual Maturity
2 – 5 Years / Non-deliverable Forward
nt_prod_5y_more_non_deliver_fw Number US$mn 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

Footnotes:

1. For further details of HKTR data disclosure, please refer to https://hktr.hkma.gov.hk/ContentDetail.aspx?pageName=Data-Disclosure⟨=eng.

API Examples

Javascript Example

$.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 Example

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())

How to use the APIs

To learn more, please visit API documentation.