Data Trends for Investment Professionals

GO TO QUANDL.COM ⟶

API for China Data

Tags:

API for China Data

Quandl provides a single easy-to-use API for Chinese market, economic, industrial, and social data. Coverage includes China’s stock market, GDP, unemployment, inflation, interest rates, stock fundamentals and many other socioeconomic indicators.

Example Calls

China GDP per capita:

Free:

https://www.quandl.com/api/v3/datasets/ODA/CHN_PPPPC.csv?api_key=YOURAPIKEY

Premium:

https://www.quandl.com/api/v3/datasets/SGE/CHNGPCP.csv?api_key=YOURAPIKEY

China interest rates:

Free:

https://www.quandl.com/api/v3/datasets/WORLDBANK/CHN_FR_INR_RINR.csv?api_key=YOURAPIKEY

Premium:

https://www.quandl.com/api/v3/datasets/SGE/CHNIR.csv?api_key=YOURAPIKEY

Bank of China Revenue:

Free:

Not Available

Premium:

https://www.quandl.com/api/v3/datasets/DY1/601988_REVENUE_AR.csv?api_key=YOURAPIKEY

Note: Premium databases are more reliable, accurate, comprehensive and timely than open databases. You can preview all premium databases for free; all you need is a Quandl API key.

Get Your Free API Key

Data Coverage in Detail

Quandl’s coverage of Chinese data includes data on China’s economy, population, GDP, exports and imports, currency rates, interest rates, stock fundamentals for over 2900 Chinese companies, government bond yields, and many other social and economic indicators.

Quandl’s Chinese data is divided into multiple databases, each covering a different subject. Some databases are free, open, and unrestricted. Other databases are “premium” and available only to paying subscribers. API syntax is exactly the same for both types of database.

Premium databases are designed for professional use; they are of higher quality, better documented, more comprehensive, and updated more regularly than free databases. All premium databases come with free trials; just register for a Quandl account to start using them.

Available databases for Chinese data are listed below. Click on any database name to see full documentation.

China Stock Market Data

Database

Description

Core China Fundamentals Data

Professional-quality stock fundamentals and financial ratios. Data covers 150+ key indicators for 2900+ Chinese companies. Updated daily.

Coming soon: Chinese stock prices on the Shanghai and Shenzhen exchanges, industry-level data, and index data.

China Economy Data

Database

Description

China Macroeconomic and Industrial Data

Macroeconomic data on both China-wide and provincial levels and 1600 sector-specific indicators for 22 different industrial sectors in China.

National Bureau of Statistics China

Data on Chinese economy, demography, and society on the national and local levels.

IMF Cross Country Macroeconomic Statistics

