Peel and chop the onion. Fry in hot oil. Simmer with tomatoes and ketchup for about 10 minutes, season to taste. Let it cool down. Cut the maties into pieces and add to the sauce. Cover and chill overnight.