None of Buffalo Bill's ancestors went to Newfoundland that I know of. His great-great-great grandfather came to Beverly, MA in 1692.
Any cousins with the Cody name would have to have come from Buffalo Bill's uncles: Elias, Elijah, Joseph or Philip, all of whom appear to have been born in Toronto, Ontario but relocated to Ohio. I don't know the children of Elias or Joseph. The children of Elijah and Philip were all born in Ohio. These five: Elias, Elijah, Joseph, Philip and Isaac (Buffalo Bill's father) were all sons of Philip COdy and Lydia Martin. Philip COdy was born in Massachusetts the great grandson of Philipe Les Caude who emigrated from France. After three generations in MA, it was during Philip Cody and Lydia Martin's marriage that the family moved to Toronto, Ontario for a time where all their children were born. It seems that except for this period in Philip and Lydia's marriage the Cody family remained in the United States. There is no mention of them having lived anywhere in Canada other than Toronto. ANy second cousins would have to have come from the sons of these aforementioned uncles and all of the ones known lived their adult lives in the United States.
I can tell you this with certainty, if your Cody line is absolutely, positively of Irish heritage there is no relationsihp at all. The Cody name was adopted by the family around 1700, the original name being Les Caude or some other such French name. Many Codys of Irish heritage believe there is a connection but it is usually based on a grandmother or such who has made the presumption based on the name Cody and the misinformation is bassed down.
On a personal note, my mother is convinced we are related to the Pinkham's of "Lydia Pinkham's Pills" fame. One of our family lines is the Pinkhams but I can find no proof that our Pinkhams are the same as the famous Pinkhams. Yet my mother insists this to be the case. She recalls her grandmother saying so when my mother was a child (she is now 93). And so the misinformation has been passed down. I cannot find the connection and will not accept this relationship. It could be that your family legend is likewise incorrect.