CAI E-mode lets an agent trade gTrade perps using the custodial wallet after the user enables the platform at /automation-settings and completes one hosted enrollment on cai.com /act. Prefer unified defi_trade over legacy per-platform tools.
https://cai.com/automation-settings (browser; not API-key callable).platform_readiness with platform_slug=gtrade (optional chain: arbitrum | polygon). If ready_to_trade is false, show blocking_reasons and stop.platform_automation_enroll with platform_slug=gtrade and chain → return url; user must complete /act (agent must not confirm for the user).defi_markets with platform_slug=gtrade and chain — resolve pair_index from catalog.defi_preflight until valid: true.defi_trade with body example:platform_slug: gtradeaction: placecollateral_amount, pair_index, leverage, buy, chain, intent_usddefi_order_status with returned order_id until is_terminal: true.defi_orders with ?platform_slug=gtrade&status=active for resting orders; status=terminal for history.defi_trade with action: close, optional trade_index (omit when exactly one matching long), symbol / pair_index, close_mode=full, chain.place + buy=false without long → preflight NO_POSITION_TO_CLOSE — use action=close instead.gtrade_open_trade / gtrade_close_trade — do not use in new flows.chain: arbitrum (default) | polygonenroll_approve per chain (gtrade_arb_v1, gtrade_pol_v1).gap_id: GAP_DEFI_GTRADE_V1, GAP_DEFI_AUTOMATION_V1 — partial_live until enrollment + trade smokes pass in your environment.gtrade in DEFI_ENABLED_PLATFORMS and CUSTODIAL_DEFI_AUTOMATION_ENABLED=true.CAI_EVM_TX_PATH.openclaw secrets set CAI_API_KEY "your_dashboard_api_key"
Scope: platform or full.
共 3 个版本