Hamsters eat seeds, grains and nuts, vegetables, and a little fruit.

Hamster mix
Hamster mix is sold in pet store. It is specially prepared to provide a hamster with a well-balanced diet of its essential foods - grains, seeds, and nuts.

Both root and green vegetables should be given, always raw.

Give fresh water every day.

How often should a hamster be fed?
Feed your hamster once a day, in the late afternoon or evening.

How much food does it need?
Give a small handful of hamster mix and a small handful of vegetables. If any is left uneaten, give less the next day. If all is eaten, try giving more, but first check that your hamster is not hoarding it in its cage.

Source: Taking Care of Your Hamster by Helen Piers.