Would it work if I sent money or crypto from my crypto wallet to a contract address? Would it automatically send me back the token that I wanted to exchange for? Because sometimes its hard to find tokens on exchanges or swap/exchange websites.
By the way, a contract address is where the token is located. Its like a wallet address.
Is this what you mean?
1) You want a token but you can't find it on exchange
2) You will send the money/crypto instead of the token's contract address and have the equivalent of it to be sent to you automatically.
If yes, then that won't work. It's always a reminder to never send money to a contract address. Those you see wherein someone sending a token in a contract address is to execute the token swap for example and that's automatic. The one that transfers here is the token itself and not the actual money.
And out of curiosity, why bother purchasing this kind of tokens that isn't listed on the exchange? There is no liquidity so I doubt you will gain profit from it. You can also look at some decentralized exchange as it might have an active market there like for example Etherdelta for ERC20 tokens (if not listed, you can manually input it).