TWAP Order Executor
cc.twap_executorCall cc.twap_executor — Time-Weighted Average Price execution engine — splits large orders into smaller randomized slices over configurable time windows to minimize market impact. Purpose: Time-Weighted Average Price execution engine — splits large orders into smaller randomized slices over configurable time windows to minimize market impact. Behavior: DESTRUCTIVE. Splits and submits real exchange orders over time. Irreversible fills once slices execute. Not a simulation. Auth: X-Api-Key required (and linked exchange credentials for execution actions). Cost: $0.015 USDC per successful call (x402 Base USDC pay-per-use or prepaid X-Api-Key balance). Linked Connect keys are free. This is billing, not a side effect. Rate limit: 10/min (per API key). Tier: premium. Returns: Execution status: filled slices, average fill price, remaining quantity, estimated completion time. Guidelines: Prefer paper/simulation paths. For live money require explicit human confirmation (confirm_live / action=execute). Report real HTTP errors; never invent proxy failures. Tags: execution, twap, smart-order, market-impact, slippage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Parameter `side` (string). Required. | |
| slices | No | Parameter `slices` (number). Optional. | |
| symbol | Yes | Parameter `symbol` (string). Required. | |
| total_size | Yes | Parameter `total_size` (number). Required. | |
| __x_payment | No | Optional x402 payment proof (same value as X-PAYMENT header). Use when retrying after HTTP 402 if your MCP client cannot set custom headers. Not a business parameter. Optional. | |
| duration_minutes | Yes | Parameter `duration_minutes` (number). Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the gateway HTTP status is 2xx. | |
| data | No | Parsed JSON body from the endpoint (shape varies by slug). | |
| error | No | Error message when ok is false. | |
| status | Yes | Upstream HTTP status from x402-gateway. | |
| billing | No | Optional payment / cost metadata when present. | |
| endpoint | Yes | Catalog slug that was invoked (e.g. funding-rates). |