| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- env: mainnet
- api_base: ${PACIFICA_API_BASE}
- symbols: [BTC, ETH, SOL]
- accounts:
- maker:
- address: ${PACIFICA_MAKER_ADDRESS}
- private_key: ${PACIFICA_MAKER_PRIVATE_KEY}
- subaccount: maker-01
- role: maker
- hedger:
- address: ${PACIFICA_HEDGER_ADDRESS}
- private_key: ${PACIFICA_HEDGER_PRIVATE_KEY}
- subaccount: hedger-01
- role: hedger
- # 策略选择:grid(网格), scalper(剥头皮), both(混合)
- strategy_mode: grid # 推荐先用 grid 验证对冲架构
- # ========================================
- # 网格策略配置(Grid Trading Strategy)
- # ========================================
- grid:
- enabled: true
- # 单标的配置(微网格示例 - 根据实盘再调优)
- symbol: BTC
- grid_step_bps: 1.0 # 网格间距 0.01%,贴近盘口
- grid_range_bps: 20 # 网格范围 0.2%
- base_clip_usd: 40 # 单层订单大小(USD)
- base_clip_equity_pct: 0.01 # 按账户权益比例(1%)动态调整,取最大值
- base_clip_leverage: 20 # 动态 clip 杠杆倍数
- max_layers: 16 # 单边最大层数
- hedge_threshold_base: 0.15 # 累积 0.15 BTC 触发对冲
- tick_size: 1 # 价格步长
- lot_size: 0.00001 # 最小数量步长
- incremental_mode: true
- # 成交率闭环(可选)
- fill_rate_control:
- enabled: false # 测试网默认关闭,可按需求开启
- target_fills_per_minute: 25 # 目标成交率(次/分钟)
- target_maker_ratio: 0.8 # 目标 maker 占比
- max_self_trade_ratio: 0.01
- kp_step: 0.02
- ki_step: 0.002
- kp_clip: 0.1
- ki_clip: 0.01
- min_grid_step_bps: 0.5
- max_grid_step_bps: 3.0
- min_clip_usd: 20
- max_clip_usd: 80
- min_maker_ratio_for_adjust: 0.7
- emergency_step_multiplier: 1.4
- # 多标的配置(M2.5 增强版,注释掉则使用上面的单标的配置)
- # symbols:
- # - symbol: BTC
- # grid_step_bps: 100
- # grid_range_bps: 400
- # base_clip_usd: 500
- # max_layers: 4
- # - symbol: ETH
- # grid_step_bps: 120
- # grid_range_bps: 500
- # base_clip_usd: 400
- # max_layers: 4
- # 自适应参数(可选)
- adaptive:
- enabled: true
- volatility_window_minutes: 30
- min_volatility_bps: 0.5
- max_volatility_bps: 6
- min_grid_step_bps: 0.6
- max_grid_step_bps: 3
- recenter_enabled: true
- recenter_threshold_bps: 400
- recenter_cooldown_ms: 600000
- min_step_change_ratio: 0.25
- tick_interval_ms: 60000
- hedge_pending_timeout_ms: 30000
- post_only_cushion_bps: 1
- min_layers: 6
- max_placement_concurrency: 4
- placement_batch_delay_ms: 200
- rate_limit_backoff_ms: 500
- # 趋势检测与暂停(M2.5)
- trend_filter:
- enabled: false # MVP 阶段建议关闭
- lookback_periods: 12 # 12 * 5min = 1 hour
- trend_threshold_bps: 50 # 1 小时涨跌 > 0.5% 暂停网格
- # 低波动监控(M2.5)
- volatility_monitor:
- enabled: false
- min_daily_range_bps: 80 # 日内波动 < 0.8% 时告警
- action: notify # notify | reduce_step | switch_strategy
- # ========================================
- # 被动做市 + 剥头皮策略配置(原有策略)
- # ========================================
- mm:
- layers: 2
- base_clip_usd: 1000
- spread_bps: 1.6
- reprice_ms: 300
- scalper:
- trigger:
- spread_bps: 1.8
- min_cooldown_ms: 250
- tp_bps: 3
- sl_bps: 6
- risk:
- max_notional_abs: 100000
- max_base_abs: 0.8
- max_order_sz: 0.2
- kill_switch:
- drawdown_pct: 0.5
- triggers:
- - type: delta_abs
- threshold: 1.2
- - type: hedge_failure_count
- threshold: 3
- - type: data_gap_sec
- threshold: 3
- hedge:
- kp: 0.6
- ki: 0.05
- qmax: 0.4
- min_interval_ms: 200
- execution:
- max_slippage_bps: 5
- min_order_interval_ms: 100
- bulk_init_interval_ms: 20
- ws_rate_limiter:
- burst: 30
- refill_per_sec: 10
- max_queue_depth: 120
- min_order_interval_ms: 250
- ws_rate_limiter:
- burst: 6
- refill_per_sec: 5
- max_queue_depth: 60
- funding:
- poll_interval_ms: 60000
|