Swap tokens across multiple exchanges using Metamask

Hello guys and girls,

Is there a way to programmatically swap token A (ex: BNB) that I have in my Metamask with some token B (ex: CAKE) using a particular exchange (ex: Pancake Swap)?

I would like to sell one token from my Metamask and buy another token from various exchanges (Uniswap, PancakeSwap etc) depending on which one has better prices at that moment.

Ideally, I would like to be able to integrate with all the networks that Moralis supports (Ethereum, Binance, Polygon network etc) and swap tokens from my Metamask wallet on a specific exchange at a specific time (using Python code for example).

I watched two amazing videos that you folks posted on YouTube, but I’m still unclear how I can reach my full goal - here are the videos with a comment of what I think:

talks about swap on 1INCH only, not multiple exchanges. I’m not clear how I would bring the token to Metamask

talks about swap on Metamask itself, not multiple exchanges (as I want)

If you could share an article on how I can integrate with some of the popular DEXes and swap tokens on various networks from my Metamask, I would highly appreciate it and even contribute with some tokens/monetarily if needed.

Thanks!

then you’ll need smart contract that can aggregate all those swapping, but Metamask itself cannot handle that by itself :raised_hands: