early 15c., "a cheat, a mean ruse," from Old North French trique "trick, deceit, treachery, cheating," from trikier "to deceive, to cheat," variant of Old French trichier "to cheat, trick, deceive," of uncertain origin, probably from Vulgar Latin *triccare, from Latin tricari "be evasive, shuffle," from tricæ "trifles, nonsense, a tangle of difficulties," of unknown origin.
Meaning "a roguish prank" is recorded from 1580s; sense of "the art of doing something" is first attested 1610s. Meaning "prostitute's client" is first attested 1915; earlier it was U.S. slang for "a robbery" (1865).
To do the trick "accomplish one's purpose" is from 1812; to miss a trick "fail to take advantage of opportunity" is from 1889; from 1872 in reference to playing the card-game of whist, which might be the original literal sense. Trick-or-treat as a children's Halloween pastime is recorded from 1927 in Canada. Trick question is from 1907.
adjective suffix, "full of or characterized by," from Old English -ig, from Proto-Germanic *-iga- (source also of Dutch, Danish, German -ig, Gothic -egs), from PIE -(i)ko-, adjectival suffix, cognate with elements in Greek -ikos, Latin -icus (see -ic). Originally added to nouns in Old English; used from 13c. with verbs, and by 15c. even with other adjectives (for example crispy).
<a href="https://www.etymonline.com/word/tricky">Etymology of tricky by etymonline</a>
Harper, D. (n.d.). Etymology of tricky. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/tricky