/track - Request the status of a swap
The /track 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 normally provide the chain ID and transaction hash.
For NEAR Intents swaps, you can also call the endpoint with depositAddress, which is the address the deposit transaction was sent to.
For a complete list of chain IDs used by SwapKit you can check the table here.
Method: POST
URL: https://api.swapkit.dev/track
SwapKit has it's own transaction tracking interface here: https://track.swapkit.dev/. You can also directly fill the fields by directing users to https://track.swapkit.dev/?hash={{hash}} by populating it with the respective transaction hash.
Request Body:
hash
string
Transaction hash (required if using chainId)
chainId
string
Chain ID of the transaction (required if using hash)
depositAddress
string
Deposit address used to swap with NEAR Intents, can be used instead of hash and chainId
NEAR Intents swaps can still be tracked normally indicating the transaction hash of the deposit and the respective chain id. Using depositAddress is an additional option but observing executed hashes is easier if users are connected to your application.
Example Requests:
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).
trackingStatus
string
The current tracking status (using status is enough and this field should not be necessary).
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:
{
"chainId": "43114",
"hash": "0x18f6d7b91ceffcc6d70b5d73f324198d9847531b7fe53d9446b7e60a64fa44b9",
"block": 57181100,
"type": "swap",
"status": "completed",
"trackingStatus": "completed",
"fromAsset": "AVAX.AVAX",
"fromAmount": "9.58",
"fromAddress": "0xC935B2397f0c6f85235ceFba2Eb714fb5F919Ca0",
"toAsset": "THOR.RUNE",
"toAmount": "0",
"toAddress": "thor1mse4ysqpru6s7f6twlskt2yz963xz630mwtxqn",
"finalisedAt": 1739313043,
"meta": {
"provider": "THORCHAIN",
"providerAction": "swap",
"images": {
"from": "https://storage.googleapis.com/token-list-swapkit/images/avax.avax.png",
"to": "https://storage.googleapis.com/token-list-swapkit/images/thor.rune.png",
"provider": "https://storage.googleapis.com/token-list-swapkit/images/thor.rune.png",
"chain": "https://storage.googleapis.com/token-list-swapkit/avax.avax.png"
}
},
"payload": {
"memo": "=:r:thor1mse4ysqpru6s7f6twlskt2yz963xz630mwtxqn:0:-_/t:5/50"
},
"legs": [
{
"chainId": "43114",
"hash": "0x18f6d7b91ceffcc6d70b5d73f324198d9847531b7fe53d9446b7e60a64fa44b9",
"block": 57181100,
"type": "swap",
"status": "completed",
"trackingStatus": "completed",
"fromAsset": "AVAX.AVAX",
"fromAmount": "9.58",
"fromAddress": "0xC935B2397f0c6f85235ceFba2Eb714fb5F919Ca0",
"toAsset": "AVAX.AVAX",
"toAmount": "9.58",
"toAddress": "0x8F66c4AE756BEbC49Ec8B81966DD8bba9f127549",
"finalisedAt": 1739313038,
"meta": {
"images": {
"from": "https://storage.googleapis.com/token-list-swapkit/images/avax.avax.png",
"to": "https://storage.googleapis.com/token-list-swapkit/images/avax.avax.png",
"chain": "https://storage.googleapis.com/token-list-swapkit/avax.avax.png"
}
},
"payload": {
"memo": "=:r:thor1mse4ysqpru6s7f6twlskt2yz963xz630mwtxqn:0:-_/t:5/50"
}
},
{
"chainId": "thorchain-1",
"hash": "18f6d7b91ceffcc6d70b5d73f324198d9847531b7fe53d9446b7e60a64fa44b9",
"block": 19828318,
"type": "swap",
"status": "completed",
"trackingStatus": "completed",
"fromAsset": "AVAX.AVAX",
"fromAmount": "9.58",
"fromAddress": "0xc935b2397f0c6f85235cefba2eb714fb5f919ca0",
"toAsset": "THOR.RUNE",
"toAmount": "0",
"toAddress": "thor1mse4ysqpru6s7f6twlskt2yz963xz630mwtxqn",
"finalisedAt": 1739313043,
"meta": {
"provider": "THORCHAIN",
"providerAction": "swap",
"images": {
"from": "https://storage.googleapis.com/token-list-swapkit/images/avax.avax.png",
"to": "https://storage.googleapis.com/token-list-swapkit/images/thor.rune.png",
"provider": "https://storage.googleapis.com/token-list-swapkit/images/thor.rune.png",
"chain": "https://storage.googleapis.com/token-list-swapkit/thor.rune.png"
}
},
"payload": {
"memo": "=:r:thor1mse4ysqpru6s7f6twlskt2yz963xz630mwtxqn:0:-_/t:5/50",
"thorname": ""
}
}
]
}Notes:
The
legsarray provides a detailed view of each step in the transaction process.metacontains additional information, including images and the swap provider details.The
payloadmay include data likeevmCalldataormemofor more complex transactions.
Transaction status
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.
refunded
The swap was refunded because of the slippage settings.
unknown
Catch all for other situations.
failed
The transaction failed in an inbound EVM contract.
Last updated

