Sorry - don't mean to scare you.
I just saw that you got it recently too, stress could cause it as well. Other things that can cause it is constipation, bacterial infection, and internal parasites. But it looks like it poops often so far, so that should rule out constipation.
It's really hard to say exactly what they have. Typically for me, when I used to get fishes from Petco/Petsmart I do a quarantine de-wormer, and bacteria medication right off the bat just because they were more prone to getting that.
I just got some peas and tried to feed it to him, which he would eat over and over and then spit out. I'm trying to rule out everything else before I medicate him for something he may not have. I'm not seeing any white string poop from the rainbow shark. But next time if I choose to buy another fish from there I will do so cautiously.
I'm currently working on buying a actual water testing kit, as I only have strips right now. I stupidly didn't research before I bought my fish & listened to the people at petsmart. So now I'm trying to cycle with my fish in, I know I'm "harmful" in ammonia, so I've been doing daily 25%, sometimes 50% water changes and adding ammonia remover. Would you like me to post a pic with the test strip results for ph and nitrates and such?