deBridge
  • Introduction
  • The deBridge Messaging Protocol
    • Protocol Overview
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Development Guides
      • Building an EVM-based dApp
        • EVM smart contract interfaces
          • Interfaces
            • ICallProxy
            • IDeBridgeGate
            • IDeBridgeToken
            • IDeBridgeTokenDeployer
            • IOraclesManager
            • ISignatureVerifier
            • IWethGate
          • Libraries
            • Flags
          • Periphery
            • CallProxy
            • DeBridgeToken
            • DeBridgeTokenProxy
            • SimpleFeeProxy
          • Transfers
            • DeBridgeGate
            • DeBridgeTokenDeployer
            • OraclesManager
            • SignatureVerifier
            • WethGate
      • Sending cross-chain messages from Solana
        • On-Chain external call preparation for Solana
        • Off-chain external call preparation for Solana
      • Lifecycle of a cross-chain call
      • Gathering data for the claim
    • Development Tools
    • Security
    • Slashing and Delegated Staking
  • 🔁DLN: The deBridge Liquidity Network Protocol
    • Introduction
    • Protocol Overview
    • deBridge Hooks
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Market and Limit Orders
    • Interacting with smart contracts
      • Introduction
      • Placing orders
      • Filling orders
      • Withdrawing Affiliate Fees
    • Interacting with the API
      • Authentication
      • Creating an Order
        • Quick Start
        • Reserve Assets
        • Bridging Reserve Assets
        • Bridging non-reserve assets
        • API Parameters
          • Estimation-Only
          • prependOperatingExpenses
        • API Response
          • JSON Example
        • Refreshing Estimates
        • Fees and operating expenses
        • Order Fulfillment
          • Detecting the Order
          • Fulfilling the Order
            • Pre-Fill-Swap
          • Claiming the Order
      • Tracking Order Status
        • Order States
      • Integrating deBridge hooks
        • Creating Hook data for Solana
      • Submitting an Order Creation Transaction
      • Cancelling the Order
      • Affiliate fees
    • Interacting with the deBridge App
      • Custom Linking
    • deBridge Widget
    • Protocol specs
      • Deterministic order ID
      • Hook data
        • Anatomy of a Hook for the EVM-based chains
        • Anatomy of a Hook for Solana
  • 💸dePort
    • Getting started
    • Transfers Flow
  • ⚡deBridge Points
    • Referrers Overview
    • Integrators Overview
  • 🌐deBridge IaaS
    • Getting started
  • 🌐Legal
    • SDK & API License Agreement
  • External Links
    • deBridge Use Cases
      • 💡Examples
    • Talks, Videos, and Articles
    • Website
    • Github
    • Twitter
    • Social channels
      • Discord
      • Facebook
      • LinkedIn
      • Medium
      • Telegram
      • YouTube
Powered by GitBook
On this page
  • Tracking by Wallet Address
  • Tracking by Transaction Hash
  • Multiple orders created in the same transaction
  • By order Id

Was this helpful?

  1. DLN: The deBridge Liquidity Network Protocol
  2. Interacting with the API

Tracking Order Status

PreviousClaiming the OrderNextOrder States

Last updated 1 day ago

Was this helpful?

Once an order has been successfully created on-chain, its status can be tracked using several available methods. For an overview of all possible order states, refer to the order status documentation .

Tracking by Wallet Address

The method of the DLN allows retrieving the trade history and current status of all orders associated with a given wallet address. Check for more details.

Example:

curl -X 'POST' \
  'https://stats-api.dln.trade/api/Orders/filteredList' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "skip": 0,
  "take": 20,
  "creator":"0xB779DaeAD6031Ef189cAD4Ac438c991Efe7635A7"
}’

The same endpoint powers the DLN , which can serve as a reference implementation.

Tracking by Transaction Hash

For inspecting a specific order, the endpoint returns full order details as shown on the .

Example:

If multiple orders were created in a single transaction, this endpoint returns data only for the first order.

Multiple orders created in the same transaction

If multiple orders were created in a single transaction, the endpoint that returns a list of multiple order orderIds created by one transaction is /v1.0/dln/tx/:hash/order-ids.

will return an array with only one orderId in it:

{
    "orderIds": [
        "0x9ee6c3d0aa68a7504e619b02df7c71539d0ce10e27f593bf8604b62e51955a01"
    ]
}

An array instead of a single orderId is returned because a top-level transaction may perform several calls to DLN, thus leading to multiple orders being created.

Example code:

export async function getOrderIdByTransactionHash(txHash: string) {
  const URL = `https://stats-api.dln.trade/api/Transaction/${txHash}/orderIds`;

  const response = await fetch(URL);
  
  if (!response.ok) {
    const errorText = await response.text();
    throw new Error(
      `Failed to get orderIds by transaction hash: ${response.statusText}. ${errorText}`,
    );
  }

  const data = await response.json();

  if (data.error) {
    throw new Error(`DeBridge API Error: ${data.error}`);
  }

  return data;
}

By order Id

To track order status directly by orderId, use:

GET /api/Orders/{orderId}

Example:

Response:

{
    "status": "ClaimedUnlock"
}
  • Fulfilled

  • SentUnlock

  • ClaimedUnlock

Any of the above statuses can be interpreted as complete from the perspective of the end-user.

Example code:

export async function getOrderStatusByOrderId(orderId: string) {
  const URL = `https://stats-api.dln.trade/api/Orders/${orderId}`

  const response = await fetch(URL);
  
  if (!response.ok) {
    const errorText = await response.text();
    throw new Error(
      `Failed to get order status by orderId: ${response.statusText}. ${errorText}`,
    );
  }

  const data = await response.json();

  if (data.error) {
    throw new Error(`DeBridge API Error: ${data.error}`);
  }

  return data;
}

Affiliate Fee Settlement

View the example order on .

For example, the transaction has been submitted to the BNB Chain. Calling the endpoint:

The orderId is a deterministic identifier returned in the create-tx or retrievable via the transaction hash.

View Swagger spec .

Orders progress through various , but the key states that indicate a successful fulfillment are:

If set during order creation, the is automatically transferred to the affiliateFeeRecipient once the order reaches the ClaimedUnlock status.

🔁
here
/filteredList
Stats API
redoc
trade history section of deExplorer
/api/Orders/creationTxHash/{hash}
deExplorer order page
https://stats-api.dln.trade/api/Orders/creationTxHash/0x3fe11542154f53dcf3134eacb30ea5ca586c9e134c223e56bbe1893862469bc5
deExplorer
0x40ee524d5bb9c4ecd8e55d23c66c5465a3f137be7ae24df366c3fd06daf7de7e
https://stats-api.dln.trade/api/Transaction/0x40ee524d5bb9c4ecd8e55d23c66c5465a3f137be7ae24df366c3fd06daf7de7e/orderIds
response
here
https://stats-api.dln.trade/api/Orders/0x9ee6c3d0aa68a7504e619b02df7c71539d0ce10e27f593bf8604b62e51955a01
states
affiliate fee