/track - Request the status of a swap
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 check the table here.
Method: POST
URL: https://api.swapkit.dev/track
Request Body:
hash
string
Transaction hash (required)
chainId
string
Chain ID of the transaction (required)
block
number
Set to 0.
Example Request:
Response
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.
Response Fields:
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
The transaction status (e.g., completed
).
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.
Example response:
Notes:
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 likeevmCalldata
ormemo
for more complex transactions.
Last updated