Is it possible for a smart contract to swap using 0x without receiving the calldata from outside?
I know how to make my deployed contract to swap with 0x by creating a fillQuote function and passing the data received from an HTTP API request as the arguments of that function (basically what is explained in the 0x docs).
What I am struggling with is to make my deployed contract to initiate a 0x swap without me having to make an external HTTP API request. That is, the smart contract determines internally (by some solidity computation) the token it needs to sell (tokenIn), the token it wants to buy (tokenOut) and the amount it wants to sell (amountIn). As a result, this information was not previously known or accessible by the external keeper. Can then the smart contract initiate a 0x swap with that information and without access to the external API data (like it could do with say a Uniswap V2 router)?
Or alternatively, is there anyway that the smart contract can internally re-create (encode) the SwapCallData?