Skip to main content
Preview. Routed orders are live on staging. On production the action answers 403 routed orders are not enabled here until routed execution is switched on there.
When the same question is listed on Polymarket, Predict.fun and Hyperliquid, one routedOrder action buys it at the best combined price. Kairos reads each venue’s live book and fees, splits your size across them, and asks the wallet to sign one ordinary order per venue, cheapest first. Use it for buys you want filled at the best price now. To pick one venue yourself, or to sell, place an order per venue instead (choosing a venue).

What you need

  • A market that is linked to the same question on another venue. Check with GET https://data.kairos.trade/market-links/lookup?markets=<provider>:<marketId> (public). A market with no link is refused with 422.
  • A wallet that has completed setup on at least one of the linked venues. Venues it isn’t set up on are left out of the plan.
  • The X-Kairos-Wallet-Api: 2 header, as on every multi-venue call.

Place a routed order

Request

Buys only. side, price and postOnly aren’t taken: each venue order’s price comes from the plan.

What the wallet is asked

The first response already holds the whole plan in route, so you can show it before the first signature:
  • blendedEffective is the planned cost per share received, venue fees included. stop says why planning ended: filled, exhausted (books or balances ran out), effective_cap (maxPrice or slippageCents reached) or below_minimum.
  • Each leg is one order on one venue, at price: the worst book price planned on that venue. No leg pays more than the plan shows. delivered is less than size where a venue takes its fee in shares (Predict.fun).
  • The wallet signs one leg at a time, cheapest first. Every step carries venue, chainId and leg: { index, of }, and is that venue’s ordinary order signature (what the wallet signs). Each signed leg is sent to its venue at once, before the next is asked.
  • Only venues where the wallet is set up are planned, and each leg is sized so what that venue holds for the order (price × size, plus fees it holds in cash) fits the wallet’s balance there. notes says why any venue was left out.

Read the result

The action is done when at least one leg was placed. result is the plan plus each leg’s outcome:
A failed leg doesn’t stop the others. The action is failed only when no leg was placed; result.legs still lists every leg and why. errorCode is then ORDER_OUTCOME_UNKNOWN if any leg may be live, otherwise the first leg’s code. The plan is fixed when the action starts. A book can move while the user signs: a leg then fills what it can at its price, or ends NO_MATCH. It never pays more than its planned price.

When nothing can be routed

The action is refused before anything is signed: What route.notes can say about a venue:

Retries

clientOrderId holds one routed order per wallet for 7 days: Each leg is sent with its own id: <clientOrderId>:polymarket, <clientOrderId>:predictfun, and on Hyperliquid 0x plus the first 16 bytes, in hex, of keccak256 of <clientOrderId>:hyperliquid. Each leg’s id is in route.legs[].clientOrderId. Without a clientOrderId, every request plans and places a new routed order.

Checklist for agents

1

Find a linked market

GET https://data.kairos.trade/market-links/lookup?markets=polymarket:<conditionId>. Any venues[] entry with provider polymarket, predictfun or hyperliquid can be the market.
2

Check the wallet

GET /v3/wallets/{address}. At least one linked venue must be ready and funded.
3

Start the action

POST /v3/actions with type: "routedOrder", a clientOrderId, and a maxPrice if you have a limit. Show route to the user.
4

Sign each leg

For every needs_signature step, switch to chainId, sign request, post the signature. Poll GET /v3/actions/{id} while working.
5

Act on each leg

At done (or failed), read result.legs. Never buy again for an unknown leg before reading the wallet’s orders.
The schemas are WalletRoutedOrderAction, WalletRoute and WalletRoutedOrderResult in the OpenAPI spec and the Endpoints group of this tab. Field-by-field rules for every action are in the reference.