Skip to main content

1. Get Bridge Transaction Status

To check the status of a specific bridge, use the following API request:
getBridgeStatus.js
export const getBridgeStatus = async (bridgeId, jwt) => {
  const request = await fetch(`https://api.rhino.fi/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.
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_CONFIRMATIONFast 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.
  • CANCELLEDCosmetic 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.
  • FAILEDRare, 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.

2. Get Bridge History

To retrieve a list of past transactions:
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.
getBridgeUserHistory.js
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()
}
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

I