In a pan, add oil. Once it's hot, add split urad dal, split chana dal, and dried red chilies. Saute till the dal turns light golden in color.
Then add onions and garlic cloves and saute for 2-3 minutes until onions turn soft.
Then add curry leaves, and saute till the onions turn light brown. Turn off the flame and cool the mixture completely.
Once cooled, transfer the mixture into the blender. Add tamarind, jaggery, and salt and blend with no or very less water until smooth.
Heat coconut oil in a small pan, add mustard seeds, dry red chili, curry leaves, and hing, and saute for a few seconds.
Add the tempering and pour the tempering over the ground onion chutney.
Serve onion chutney with idli or dosa.