Tracking a Status of the Order
After the transaction has been successfully included in the source blockchain, it is time to retrieve the identifier of an order that has been created within the given transaction.
There is a separate endpoint which returns the list of
orderId
s of the orders that were created by the given transaction: /v1.0/dln/tx/:hash/order-ids
. Let's say, a transaction
0x40ee524d5bb9c4ecd8e55d23c66c5465a3f137be7ae24df366c3fd06daf7de7e
has been submitted to the BNB Chain. Calling the endpoint:https://api.dln.trade/v1.0/dln/tx/0x40ee524d5bb9c4ecd8e55d23c66c5465a3f137be7ae24df366c3fd06daf7de7e/order-ids
gives an array with only one
orderId
within it:{
"orderIds": [
"0x9ee6c3d0aa68a7504e619b02df7c71539d0ce10e27f593bf8604b62e51955a01"
]
}
The reason this endpoint returns an array rather than a single
orderId
is because a top level transaction may perform several calls to DLN, thus leading to multiple order creation.After the
orderId
has been revealed, it can be used to track the order's status. Use the /v1.0/dln/order/:id/status
endpoint supplying the given orderId
. Calling the endpoint:https://api.dln.trade/v1.0/dln/order/0x9ee6c3d0aa68a7504e619b02df7c71539d0ce10e27f593bf8604b62e51955a01/status
gives a status for the given order:
{
"status": "ClaimedUnlock"
}
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. For detailed explanation of what different statuses mean, consider reading a separate article: Tracking Orders
Last modified 4mo ago