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

Submit an order

Broadcast a signed transaction, or register an EVM transaction your wallet already broadcast.

POST/v1/orderAPI key required

JSON request body

FieldRequiredDescription
chainYesSource chain name.
txHashYesHash matching signedTx. EVM/TRX: hex; SOL: first signature in base58.
signedTxConditionalSigned raw transaction as hex. Required for SOL/TRX. Optional for EVM hash-only registration. TRX submission is currently disabled.
checkNoBoolean, default false. true checks balance, allowance, simulation, and gas before storing or broadcasting. Recommended.

The body must be a single JSON object with the supported fields and correct types. Unknown fields, duplicate keys, and trailing JSON are rejected. If signedTx is present, it must not be empty.

Submit · replace the placeholder transaction and hash
curl --request POST 'https://api.kernelflow.org/v1/order' \
  --header "X-API-Key: $AGGREGATOR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"chain":"BNB","txHash":"0x...","signedTx":"0x...","check":true}'
Accepted response · illustrative
{
  "code": 0,
  "msg": "success",
  "data": {
    "orderId": "ord_example",
    "status": "Pending",
    "fromTxHash": "0x...",
    "createdAt": 1793942831,
    "updatedAt": 1793942831
  }
}

Idempotency & timeout recovery

Submission is idempotent per (chain, txHash). Resending the exact same signedTx and txHash returns the existing order without a second broadcast. After a timeout or 503, resend the identical body or query the order / sender history. Do not sign a new transaction for the same trade until the first outcome is known.

OutcomeAction
code 0Save orderId and poll.
2005Node definitely rejected the transaction; nothing was stored. Request a new quote.
2007 / 2008 / 2009 / 2010Pre-check failed; nothing was stored or broadcast. Correct the issue.
Timeout / 503Outcome unknown. Recover with the same request or query existing orders.

EVM hash-only registration

If your wallet broadcasts directly, omit signedTx and send chain plus txHash. If the node cannot yet find the transaction, code 2003 is returned; retry this same registration after a few seconds. This is a specific exception to the usual no-retry rule for HTTP 200 business errors.

Hash-only body · illustrative
{
  "chain": "BNB",
  "txHash": "0x..."
}