Track status
Our status API returns the status of a cross chain transaction. The response param status.squidTransactionStatus
tells the user what they need to do next.
API Endpoint
Parameters
transactionId
string
Yes
The transaction hash
fromChainId
string
Yes
The source chain ID
toChainId
string
Yes
The destination chain ID
requestId
string
No
The request ID (legacy parameter)
quoteId
string
No
The quote ID from the route response. Passing this parameter will enable volume and token activity sharing with integrators in the near future
Example Request
Code Examples
Getting Quote ID from Route Response
The quoteId
can be found at the top level of the route response. Including this parameter in status requests will enable volume and specific token activity sharing with integrators in the near future:
Updated SDK Interface
Function to Get Transaction Status
Polling for Transaction Status
Understanding squidTransactionStatus
This param will tell you what to show the user. There are 6 possible states:
SUCCESS
This indicates the transaction has completed on all chains. Whether a single chain, 2 chain or 3 chain call, the swap, stake, NFT purchase, bridge etc. has completed without any reversions and the user has received the intended funds.
NEEDS_GAS
This state is specific for Axelar transactions. If the gas price has spiked on the destination chain and execution cannot complete, Squid will return this status. The best user flow in this case is to send the user to Axelarscan to view the paused transaction.
ONGOING
There is nothing wrong, nothing to do, just relax and wait. The transaction should have an estimatedRouteDuration
in seconds that you can read from the /route
response. We generally recommend contacting support after either 15 minutes has passed, or double the estimatedRouteDuration
, whichever is larger.
PARTIAL_SUCCESS
This status indicates that the transaction has completed some of its steps. Currently, there is only one case that could cause this state. In the future there will be many, but we will provide more metadata around the PARTIAL_SUCCESS
. For now, this is what has happened:
The source chain transaction successfully executed, along with any swaps or contract calls.
The destination chain transaction has executed, but reverted during execution. This is usually due to slippage on volatile assets, but if you are trying to buy an NFT or do some cross-chain staking, then it could indicate that the custom hook had a failure.
If there is a partial success, the user will have received the bridged token in their wallet on the destination chain. In most cases this is axlUSDC.
NOT_FOUND
The Squid API cannot find an on-chain record of the transaction. This is usually due to our various services or service providers not having indexed the completed transaction. This state is often returned for 5-10 seconds after the transaction was executed, while chain indexing occurs.
This should not persist after maximum a few minutes (some chains such as Filecoin take a very long time to index, and for block inclusion). If it does, then get in touch with us on Discord.
REFUND
This status is specific to failed Coral routes. When a Coral transaction fails, the funds are automatically refunded on the source chain. This is the default behavior for Coral routes when passing the user's address as the fromAddress
. Refunds typically take ~10 minutes
How Coral refunds work:
Funds are always transferred from the
msg.sender
on the source chain (this could be the user for direct calls to Coral, or a smart contract like Multicall)When refunded, funds are sent to the
order.fromAddress
which is encoded to the user, not the callerThe
fromAddress
from the route request is used as theorder.fromAddress
for refundsThis ensures that even if the transaction was initiated through a smart contract, the refund goes to the actual user
Last updated