Grind the spices (dry chillies, mustard seeds, peppercorns, cumin seeds) to a fine powder. Then add the coconut, onion, garlic & tamarind and grind to a fine paste using approx 3-4 tablespoons of water.
Transfer the masala into a pan and rinse the mixer jar with approx 1 cup of water and add this to the pan as well. Add the green chilli if using, salt to taste and bring the curry to a boil. Adjust the consistency of the gravy by adding more water in 1/4 cup increments. Let the curry simmer for 2 minutes and then remove from heat
To season, heat the ghee or coconut in a seasoning pan, add the sliced onions and fry them till light golden.
Pour the seasoning into the prepared curry. Serve hot with boiled rice