> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhino.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Bridge Status & History

> This section explains how to retrieve the status and history of your bridge transactions. You can use these endpoints to monitor transaction progress and confirm successful transfers.

## **1. Get Bridge Transaction Status**

To check the status of a specific bridge, use the following API request:

```javascript getBridgeStatus.js theme={null}
export const getBridgeStatus = async (bridgeId, jwt) => {
  const request = await fetch(`https://api.rhino.fi/bridge/history/bridge/${bridgeId}`, {
    headers: {
      "content-type": "application/json",
      "authorization": jwt
    },
    method: "GET"
  })

  return request.json()
}
```

When you commit a bridge transaction, you receive a `quoteId` that you can use to track the transaction status.

```javascript theme={null}
import { getBridgeStatus } from './getBridgeStatus';

const JWT = 'YOUR_JWT'; // Replace with your JWT generated from our API
const quoteId = '123456'; // Replace with your quote ID

const status = await getBridgeStatus(quoteId, JWT);

const depositTxHash = status.state === 'ACCEPTED' || status.state === 'EXECUTED' ? status.depositTxHash : ''
const withdrawTxHash = status.state === 'EXECUTED' ? status.withdrawTxHash : ''

console.log('Bridge status:', status.state);
console.log('Deposit transaction hash:', depositTxHash);
console.log('Withdraw transaction hash:', withdrawTxHash);
```

#### **Possible state values:**

**Bridge (non‑swap) flows**

* `PENDING` – Quote committed; we’re waiting for a deposit on the source chain.
* `PENDING_CONFIRMATION` – *Fast chains only (WebSocket monitored)*. We’ve detected the deposit and are waiting for network confirmations. Not every bridge moves through this state.
* `ACCEPTED` – We’ve detected the deposit and are executing on the destination chain.
* `EXECUTED` – Bridge is complete; funds are credited on the destination chain.
* `CANCELLED` – *Cosmetic state*. Can occur only if the user cancels a **pending** bridge via API. If the deposit later arrives, the bridge will move out of this state and be executed. Useful for hiding pending records you no longer intend to fund.
* `FAILED` – *Rare, manual state*. Used only when there’s a specific issue and no way to complete the bridge. The user should contact Customer Support for a refund if one hasn’t already been issued.

**Additional states for swap flows**

* `DEPOSIT_ACCEPTED` – We’ve accepted the deposit and are performing a pre‑swap on the source chain (occurs **before** `ACCEPTED`).
* `SWAP_FAILED` – The swap failed; we’ll look into issuing a refund.
* `SWAP_FAILED_REFUNDED` – The swap failed and a refund was successfully issued.

For the full response format and more details, see the [API Reference](/api-reference/history/bridge-history).

<img src="https://mintcdn.com/rhinofi/uBsUz0dKPdIp1Gx6/images/history-diagram.png?fit=max&auto=format&n=uBsUz0dKPdIp1Gx6&q=85&s=abb2f465b55067fee8b4b2d18e056cf9" alt="Rhino Bridge Status Flow Diagram" width="2846" height="1753" data-path="images/history-diagram.png" />

***

## **2. Get Bridge History**

To retrieve a list of past transactions:

<Note>
  rhino.fi prioritizes transaction privacy, so the history endpoint is disabled by default for API keys.
  If access is required, ensure your API key is kept private and properly configured.

  You can request access to the user history endpoint by contacting us.
</Note>

```javascript getBridgeUserHistory.js theme={null}
export const getBridgeUserHistory = async (jwt) => {
    const queryParams = new URLSearchParams({
    page: '1',
    limit: '20',
    sortBy: 'createdAt',
    sortDirection: 'desc',
  })
  const request = await fetch(`https://api.rhino.fi/history/user?${queryParams.toString()}`, {
    headers: {
      "content-type": "application/json",
      "authorization": jwt
    },
    method: "GET"
  })

  return await request.json()
}
```

```javascript theme={null}
import { getBridgeUserHistory } from './getBridgeUserHistory';

const JWT = 'YOUR_JWT'; // Replace with your JWT generated from our API

const history = await getBridgeUserHistory(JWT);

console.log('Bridge history:', history.items);
```

***

## **Next Steps**

* If you haven’t integrated the bridge yet, start with the [Quickstart Guide](/api-integration/bridge#quickstart).
* For contract-level interactions, see [Contract Examples](/contracts/contract-examples).
