Skip to content

Trade recipes

The trade category covers the canonical trade data fetch: annual / monthly exports and imports, trade balance, and tariffline queries. Recipes 011–013 are beginner; 014–015 are intermediate.

ID Title Runtime API key
RECIPE-011 Fetch India's annual exports 1 – 2 s no
RECIPE-012 Fetch India's annual imports 1 – 2 s no
RECIPE-013 Fetch world totals 1 – 2 s no
RECIPE-014 Compute the trade balance 2 – 4 s no
RECIPE-015 Tariffline query 2 – 4 s yes

Path

  1. RECIPE-011Fetch India's annual exports.
  2. RECIPE-012Fetch India's annual imports.
  3. RECIPE-013Fetch world totals.
  4. RECIPE-014Compute the trade balance.
  5. RECIPE-015Tariffline query.

Run them all

for recipe in recipes/trade/*.py; do
    UN_COMTRADE_MOCK=1 python "$recipe"
done

Next steps