Get an order
Track execution, destination-chain arrival, and outcomes needing review.
GET
/v1/order/{orderId}API key requiredcurl 'https://api.kernelflow.org/v1/order/ord_example' \
--header "X-API-Key: $AGGREGATOR_API_KEY"{
"code": 0,
"msg": "success",
"data": {
"orderId": "ord_example",
"status": "Pending",
"fromTxHash": "0x...",
"createdAt": 1793942831,
"updatedAt": 1793942831
}
}Status lifecycle
| Status | Stop automation? | Meaning |
|---|---|---|
| Pending | No | Broadcast, mining, or bridging is in progress or not yet resolved. |
| Succeeded | Yes | Output arrived. realToAmount is the actual output. |
| Failed | Yes | Source transaction failed, was replaced, or expired. Input remains with the user, minus any gas spent. |
| Refunded | Yes | The bridge refunded the trade. toTxHash identifies the refund transaction. |
| WaitVerify | Yes; manual review | The outcome could not be proven automatically. Do not classify it as success or failure. |
Response fields
| Fields | Availability / meaning |
|---|---|
| orderId, status, fromTxHash | Core order identity and status. |
| createdAt, updatedAt | Unix timestamps in seconds. |
| fromChain, fromToken, fromAddress | Source details on resolved terminal orders when known. |
| toChain, toToken, toAddress | Destination details when known. |
| fromAmount | Input in smallest units. |
| toAmount, minToAmount | Quoted output and minimum output. |
| realToAmount | Actual output when known; display this for a successful settlement. |
| toTxHash | Cross-chain destination transaction, or refund transaction for Refunded. |
| errMsg | Optional short reason on Failed, Refunded, or WaitVerify. |
Polling & review
Poll same-chain orders every 3–5 seconds and cross-chain orders every 10–15 seconds. Tracking stops after 10 minutes for same-chain or 2 hours for cross-chain trades, setting WaitVerify with “status check timed out”. Timeouts do not prove the trade failed.
Typical errMsg values include transaction failed on source chain, transaction replaced, transaction expired, bridge failed, refunded by bridge, result could not be verified, status check timed out, and transaction not recognized. Do not use message text as a substitute for the status field.