I have gone through your query and understood your concerns. In my opinion there must be injury
to a ligament which is causing such type of pain. Usually when you play basketball you have to work on your foot more so due to strain some times there will be some injury and it will be normal by itself. If possible give some rest to you legs and at night sleep with foot elevated. Thank you.