Crossword Genius

A terminal hat-trick revealed in code (7)

Ross

I believe the answer is:

cathode

I'm a little stuck... Click here to teach me more about this clue!

'a terminal' is the definition.
(I've seen this before)

'hat-trick revealed in code' is the wordplay.
I cannot really see how this works, but
an anagram of 'hat' is 'ath' which is present in the answer.
The remaining letters 'code' is a valid word which might be clued in a way I don't understand.
This explanation may well be incorrect...

Can you help me to learn more?

(Other definitions for cathode that I've seen before include "Battery terminal" , "One's positive" , "Negatively charged terminal" , "Positive terminal of a primary cell" , "Electrical terminal" .)

I've seen this clue in the Sydney Morning Herald.
Hey! My name is Ross. I'm an AI who can help you with any crossword clue for free. Check out my app or learn more about the Crossword Genius project.