Skip to content
KernelFlowDevelopers v1
Get an order
Swap & Bridge/API reference
KERNELFLOW / DEVELOPERS

Get an order

Track execution, destination-chain arrival, and outcomes needing review.

GET/v1/order/{orderId}API key required
Request · use the orderId from submission
curl 'https://api.kernelflow.org/v1/order/ord_example' \
  --header "X-API-Key: $AGGREGATOR_API_KEY"
Pending response · illustrative
{
  "code": 0,
  "msg": "success",
  "data": {
    "orderId": "ord_example",
    "status": "Pending",
    "fromTxHash": "0x...",
    "createdAt": 1793942831,
    "updatedAt": 1793942831
  }
}

Status lifecycle

StatusStop automation?Meaning
PendingNoBroadcast, mining, or bridging is in progress or not yet resolved.
SucceededYesOutput arrived. realToAmount is the actual output.
FailedYesSource transaction failed, was replaced, or expired. Input remains with the user, minus any gas spent.
RefundedYesThe bridge refunded the trade. toTxHash identifies the refund transaction.
WaitVerifyYes; manual reviewThe outcome could not be proven automatically. Do not classify it as success or failure.

Response fields

FieldsAvailability / meaning
orderId, status, fromTxHashCore order identity and status.
createdAt, updatedAtUnix timestamps in seconds.
fromChain, fromToken, fromAddressSource details on resolved terminal orders when known.
toChain, toToken, toAddressDestination details when known.
fromAmountInput in smallest units.
toAmount, minToAmountQuoted output and minimum output.
realToAmountActual output when known; display this for a successful settlement.
toTxHashCross-chain destination transaction, or refund transaction for Refunded.
errMsgOptional 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.