I have edited your post so I wouldn't have to close this thread. We can't tell you what you took, only a testkit can give you an indication and lab tests are the only way to be really sure so threads asking 'what did I take' aren't allowed. I think you could benefit from hearing other people's experiences so I've put in another question in stead of the original one. I hope you don't mind, if you do I understand and will restore the original message but would have to close the thread.
So my advice: there is a chance you took something that wasn't MDMA, there's a chance you in fact took MDMA. No way of knowing. I've had rolls on tested MDMA where I had trouble sleeping afterwards, because my mind wouldn't quiet down. I've had rolls where I've slept like a baby afterwards, instantly when my head touched my pillow. If you have the chance to test it now, if you still have a bit left, do that. If not don't linger on it too long, you had a bad experience and should test your drugs, move on. It's possible you're going to be fine within a day, it's possible you're going to have some after-effects in the days following. Never anything permanent though you should be fine. It always passes. It always has for me the few times I've run into dirty pills without testing them