Heat the oil in a pan and fry the coconut, fennel seeds and 3/4th of the onion until golden. Add chili powder and turmeric powder and stir-fry for a minute. Grind this in a food processor.
Fry the remaining onions until golden brown. Remove from oil and set aside.
Heat the tamarind juice in a pan over low heat. Add the ground spices, ginger, green chili and tomatoes. When the mixture starts boiling add the fish and salt. Cook for 10-15 minutes or until the fish is tender. Now add the fried onions and sprinkle the curry leaves. Serve hot.