I'm a guinea pig owner, but I've never had hamsters. With any of my guinea pigs, when I first bring them home, they take awhile to get settled before they will eat. I usually feed them an extra small amount of pellets so I can easily tell if they have been eating or not.
My guinea pigs can eat fruit, but the sugar content isn't good for them, so I stick mainly to vegetables like green leafy stuff. I just looked at a bit of Hamster information online, and they have different dietary needs as they are omnivorous, while GPs are vegetarian. Here's one of the links I found:
There is a wealth of info on the internet about learning to care for your new critters.
What did you name the hamsters? Good luck with them!