Tracking Orders via API
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.
Quick Start
- Base URL:
https://stats-api.dln.trade
- Full endpoint reference: Swagger
- Examples: See the implementation examples in this GitHub repository.
Querying Orders
By Wallet Address
ThePOST /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.
Example: Fetching Completed Orders for a Wallet
Example: Filtering Completed Orders by Destination Chain (e.g. HyperEVM)
By referralCode
Orders created through specific integrations can also be tracked by using the referralCode
parameter attached to each API request.
By Transaction Hash
For inspecting a specific order, use:https://stats-api.dln.trade/api/Orders/creationTxHash/0x3fe11542154f53dcf3134eacb30ea5ca586c9e134c223e56bbe1893862469bc5
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
To retrieve all order IDs:https://stats-api.dln.trade/api/Transaction/0x40ee524d5bb9c4ecd8e55d23c66c5465a3f137be7ae24df366c3fd06daf7de7e/orderIdsResponse:
Example:
By orderId
Use this endpoint:
https://stats-api.dln.trade/api/Orders/0x9ee6c3d0aa68a7504e619b02df7c71539d0ce10e27f593bf8604b62e51955a01Response:
Example:
Order Fulfillment Transaction
When order fulfillment transactions are important in the integration, they can be found inside of an eachorder
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 theaffiliateFeeRecipient
once the order reaches the ClaimedUnlock
status on EVM-based chains, and on Solana it is manually withdrawable.