Wash and soak the black eyed peas overnight. Change water couple of times, and pressure cook till soft. Keep it aside. Don't drain the water, you can use it for cooking.
Heat a kadai with oil, fry the red chillies, keep aside. Fry the other ingredients for the masala individually add oil if necessary. Keep aside.
In the same pan fry the coconut, onions and garlic, on low flame till the coconut is reddish brown in colour, use oil if needed. Cool.
Grind to a fine paste all the fried spices, coconut onion mixture, along with the tamarind. Keep it aside. Heat a non stick pan with oil, fry finely chopped onions till soft, add the boiled beans without water. Combine and cook well.
Next add the ground masala paste, turmeric, salt. Saute everything well until the beans get coated well. Then add the reserved water and bring to boil. When the gravy thickens as required, add chopped coriander leaves and simmer for 5 mins.