Trade with the United States

API Detailed Documentation

API URL:

API Data Enquiry

Output Fields (JSON) Swagger Format
 
Name Type Unit Of Measure Description
Tr_yr Date Year
Tr_usimphkduty_a Number US Dollar  US Dutiable Import from HK 
Tr_usimphkfree_a Number US Dollar  US Duty-free Import from HK 
Tr_usimphktl_a Number US Dollar  US Total Import from HK 
Tr_usexphkduty_a Number US Dollar  US Dutiable Export to HK 
Tr_usexphkfree_a Number US Dollar  US Duty-Free Export to HK 
Tr_usexphktl_a Number US Dollar  US Total Export to HK 
Footnotes
Trade with the United States
Unit: US Dollar.
Period: 1889-1898 
Source:  Frank H. Hitchcock (1990), Our Trade with Japan, China, and Hongkong 1889-1899.
Javascript Example
$.ajax({
url: 'https://api.hkma.gov.hk/public/hkimr/trade-us?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/hkimr/trade-us?offset=0'
with urllib.request.urlopen (url) as req:
print (req.read())