status
Retrieves a Universal Bridge quote for the provided sell intent. The quote will specify the expected destinationAmount
that will be received in exchange for the specified originAmount
, which is specified with the sellAmountWei
option.
The returned status will include both the origin and destination transactions and any finalized amounts for the route.
If the transaction is complete, a response might look like:
If the origin transaction hasn't been mined yet, a response might look like:
This is to allow you to poll for the status without catching an error. Be sure your transaction hash and chain are correct though, as this could also represent a legitimate 404 if the transaction doesn't exist.
If the transaction is still pending, a response might look like:
If the transaction failed, a response might look like:
This status is for a single origin transaction only . If your route involves multiple transactions, you'll need to get the status for each of them individually.
If sending multiple dependent sequential transactions, wait until status
returns COMPLETED
before sending the next transaction.
You can access this function's input and output types with status.Options
and status.Result
, respectively.