0

Let's imagne I have DAI and USDT, and I want to sell both for ETH.

But it seems like API might only support one token at a time:

sellToken The ERC20 token address or symbol of the token you want to send. "ETH" can be provided as a valid sellToken.

And the RFQ onchain only one token at a time as well:

takerToken The ERC20 token the taker is selling and the taker is selling to the maker. [required]

2 Answers 2

1

Theoretically, you can write a special proxying smart contract, within which any number of transfers can be made by internal transactions. However, it should be borne in mind that transfer transactions to specific tokens will be sent from the address of this proxy contract, since the specific implementation of the token determines who will be identified as the owner of the token: msg.sender - the sender of the internal transaction or tx.origin - the sender of the original transaction. This is usually msg.sender, but...

0

0x API does not currently support selling multiple tokens in one transaction. While it is technically possible to use 2 quotes if you are executing the trade from a smart contract, but you should keep in mind that it would add complexity (and gas overhead).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.