/track - Request the status of a swap
Last updated
Last updated
The /tracker
endpoint provides real-time status information for a specific transaction. It is particularly useful for tracking the progress and details of swaps, transfers, and other operations. To use this endpoint, you must provide the chain ID and transaction hash.
For a complete list of chain IDs used by SwapKit you can .
Method: POST
URL: https://api.swapkit.dev/track
hash
string
Transaction hash (required)
chainId
string
Chain ID of the transaction (required)
block
number
Set to 0.
The response contains detailed information about the transaction status, type, and associated metadata. It also includes the array "legs"
which represent the different stages or components of the transaction.
chainId
string
The chain ID where the transaction occurred.
hash
string
The transaction hash.
block
number
The block number where the transaction was included.
type
string
The type of the transaction (e.g., swap
, token_transfer
).
status
string
trackingStatus
string
The current tracking status.
fromAsset
string
The asset being sent.
fromAmount
string
The amount of fromAsset
.
fromAddress
string
The address sending the asset.
toAsset
string
The asset being received.
toAmount
string
The amount of toAsset
.
toAddress
string
The recipient address.
finalisedAt
number
UNIX timestamp indicating when the transaction finalized.
meta
object
Metadata including images and provider info.
payload
object
Additional transaction specific data.
legs
array
Detailed breakdown of each transaction leg.
The legs
array provides a detailed view of each step in the transaction process.
meta
contains additional information, including images and the swap provider details.
The payload
may include data like evmCalldata
or memo
for more complex transactions.
An important part of the response is the transaction status from the status
field, which can have multiple values:
not_started
The swap has not happened yet.
pending
Intermediate state. The transaction has been detected by the mempool but is pending block confirmation.
swapping
The swap is happening.
completed
The swap is finished.
unknown
Catch all for other situations.
failed
The transaction failed in an inbound EVM contract.
The transaction status (e.g., completed
).
We will expand on it .