Grid Mode
In this mode, multiple bid and ask orders are placed. across preset price levels. Whenagent runs, it places limit orders on a grid of price levels around the current mid price.
Each level is defined by:
delta_percent— signed offset from mid price in percent. Bids use negative values (below mid), offers use positive values (above mid). E.g.-0.5on a bid = 0.5% below mid;0.3on an offer = 0.3% above mid.quantity— order size at this level
price_change_threshold_percent, all grid orders are cancelled and re-placed at updated levels.
RFQ
Quotes from liquidity providers are requested and executed against the best available quote. This mode best suits large-scale corporate trades on substantial amounts. When[liquidity_provider] is configured, the agent connects to the orderbook server via a bidirectional gRPC stream (SettlementStream) and receives RFQ requests in real time.
This is a typical RFQ quote flow:
- Agent connects and sends a handshake identifying the LP.
- Server routes incoming RFQ requests to the LP.
- Agent computes a quote price from the mid price and configured spread:
- Buy request (user buys, LP sells):
price = mid * (1 + offer_spread_percent / 100) - Sell request (user sells, LP buys):
price = mid * (1 - bid_spread_percent / 100)
- Buy request (user buys, LP sells):
- Agent validates quantity against
min_quantity/max_quantityand checks balance viaLiquidityManager. - Agent responds with a quote (price, quantity, validity window, settlement deadlines) or a rejection.
Rejection reasons may include the following:
- market disabled,
- RFQ disabled for market,
- quantity out of range,
- no mid-price yet,
- insufficient balance.
allocate_before_secs— seconds from DVP creation to allocate tokens (default: 3600)settle_before_secs— seconds from DVP creation to complete settlement (default: 7200)
Taker Fill Loops
Buy or sell RFQ orders are executed in chunks until the target amount is fully filled. This is an instance of an RFQ trade with an exceptionally high amount of funds. Each accepted quote is settled atomically via a single multicall (Accept_Dvp + Allocate + fees + traffic).
buy and sell Flags
| Flag | Description |
|---|---|
--market <ID> | Market ID (e.g. CC-USDC) |
--amount <N> | Total amount to fill (base instrument) |
--price-limit <N> | Max (buy) or min (sell) price per unit — default: mid ± 3% |
--min-settlement <N> | Minimum per-round size (default: 5.0) |
--max-settlement <N> | Maximum per-round size (default: total amount) |
--interval <SECS> | Retry interval when no quote arrives (default: 60) |
agent mode flags
| Flag | Description |
|---|---|
--settlement-only | Disable order placement, only settle existing trades |
--orders-only | Disable settlement, only place/manage grid orders |
--no-restore | Skip loading previous state from agent-state.json |
--no-reject | Accept all proposals without RFQ-state verification |
--dry-run | Prepare and verify transactions without signing or executing |
--force | Sign and execute even if verification fails |
--confirm | Prompt for confirmation before signing each transaction |
--verbose | Enable verbose logging |
--config <PATH> | Path to agent.toml (default: agent.toml) |