Once an order has been successfully created on-chain, its state can be monitored using several available methods, depending on the use case. For a
full overview of order states and their transitions, refer to the Order
States documentation.
Key Completion States
Orders progress through multiple internal states. However, from the perspective of the end-user experience, the following states indicate successful completion:
Fulfilled
SentUnlock
ClaimedUnlock
Any of these states can be treated as successfully completed final states for application-level logic.
Examples: See the implementation examples in this GitHub
repository.
Querying Orders
By Wallet Address
The POST /api/Orders/filteredList
endpoint retrieves the current state and historical data for all orders associated with a wallet address. This endpoint is also used to populate the
trade history view in deExplorer.Pagination is supported via skip and take parameters.
Orders created through specific integrations can also be tracked by using the referralCode parameter attached to each API request.
const requestBody = { giveChainIds: [], // All of these are considered to be fulfilled // from the end-user's perspective orderStates: ['Fulfilled', 'SentUnlock', 'ClaimedUnlock' ], externalCallStates: ['NoExtCall'], skip: 0, take: 3, referralCode: "31805", };
export async function getOrderStatusByOrderId(orderId: string) { const URL = `https://dln-api.debridge.finance/api/Orders/${orderId}`; const response = await fetch(URL); if (!response.ok) { const errorText = await response.text(); throw new Error(`Failed to get order status: ${response.statusText}. ${errorText}`); } const data = await response.json(); if (data.error) { throw new Error(`DeBridge API Error: ${data.error}`); } return data;}
Order Fulfillment Transaction
When order fulfillment transactions are important in the integration, they can be found inside of an each order returned by the API by referencing
the fulfilledDstEventMetadata.transactionHash field.
Affiliate Fee Settlement
If set during order creation, the affiliate fee is automatically transferred to the affiliateFeeRecipient once the order reaches the ClaimedUnlock
status on EVM-based chains, and on Solana it is manually withdrawable.
Assistant
Responses are generated using AI and may contain mistakes.