> For the complete documentation index, see [llms.txt](https://docs.swapkit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swapkit.dev/swapkit-api/track-request-the-status-of-a-swap.md).

# /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](/swapkit-api/providers-providers-status-and-identifiers-mapping.md#chain-ids-and-corresponding-names).

**Method:** `POST`\
**URL:** `https://api.swapkit.dev/track`&#x20;

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:

<table><thead><tr><th>Field</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>hash</code></td><td><code>string</code></td><td>Transaction hash (required if using <code>chainId</code>)</td></tr><tr><td><code>chainId</code></td><td><code>string</code></td><td>Chain ID of the transaction (required if using <code>hash</code>)</td></tr><tr><td><code>depositAddress</code></td><td><code>string</code></td><td>Deposit address used to swap with NEAR Intents, can be used instead of <code>hash</code> and <code>chainId</code></td></tr></tbody></table>

NEAR Intents swaps can still be tracked normally by providing the transaction hash of the deposit and its chain id. Using `depositAddress` is an additional support, but using the executed transaction hash is simpler when users are connected to your application.

#### Example Requests:

<details>

<summary><strong><code>hash</code> and <code>chainId</code></strong></summary>

```bash
curl -X 'POST' \
  'https://api.swapkit.dev/track' \
  -H 'Content-Type: application/json' \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -d '{
  "hash": "0x1890aba1c0b25126892af2ab09f5c1bba75adefc47918a96ea498764ab643ce9",
  "chainId": "1"
}'
```

</details>

<details>

<summary><strong><code>depositAddress</code></strong></summary>

```bash
curl -X 'POST' \
  'https://api.swapkit.dev/track' \
  -H 'Content-Type: application/json' \
  -H "x-api-key: YOUR_VARIABLE_HERE" \
  -d '{
  "depositAddress": "0x6f2B69c522031A7640b432172Ac84e57Dc0a3A63"
}'
```

</details>

***

### 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:

<table><thead><tr><th width="219">Field</th><th width="119">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>chainId</code></td><td><code>string</code></td><td>The chain ID where the transaction occurred.</td></tr><tr><td><code>hash</code></td><td><code>string</code></td><td>The transaction hash.</td></tr><tr><td><code>block</code></td><td><code>number</code></td><td>The block number where the transaction was included.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>The type of the transaction (e.g., <code>swap</code>, <code>token_transfer</code>).</td></tr><tr><td><code>status</code></td><td><code>string</code></td><td>The transaction status (e.g., <code>completed</code>).<br>See <a href="#transaction-status">below</a> for more details.</td></tr><tr><td><code>trackingStatus</code></td><td><code>string</code></td><td>The current tracking status (using <code>status</code> is enough and this field should not be necessary).</td></tr><tr><td><code>fromAsset</code></td><td><code>string</code></td><td>The asset being sent.</td></tr><tr><td><code>fromAmount</code></td><td><code>string</code></td><td>The amount of <code>fromAsset</code>.</td></tr><tr><td><code>fromAddress</code></td><td><code>string</code></td><td>The address sending the asset.</td></tr><tr><td><code>toAsset</code></td><td><code>string</code></td><td>The asset being received.</td></tr><tr><td><code>toAmount</code></td><td><code>string</code></td><td>The amount of <code>toAsset</code>.</td></tr><tr><td><code>toAddress</code></td><td><code>string</code></td><td>The recipient address.</td></tr><tr><td><code>finalisedAt</code></td><td><code>number</code></td><td>UNIX timestamp indicating when the transaction finalized.</td></tr><tr><td><code>meta</code></td><td><code>object</code></td><td>Metadata including images and provider info.</td></tr><tr><td><code>payload</code></td><td><code>object</code></td><td>Additional transaction specific data.</td></tr><tr><td><code>legs</code></td><td><code>array</code></td><td>Detailed breakdown of each transaction leg.</td></tr></tbody></table>

***

#### Example response:

```json
{
  "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 `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.

### Transaction status

An important part of the response is the transaction status from the `status` field, which can have multiple values:

<table><thead><tr><th width="154">Status value</th><th>Explanation</th></tr></thead><tbody><tr><td><code>not_started</code></td><td>The swap has not happened yet.</td></tr><tr><td><code>pending</code></td><td>Intermediate state. The transaction has been detected by the mempool but is pending block confirmation.</td></tr><tr><td><code>swapping</code></td><td>The swap is happening.</td></tr><tr><td><code>completed</code></td><td>The swap is finished.</td></tr><tr><td><code>refunded</code></td><td>The swap was refunded because of the slippage settings.</td></tr><tr><td><code>unknown</code></td><td>Catch all for other situations.</td></tr><tr><td><code>failed</code></td><td>The transaction failed in an inbound EVM contract.</td></tr></tbody></table>
