Get Order Details
Fetch detailed information about a previously registered swap intent using the order ID. This API returns the status, route, fee, swapper inputs/outputs, and execution steps associated with the order. It is typically used to track the progress or outcome of a swap intent. Check out the orderDetails
API template script for implementation details.
Understanding Order Status
The orderData.status
field in the response indicates your order’s current state:
Status Code | Description |
---|---|
-1 | Order expired. The order did not register on-chain. Terminal state. |
0 | Order received by the backend but not yet registered on-chain. |
1 | Order registered on-chain but not yet filled. |
2 | Order settled successfully. Terminal state. |
3 | Order in dispute. The order was filled but not yet settled. |
4 | Order refunded. The order was not filled, and user was refunded. Terminal state. |
Authorization
x-authorization-secret
<token>Trade Service Secret (set this to the value of TRADE_SERVICE_SECRET from .env)
In: header
Request Body
application/json
RequiredorderId
stringcaipId
stringFetched