I'm currently trying to use the 1inch API documented here: https://docs.1inch.io/api/nodejs-web3-example
I would be interested in using the 1inch pathfinder api from a solidity smart contract to make swaps programmatically. The problem is that the way the api works is that you call the HTTP api and you get the transaction calldata already compiled that only needs to be signed and sent to the network. So basically there is no smart contract to invoke from solidity (like with other dexes).
What I was wondering was if it would be possible to use the api to get the calldata for a given swap and then, providing this calldata to a smart contract, integrate this swap as an operation made by the smart contract.
I'm not an expert in solidity and I don't know if what I'm asking is even possible, but anyway thanks to anybody that will answer.
Note: I know originally the 1split protocol was a smart contract deployed on the blockchain but that has been deprecated and is not available on the bsc chain, where I also want to operate, so it isn't a viable option.