Hello everyone

I have a betta fish (fish stick). I just got him about 2 weeks ago. He was pretty shy at first but warmed up to us. He became energetic and when I went to feed him he swam to the top every time. I recently just noticed that he wasn't eating any of his pellets and when I fed him he wouldn't even move. He hasn't eaten anything for 2 days now. He also just seems to stay in one spot. I see that his fins are moving but it looks like he is floating to the top. Is there anyone that may know what is wrong with him? And what I can do to help him? Any help would be greatly appreciated. THANKS