Skip to main content

The sells and buys that bring your strategy positions to its book, each with its signable quote

POST/signals-orders/rebalance

The same orders as POST /signals-orders/rebalance/plan, each carrying quote: exactly the POST /quote/sell or POST /quote/buy answer for that order, signable payloads included. Sign and submit each quote through POST /trade/submit unchanged. The two-round funding flow is the plan route's: in round 1, submit the sells; once they settle, call again with amount_usdc set to the smaller of funding.next_amount_usdc and usdc_available (omitted when that is zero) for the buys.

Without amount_usdc the book's cash weight is sold on every call, and a buy-in from cash is amount_usdc on a wallet holding none of the names; see POST /signals-orders/rebalance/plan. To submit several quotes in one request, send them together through POST /trade/submit/batch.

One call at a time per wallet and strategy. While a quote from an earlier /rebalance for the same wallet and strategy is neither final (GET /quote/{quote_id}/status) nor five minutes past its expires_at, a new call is refused with 409 orders_in_flight naming those quote_ids (an empty list while the earlier call is still quoting), with Retry-After in seconds, so a retry never mints the same sells twice.

A submitted quote counts as final once its status has been read as final, so poll every quote you submit. The plan route is never refused this way: wait for every order there yourself.

One wallet per strategy. Your holdings are not tracked per strategy: every name of the book you hold in this wallet counts, whichever strategy (or none) you bought it for. Two strategies sharing a name in one wallet will sell or resize each other's position, so give each strategy its own wallet.

For programmatic signers only. A Solana leg is signable for about 45 s after this response. Each quote's own expires_at binds; the top-level expires_at is the earliest of them and signing_window_sec is the seconds left until it. Human and hardware-wallet flows should call POST /signals-orders/rebalance/plan, then quote each order when ready.

A partial result is normal: an order whose quote is refused is moved to skipped with the error code its quote route would have answered (for example no_routes, also what a buy the wallet cannot fund at quote time answers), and the response is still 200. A buy skipped here is counted in funding.buys_deferred_usdc and spends nothing from funding.next_amount_usdc; a sell skipped here adds nothing to it, so the next call never spends USDC that no sell freed.

When no sell is quoted, a buy the plan held as awaiting_sell_proceeds is skipped as insufficient_balance instead, since no proceeds are coming. An order whose quote expired before the response was sent is skipped as quote_stale.

max_slippage_bps is required here and applies to every leg.

Limits count upstream quote calls, from the same buckets as POST /signals-orders/exit: a sell held on one Solana venue costs 1 point, on two 3, on three 6; a buy costs at most 1 point per Solana venue it can buy on. The plan never costs more than 30 points (orders past that are skipped as leg_cap), so it always fits an empty per-integrator bucket; a plan costing more than the points left this minute is refused whole with 429 before any order is quoted. A 429 from the shared bucket does not spend your own points.

Requires your general (tik_) key; a reporting key is refused.

Request​

Responses​

OK