set_watch
Register a standing server-side watch (FREE, needs a key; idempotent upsert by client_key — re-registering replaces the watch and resets arming). kind='price': advisory µUSD threshold (asset_id, op gte/lte, threshold_usd_micro). kind='target': size-aware surrogate — would swapping amount_in of asset_in→asset_out deliver ≥ min_out? (margin_bps haircut, default 30; NO quote is run). Edge-triggered one-shot; re-arms after rearm_bps retreat + cooldown_s; ttl_s auto-expiry (default 86400) — refresh by re-upserting. Fires are numbers-only HINTS: re-quote with get_quote. Events push over SSE at GET /watches/stream (outside MCP); from MCP, poll list_watches.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"client_key": "<client_key>",
"kind": "<kind>"
},
"name": "set_watch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | ||
| kind | Yes | ||
| ttl_s | No | ||
| api_key | No | ||
| min_out | No | ||
| asset_id | No | ||
| asset_in | No | ||
| amount_in | No | ||
| asset_out | No | ||
| rearm_bps | No | ||
| client_key | Yes | ||
| cooldown_s | No | ||
| margin_bps | No | ||
| threshold_usd_micro | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |