I am currently writing an arbitrage bot which fills 0x orders but something that is confusing me is that the 0x order format is not consistent within their documentation.
The order message format specified here in the 0x docs differs from this order message format specified in the api section of the 0x docs. When using the api, I receive orders with the latter format.
0x docs format:
0x api docs format:
Could this be a difference between 0x v3 and v4? The 0x cheat sheet contains the different contracts from v3 and v4. Looking at the v3 contract code, it seems to take the former order message format specified in the 0x docs. However, the v4 contract is less straightforward since it uses a proxy contract however this article says "Trades executed through the proxy are settled securely via Exchange V3." so I guess there is no change with the fillOrder function.
If anyone knows how to fill a 0x order using a smart contract or has up to date resources on this topic that would be great.