Cross-country commodity prices and macroeconomic indicators, including [population, GDP, employment, government revenue and expenditure.

United Nations Statistics Division Data

Cross-country data on agriculture, commodity prices, energy, environment, growth, health, industry, labour, population and trade.

World Bank Cross Country Data

Annual data on economic development, health, demography and society, for every country in the world.

Federal Reserve Economic Data

Data on Chinese interest rates, exchange rates, central bank assets, cash deficit and surplus.

Trading Economics Standardized Global Data

Harmonized macroeconomic statistics for over 200 countries, including inflation, government budget, trade, external debt, oil production.

China Currency Data

Database

Description

Wiki Exchange Rates

Foreign Exchange rates for all currencies, curated by the Quandl community.

Federal Reserve Economic Data

Data on currency rates, interest rates, GDP and other economic indicators for many countries including China.

China Interest Rate Data

Database

Description

World Bank Cross Country Data

Cross-country data on economic development, health, demography and society, including Chinese interest rates.

Global Yield Curves

Government bond yield curves for 35 countries, including China.

Trading Economics

Harmonized macroeconomic statistics for over 200 countries. Data includes interest rates, inflation, trade, and other indicators.

China Demography Data

Database

Description

World Bank Cross Country Data

Cross-country data on economic development, health, demography and society, including Chinese demographic data.

National Bureau of Statistics China

Data on Chinese economy, demography, and society on the national and local levels.

Federal Reserve Economic Data

Data on Chinese population, GDP, inflation and other socioeconomic indicatos.

Trading Economics

Harmonized macroeconomic and demographic statistics for over 200 countries.

Using the China Data API

Here is an example API call for Bank of China’s total profits:

https://www.quandl.com/api/v3/datasets/DY1/601988_T_PROFIT_MR.csv?column_index=1&sort_order=asc&start_date=2011-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

The above call gets the most recently reported total profits (column 1) for Bank of China, sorted in ascending order from the start of 2011 to the end of 2014, in CSV format, from the DY1 database. The Quandl code for this dataset is DY1/601988_T_PROFIT_MR.

Chinese Databases in Depth

In the following sections, individual databases are described in greater depth. Note that the definitive documentation for any given database can always be found on its documentation pagel what follows is merely a brief overview.

DY1

This database offers up to 9 years of history for 150 essential fundamental indicators and financial ratios for more than 2900 Chinese public companies. Each indicator is available in two variants: “Most-Recently-Reported”, which includes restatements; and “As-Reported”, which excludes restatements.

This data is highly accurate, carefully error-checked, well-documented, and updated every day.

For a complete list of all indicators available and the list of companies included in this database, please visit the DY1 documentation page. Here is an example API for Bank of China’s most recently reported revenue:

https://www.quandl.com/api/v3/datasets/DY1/601988_REVENUE_MR.csv?start_date=2010-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

DY2

This database offers more than 1100 macroeconomic indicators at China-wide and provincial levels. It also includes 1600 sector-specific indicators for 22 different industrial sectors in China.

This database is designed for professional use and is guaranteed to be accurate, well-documented, and timely.

For a complete list of all indicators available in the DY2 database, please refer to the documentation page. Here is an example API call for cumulative government revenue in Beijing:

https://www.quandl.com/api/v3/datasets/DY2/M1000001077.csv?start_date=2010-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

ODA

This database is published by the International Monetary Fund through the Open Data for Africa project. Data coverage includes commodity prices, employment, exports and imports, GDP, government revenue and expenditure, population, and other macroeconomic indicators. The data is available for all countries and not just those in Africa. For a list of all available indicators, please visit the ODA documentation page. Here is an example API call for unemployment rate in China:

https://www.quandl.com/api/v3/datasets/ODA/CHN_LUR.csv?start_date=2000-01-01&end_date=2005-12-31&api_key=YOURAPIKEY

UNDATA

This database includes cross-country data on trade, commodity prices, economic growth, healthcare, labour, industry, and demography for all countries in the world. The Chinese data includes population, unemployment, industrial production, household consumption, trade, agriculture, and many other economic indicators. To see a list of all indicators available in this database and how they are organized, please visit the UNDATA documentation page. Here is an example API call for female population in China:

https://www.quandl.com/api/v3/datasets/UNDATA/GEN_POPL_CHN.csv?column_index=1&start_date=1995-01-01&end_date=2005-12-31&api_key=YOURAPIKEY

WORLDBANK

This database contains cross-country data on economic development, health, society, and demography. The list of available indicators can be found on the WORLDBANK documentation page. The Chinese data includes population, interest rates, employment, education, manufacturing, real estate, construction, and many other social and economic indicators. Here is an example API call for China’s Gini index:

https://www.quandl.com/api/v3/datasets/WORLDBANK/CHN_SI_POV_GINI.csv?start_date=2002-01-01&end_date=2009-12-31&api_key=YOURAPIKEY

STATCHINA

This database is published by China’s national statistical agency and includes data on the state of Chinese economy, demography, health and society at the national and local levels. Data coverage includes household expenditure, taxes, investment, transportation, construction, GDP, wages, money supply, imports and exports. Here is an example API call for China’s exports:

https://www.quandl.com/api/v3/datasets/STATCHINA/Z2515.csv?column_index=5&start_date=2004-01-01&end_date=2011-12-31&api_key=YOURAPIKEY

SGE

This database offers comprehensive, harmonized macroeconomic statistics for over 200 countries. Chinese data includes population, exports and imports, interest rates, GDP, external debt, government budget, crude oil production, inflation and many other economic indicators. To see a list of all available indicators and the dataset nomenclature, please visit the SGE documentation page. Here is an example API call for China’s GDP:

    https://www.quandl.com/api/v3/datasets/SGE/CHNG.csv?start_date=2004-01-01&end_date=2013-12-31&api_key=YOURAPIKEY

CURRFX

This is a currency exchange rate database curated by the Quandl community. Data coverage includes daily exchange rates between Chinese Yuan vs USD, CAD, EUR, GBP and many other currencies. Here is an example API call for CNY vs USD:

https://www.quandl.com/api/v3/datasets/CURRFX/CNYUSD.csv?column=1&start_date=2004-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

YC

This database offers government bond yield curves for 35 countries, including China. Chinese data includes interest rates on 1, 2, 3, 4, 5, 6, 7, and 10-year government bond yields. To learn about the dataset nomenclature in this database, please visit the YC documentation page. Here is an example API call for Chinese 10-year bond yields:

https://www.quandl.com/api/v3/datasets/YC/CHN10Y.csv?start_date=2014-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

FRED

This database includes data on economic growth, population, consumption and production, exports and imports, foreign exchange rates, and many other economic indicators for the US and other countries. Chinese data includes GDP, exchange rates, trade, central bank assets, and cash surplus/deficits to name a few. To see a list of all indicators available in this database, please visit the FRED documentation page. Here is an example API call for China’s gross national income:

https://www.quandl.com/api/v3/datasets/FRED/MKTGNICNA646NWDB.csv?start_date=2014-01-01&end_date=2014-12-31&api_key=YOURAPIKEY

Terms and Licensing

Use of the Quandl API is free and unlimited for registered users.

All open databases on Quandl are completely free and unencumbered.

Premium commercial databases like DY1, DY2 ,YC and SGE are governed by their respective subscription licenses. On any database page, click on “view pricing” and then “full license” to see these terms. Quandl offers by far the most liberal terms of use of any commercial data provider in the world, explained in clear language with minimal legalese. Basically, you can almost always do whatever you want with the data.

Most premium databases on Quandl come with a speculative developer license, giving developers and startups full use and redistribution rights at steep discounts (80% or more). Premium databases also come with generous free trials; try before you buy!

Additional Resources

If you haven’t already done so, we recommend reading Quandl’s general API documentation; all the above functionality will be a lot clearer if you do so. All of Quandl’s datasets are also available through our tools for R, Python, Excel, Matlab, Maple, Stata, Julia and more.

In addition to stock fundamentals, Quandl has a number of other premium databases. These databases are, without exception, the best available on the internet, in terms of data quality, accuracy, reliability, timeliness, documentation, usability and licensing.

Quandl also has several Chinese data dashboards, showing latest values for a number of Chinese statistics:

Registration

To use Quandl’s API for Chinese data, please register for a free Quandl API key:

Get Your Free API Key

Why register?

Registered users enjoy unlimited downloads, unlimited API usage and free preview access to all premium databases.

Fix This
Created with Sketch.