A trade is the act of converting one asset into a different asset. A trade is initiated from a wallet or address and the resulting asset is sent back to the same source.
To trade from one asset to another, ensure that the address contains sufficient ETH to pay for transaction fees, and sufficient funds of the asset you are trading from.
Crypto transactions take varying amounts of time—anywhere from hundreds of milliseconds, to tens of minutes, depending on the blockchain network and wallet set-up. For example, transactions on Bitcoin can take upwards of 30 minutes, while transactions on Base take a second or two.
Once your address has ETH in it, we can call the trade
function to trade ETH
for USDC
:
You can use status
to query a crypto transaction’s status
.
A common case is to check whether the transaction succeeded or failed.