> For the complete documentation index, see [llms.txt](https://docs.xy.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xy.finance/single-bridge-integration/ybridge-api/get-cross-chain-status.md).

# Get Cross-Chain Status

You can look over the status of a cross-chain swap via this API.

## Get the status of a cross -chain transaction

<mark style="color:blue;">`GET`</mark> `endpoint/crossChainStatus`

#### Query Parameters

| Name                                              | Type   | Description                           |
| ------------------------------------------------- | ------ | ------------------------------------- |
| srcChainId<mark style="color:red;">\*</mark>      | String | ID of source chain                    |
| transactionHash<mark style="color:red;">\*</mark> | String | Transaction hash of source chain swap |

{% tabs %}
{% tab title="200: OK Done" %}

```javascript
{
  "isSuccess": true,
  "status": "Done",
  "msg": "Transaction has been completed.",
  "txHash": "<transaction hash of target chain swap>"
}
```

{% endtab %}

{% tab title="200: OK Processing" %}

```json
{
  "isSuccess": true,
  "status": "Processing",
  "msg": "Source chain transaction detected, destination chain transaction pending.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Not found" %}

```json
{
  "isSuccess": false,
  "status": "Not found",
  "msg": "No transaction found in the system.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Receive bridge token" %}

```json
{
  "isSuccess": true,
  "status": "Receive bridge token <symbol>",
  "msg": "Transaction reverted, bridge token received.",
  "txHash": "<transaction hash of target chain swap>"
}
```

{% endtab %}

{% tab title="200: OK Pending refund" %}

```json
{
  "success": true,
  "status": "Pending refund",
  "msg": "Transaction cannot be executed on destination chain, refund pending.",
  "txHash": null
}
```

{% endtab %}

{% tab title="200: OK Refunded" %}

```json
{
  "success": true,
  "status": "Refunded",
  "msg": "Transaction cannot be executed on destination chain, refunded.",
  "txHash": "<transaction hash of source chain refund>"
}
```

{% endtab %}
{% endtabs %}

There are six possible statuses: **Not found, Processing, Done, Receive bridge token, Pending refund, and Refunded.**

| Status                                                                                                                                                                                                                     | Msg                                                                       | Discription                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Not found**                                                                                                                                                                                                              | No transaction found in the system.                                       | No matching system record or source chain transaction detected.                                                                                                                                                       |
| **Processing**                                                                                                                                                                                                             | Source chain transaction detected, destination chain transaction pending. | System record exists; source transaction complete, destination pending.                                                                                                                                               |
| **Done**                                                                                                                                                                                                                   | Transaction has been completed.                                           | There is a system record, and the destination transaction has been completed.                                                                                                                                         |
| <p><strong>Receive bridge token (TOKEN\_NAME)</strong></p><p></p><p><strong>For example :</strong></p><ul><li>Receive bridge token (USDT)</li><li>Receive bridge token (USDC)</li><li>Receive bridge token (ETH)</li></ul> | Transaction reverted, bridge token received.                              | Due to price change over the slippage tolerance or other unforeseen issues, the transaction has been reverted on the destination chain and received bridge token instead.                                             |
| **Pending refund**                                                                                                                                                                                                         | Transaction cannot be executed on destination chain, refund pending.      | Transaction encountered an error and cannot be executed on the destination chain, we will refund the bridge token on the source chain. Once the refund transaction has been completed, it will be marked as Refunded. |
| **Refunded**                                                                                                                                                                                                               | Transaction failed on destination chain, refunded.                        | Refund completed, pool token sent to source chain sender's address.                                                                                                                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xy.finance/single-bridge-integration/ybridge-api/get-cross-chain-status.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
