The total is about six inches with the pin part making up four inches. It is made of good steel and shows no signs of hammers working it.
There is wearing on the pin about the middle and sharp worn corners probably saying it was used in a steel socket.
But for what? I asked a veteran train man if he ever seen one and no. So probably related to agriculture or transport using horse power?