# 4. Status Query

### 4.1 Asset Cross-Chain

**Endpoint**

[`https://bridge-api.wanchain.org/api/status/[lockHash]`](https://bridge-api.wanchain.org/api/status/%5BlockHash%5D)

* **lockHash**: The transaction hash of the cross-chain operation on the source chain or destination chain.

**Response Exmaple:**

```json
{
  "success": true,
  "data": {
    "timestamp": 1687940507,
    "tokenPair": "235",
    "lockHash": "0x1d07dcaeb345405232684e3c3fcffe979bd4b7e59da1ca42edf71dbc6cefc449",
    "redeemHash": "0x41796eff520763922b2e2fe099b6d7ed7f6657a8ff124fa9d2d497267f62d36c",
    "status": "Success",
    "sendAmount": "433876192000000000000",
    "receiveAmount": "433876192"
  }
}
```

Notes:

* The `status` value includes: `NotFound`, `Success`, `Processing`, `Trusteeship`, and `Refund`.
  * If `Trusteeship` is returned, it means the transaction information was filled in incorrectly, such as missing tag information in XRP cross-chain. Manual intervention is required to resolve the issue.
* The `Amount` value is in **wei** units and needs to be converted according to the decimals of fromToken and toToken.
  * If `sendAmount` and `receiveAmount` differ, the difference represents the fee deducted during the transaction.

**API Usage Example:**

[`https://bridge-api.wanchain.org/api/status/0x1d07dcaeb345405232684e3c3fcffe979bd4b7e59da1ca42edf71dbc6cefc449`](https://bridge-api.wanchain.org/api/status/0x1d07dcaeb345405232684e3c3fcffe979bd4b7e59da1ca42edf71dbc6cefc449)

You need to add: target chain hash, cross-chain amount, and fee deduction details.

If the cross-chain address is under risk control, the cross-chain transaction automatically refunds, and the query status can be obtained:

```json
{
	"success": true,
	"data": {
		"timestamp": 1717089815,
		"tokenPair": "245",
		"lockHash": "0xda36824c1dd500ba351b7a029adf615fd5fc529653dd9895ea937414201dc3eb",
		"redeemHash": "0xda5f0f4bcd55e2b1f288764f2292bab312410813dfef32e24c25264724f9b5de",
		"status": "Refund",
		"sendAmount": "37753912373",
		"receiveAmount": "37753912373"
	}
}
```


---

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

```
GET https://docs.wanchain.org/developers/wanbridge-api/4.-status-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
