Trade with China

API Detailed Documentation

API URL:

API Data Enquiry

Output Fields (JSON) Swagger Format
 
Name Type Unit Of Measure Description
Tr_yr Date Year
Tr_chimphk_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar 
China Import from HK 
Tr_chexphk_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar 
China Export to HK 
Tr_chimptl_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar 
Total China Import
Tr_chexptl_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar 
Total China Export 
Tr_chimphkper_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar
% of China Import from HK 
Tr_chexphkper_a Number 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar 
% of China Export to HK 
Footnotes
Trade with China
Unit: 1864-1932 silver in HaiKwan Taels
1933-1940 HK dollar
Period: 1864-1940
Source:  G.B. Endacott (1964), An Eastern Entrepot: document 33.
Javascript Example
$.ajax({
url: 'https://api.hkma.gov.hk/public/hkimr/trade-china?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-china?offset=0'
with urllib.request.urlopen (url) as req:
print (req.read())