I want to stay friends and hang out with my ex
Why is that so? He was your boyfriend for like 5 years.
Because sometimes I miss him so much
If you are both on the same page about being platonic friends, then it is fine. There is no reason to cut him out of your life completely if you both can handle it.
I agree and I just want the chance to fix what went wrong.
You both need to set boundaries with each other so nobody has their toes stepped on. If you can come together and do that, there is no problem remaining friends.