用途:executor-creator 用于通过 Hummingbot API 创建和管理交易执行器(executor)。执行器是轻量级交易组件,官方将其定位为新用户的推荐起点。
主要能力:支持多种执行器类型,包括 position_executor(单一仓位,带三重障碍风险管理)、grid_executor(多档买卖网格)、dca_executor(多入场点定投)、TWAP(大单降低市场冲击)、套利、跨交易所做市(XEMM)以及带重试逻辑的简单下单执行器。
使用方式:通过脚本逐步操作。先运行 ./scripts/setup_executor.sh 列出可用类型;再用 --type 参数查看配置结构,例如 ./scripts/setup_executor.sh --type position_executor;最后传入 --config 创建。管理脚本包括 list_executors.sh、get_executor.sh、stop_executor.sh(可用 --keep-position 保留仓位)、get_executors_summary.sh,以及 get_positions.sh、get_position.sh、clear_position.sh 管理已停止执行器留下的仓位。
position_executor 关键参数:connector_name、trading_pair、side、amount 为必填;entry_price、triple_barrier_config 的 stop_loss、take_profit、time_limit 以及 leverage 可选。三重障碍指止损、止盈、时间限制任一先触发即退出。
API 端点:/executors/types/available、/executors/types/{type}/config、/executors、/executors/search、/executors/summary、/executors/{id}、/executors/{id}/stop、/executors/positions/summary。直接调用时需注意:POST /executors/ 需尾斜杠;side 需用数字 1 表示 BUY、2 表示 SELL;配置需包在 executor_config 字段内。脚本会自动处理这些要求。
限制与错误:常见错误包括未知执行器类型、余额不足、交易对无效、连接器未配置、side 非数字、缺少尾斜杠导致 307 重定向。资料未提供收费、价格或平台支持范围等信息。