Search documentation

Advanced Orders · Overview & Setup · Section 1 of 5

Product Overview

Start here if you are new to Advanced Orders. This page explains the product and the app data you need before writing integration code.

  1. Read Product Overview to confirm this is the behavior you need.
  2. Work through the setup requirements in this guide. Here, host app means the application you are adding Orbs to.
  3. Choose one implementation guide: React SDK for React apps, TypeScript SDK for other JavaScript/TypeScript apps, or API Only when you need to construct protocol requests yourself. You do not need to complete every method.

Keep this page available for chain, amount-unit, fee, and lifecycle details as you build.

How an order progresses
  1. Your appDefine the order

    Set tokens, amount, and time or price conditions.

  2. WalletPrepare & sign

    Wrap or approve if needed, then sign the order.

  3. Order SinkAccept the order

    Submit the signed order and retain its identifier.

  4. Your app · SolversTrack execution

    Show fills as the order’s conditions are met.

  5. On-chainFill or cancel

    Finish the trades, or cancel what remains while open.

Submission creates an order; fills can happen later. Cancelling the remaining trades requires a wallet transaction.

What Are Advanced Orders?

Advanced Orders lets users define when and under what conditions tokens should be exchanged, using the Orbs Spot protocol. Instead of executing a swap from a current quote, a user signs an order with a schedule or price condition. The order is submitted to the Order Sink service and can fill as its execution conditions are met. A fill is an executed trade that spends some or all of the order's input tokens.

Use this product to add scheduled trades and conditional orders to a DEX or trading application. The API Only, TypeScript SDK, and React SDK integrations expose the same product with different levels of help for order calculation, submission, and application state.

Order Types

TypeWhat it doesExample user intent
TWAP (time-weighted average price)Splits a total amount into smaller trades spaced over time, spreading execution across multiple fills. An optional limit can require a minimum output per fill.“Exchange 1,000 USDC for WETH in 10 trades of 100 USDC, spaced 10 minutes apart.”
LimitWaits until the input can be exchanged for at least the user-specified minimum output before the order expires.“Exchange 1 WETH only if I can receive at least 3,000 USDC.”
Stop LossMakes an order eligible when the lower price trigger is reached. The order can use market execution or a separate minimum output after triggering.“Trigger a sale of my WETH if its price falls to my lower threshold.”
Take ProfitMakes an order eligible when the upper price trigger is reached. The order can use market execution or a separate minimum output after triggering.“Trigger a sale of my WETH if its price rises to my target.”

These examples explain behavior, not recommended trading settings. A trigger makes an order eligible for execution; it does not guarantee a fill at the trigger price. Available liquidity, the order's execution constraints, and its deadline still matter. TWAP fills may execute at different prices, and an order can remain partially filled or unfilled.

Example User Journey

A user selects TWAP, chooses a token pair, and sets the total amount, number of trades, interval, and deadline. Your app previews the schedule, prepares token permissions, and asks the user to sign the order. Once the service accepts it, show “Order submitted.” Track individual fills and remaining progress in order history, and let the user cancel future execution. Cancellation does not undo completed fills.

What You Build

Your application provides the strategy controls, token and price data, wallet connection, order review, history, and cancellation interface. The protocol and order service handle the signed order lifecycle; the SDKs help prepare orders and access that lifecycle. A successful submission is the beginning of tracking, not proof that the trade has completed.

Choose Advanced Orders when execution depends on time or price conditions. Choose Swap when the user wants to exchange tokens from a current quote.