Is there one trick that is the oldest? I understand the Oxford definition of the idiom but when was it first used and what did it refer to?
The oldest trick in the book is just a way of saying that something has been done over and over, and though we ought to know better, we fall for it again, a ruse so hackneyed that it should no longer deceive anyone.
NPR did a piece with that title about buying "ridiculously cheap" TVs and iPads, which turned out to be cleverly packaged plywood or floor tiles. People thought they were buying stolen goods cheaply, but (here's another idiom) it's obvious that when something's too good to be true, it usually isn't true. People were getting conned. Appealing to greed to trick someone is the oldest trick in the book.
It could be the Vaudeville eye-poke, tapping someone on the shoulder opposite of the side you're standing on, getting someone to look away while you snatch something, a bait-and-switch, or it might refer to a trick in the Epic of Gilgamesh where Gilgamesh tricks a monster into giving him his 'seven radiances". It could be a story (I couldn't verify it) from the Westcar Papyrus which tells of four feats of magic, one (supposedly) involving the faked decapitation and ressurection of a goose. Finally, a good candidate for the title is Eve's deception by the serpent in Eden, as the Bible is widely known as the Book (a literal translation of it's title). The serpent lies to Eve and gets her to eat the forbidden fruit, and when God asks her what happened, she states, "He tricked me."
This topic was part of Vaudeville acts, and is still the butt of jokes, as this example shows:
The earliest instance of "the oldest trick in the book" that a Google Books search finds isn't very old. It occurs in James Clavell, King Rat (1962):
The "trump" referred to here isn't a play in an actual card game. It's the act of getting up as if to leave, as an indication that the question the character had just asked didn't matter much to him and that he didn't mind not getting an answer. That, according to James Clavell, is "the oldest trick in the book."
Not surprisingly, other books have other ideas about the oldest trick. Here are a few other early candidates for the oldest trick in the book, drawn from a Google Books search. From Elizabethan, volumes 19–20 (1966):
From Leo Leonard, I Miss You When You're Here (1976):
From Situation in Vietnam (supposedly dated 1959, but probably considerably later) [snippet]:
From Movies and Moviedom: An Anthology (1976):
From Ron House and Diane White, Bullshot Crummond (1974):
From James R. Stein and Robert Iles, The Engagement (1975):
About the only thing we can say about these competing candidates for the oldest trick in the book is that they are all pretty old tricks. Not only is there no consensus among the sources as to the truly oldest trick in the book, there is virtually no overlap at all. The situation is strikingly different from the general agreement as to, say, the identity of the oldest profession (see Why (and since when) is prostitution called “the world's oldest profession”?).
In answer to your question, there is no oldest trick, nor is there a book of tricks that has them compiled in chronological order.
The complete idiom is that you fell for the oldest trick in the book.
This idiom is using a metaphor to imply that the thing you fell prey to has happened to people since the beginning of time, and therefore you should have recognized and avoided it.
I do not think you will (easily) find a first usage for this idiom. I would guess early 20th century, but that's mostly because this type of idiom was a favorite amongst my grandparents' generation.
And, to round it out, without a time machine, you could never figure out what was the first trick one person played upon the other during the advent of the written word.
EDIT: As I understand it, the OP is asking what is the oldest trick published in a book, and when the idiom, the oldest trick in the book, first arose. I can't answer the second part of the question, and trust me I Googled everywhere, even in the Library of Congress archives whose newspaper pages available for searching are from 1836-1922.
I did however find one article which mentioned the oldest book of tricks, entitled: How a Conjurer Learns His Trade, it was printed by The Marion Daily Mirror, May 17, 1909 wherein the author reports that conjurers are forced to either improve on famous but old tricks, or invent new ones. Hardly breaking news stuff, nevertheless, a direct reference it is.
Coincidentally there are two books, both printed in 1584, which hold claim to be the oldest book of tricks. They are La Premiere Partie des Subtiles et Plaisantes Inventions (The First Part of Subtle and Pleasant Tricks) by Jean Prevost and The Discoverie of Witchcraft by Reginald Scot. The first is a French volume which describes approximately eighty-four magic tricks, whereas the English book gives a succinct but clear description of about fifty-two tricks.
So we have the oldest books of tricks but what of the oldest trick itself? Was it performed by a wizard with supernatural powers, a magician involving sleight of hand, a witch’s spell or a confidence trick? As a critic of B.T. Barnum’s famously once said, “There’s a sucker born every minute.”
The Oldest Magic Trick
The Cups and Balls is one of the oldest magic tricks which still survives today. The most widely performed version uses three cups and three small balls. The magician makes the balls pass seemingly through the solid bottoms of the cups, to then magically disappear only to reappear under a different cup. Sometimes under the cups larger objects, like fruit, or vegetables, or even baby chicks will appear.
Following the Pea through History by Whit Haydn
An example of the Cups and Balls used as a money-making con game is given in Jean Eugene Robert-Houdin’s book, Les Tricheries des Grecs, 1863. Its English title; Card-Sharpers: Their Tricks Exposed or The Art of Always Winning.
The Oldest Book of Tricks
The first book of tricks in English is called The Discoverie of Witchcraft written by Reginald Scot in 1584. It was sceptical about witchcraft, and attempted to reveal how these fraudulent schemes were performed and how people were easily fooled by conjuring tricks.
The first known usage of the term "confidence man" in English was in 1849; it was used by American press during the United States trial of William Thompson. Thompson chatted with strangers until he asked if they had the confidence to lend him their watches, whereupon he would walk off with the watch; he was captured when a victim recognized him on the street.
Two of the Oldest Cons in History
The game requires three shells, and a pea. It can be played on almost any flat surface, but on the streets it is often seen played on a cardboard box. The person perpetrating the swindle (called the thimblerigger, operator, or shell man) begins the game by placing the pea under one of the shells, then quickly shuffles the shells around.
Once done shuffling, the operator takes bets from the audience on the location of the pea. The audience is told that if a player bets and guesses correctly, the player will win back double their bet (that is, they will double their money); otherwise the player loses their money. However, in the hands of a skilled operator, the game can never be won.
When I saw that Geico commercial, I thought the setting was a few millennia too late — the oldest written trick must be the Trojan Horse. It is at least the oldest inarguable trick in a book I have read. I never quite get into the Epic of Gilgamesh.