
Function reference
-
ct_get_data()
- Get trade data from the UN Comtrade API
-
ct_check_params()
- Check that input parameters are valid and in compliance with UN Comtrade APIs.
-
ct_build_request()
- Build a valid request object from the checked parameters
-
ct_perform_request()
- Performs the request to the Comtrade API
-
ct_process_response()
- Processes the response object
-
get_primary_comtrade_key()
- get_primary_comtrade_key
-
set_primary_comtrade_key()
- Set your primary Comtrade API key in the environment variable
Access package data
These functions allow you to access internal reference tables, such as possible ISO codes and commodity codes.
-
country_codes
- Country codes
-
ct_commodity_lookup()
- UN Comtrade commodities database query
-
ct_get_ref_table()
- Get reference table from package data
Deprecated functions
These functions were part of the previous iteration of the package and are now deprecated.
-
ct_commodity_db_type()
- ct_commodity_db_type
-
ct_country_lookup()
- ct_country_lookup
-
ct_get_remaining_hourly_queries()
- ct_get_remaining_hourly_queries
-
ct_get_reset_time()
- ct_get_reset_time
-
ct_pretty_cols
- ct_pretty_cols
-
ct_register_token()
- ct_register_token
-
ct_search()
- ct_search
-
ct_update_databases()
- ct_update_databases
-
ct_use_pretty_cols()
- ct_use_pretty_cols