DX Broken

I was riding today and the cap on my crank has vanished. So my crank has started to slip off the hub. Does anyone know where i can get a new one, or how i can fix it?

thanx

it vanished cause you never checked them for retightening. you can get a 8mm allen crank bolt at any shop for a buck.