Tracking a Status of the Order
Last updated
Was this helpful?
Last updated
Was this helpful?
After the transaction has been successfully included in the source blockchain, it is time to retrieve the status of an order created within the given transaction. There are several ways to track the status of the trade.
The first way is method of dedicated stats-api
that allows retrieving the history of all trades performed by the wallet and their statuses. Check for more details. Stats-API Swagger is available at .
Example of trade history for address 0xB779DaeAD6031Ef189cAD4Ac438c991Efe7635A7
:
To understand the data structure and how trade history can be reflected in your app, you can check the page of deExplorer which is using this endpoint to obtain data.
In case detailed information on one specific trade is needed, endpoint of DLN API can be used. It returns the status and all the order parameters that are reflected on the order page of deExplorer.
Example of how to retrieve DLN trade details based on orderID: and in deExplorer
If multiple DLN orders were created in the same transaction, /creationTxHash will return information about the first one only
Let's say, a transaction has been submitted to the BNB Chain. Calling the endpoint:
gives an array with only one orderId
within it:
gives a status for the given order:
The order may have different statuses across its lifecycle, but the most important are Fulfilled
, SentUnlock
and ClaimedUnlock
— all indicating that the order has been successfully fulfilled, and a recipient has received a precise amount of the output token.
The affiliate fee (if set) that has been accrued during order creation is transferred to the affiliateFeeRecipient
when the ClaimedUnlock
status is reached.
This is a complete set of all possible statuses that an order may have, according to the DLN API:
Created
The order has been placed on the DLN and is awaiting fulfillment.
Fulfilled
The order has been fulfilled. The take amount of the output token has been transferred to dstChainTokenOutRecipient
SentUnlock
An unlock procedure has been initiated by the taker (who fulfilled the order) on the destination chain to unlock the give amount of the input token on the source chain, as per taker request
ClaimedUnlock
An unlock procedure has been completed, effectively unlocking the input funds to the taker beneficiary, and the affiliate fee to the affiliateFeeRecipient
on the source chain
OrderCancelled
A cancel procedure has been initiated by the dstChainOrderAuthorityAddress
on the destination chain to unlock the given funds on the source chain, as per order's srcChainRefundAddress
request
SentOrderCancel
A cancel procedure has been sent to the source chain to unlock the given funds on the source chain, as per order's srcChainRefundAddress
request
ClaimedOrderCancel
A cancel procedure has been completed, effectively refunding locked funds to the srcChainRefundAddress
on the source chain
After the orderId
has been revealed, it can be used to track the order's status by orderId specifically (instead of creation txHash). Use the GET
endpoint supplying the given orderId
. Calling the endpoint: