|
hace 5 horas | |
---|---|---|
.. | ||
README.md | hace 4 días | |
SECURITY-GUIDE.md | hace 4 días | |
accounts-secure.json | hace 4 días | |
auto-sessions.json | hace 4 días | |
delta-strategy-config.json | hace 5 horas | |
strategies.json | hace 4 días | |
system-config.json | hace 4 días | |
trading-strategy.json | hace 5 horas |
accounts.json
- 账户配置[
{
"id": "account-1",
"name": "主账户",
"privateKey": "YOUR_PRIVATE_KEY_HERE",
"address": "YOUR_WALLET_ADDRESS_HERE",
"isActive": true
}
]
字段说明:
id
: 账户唯一标识name
: 账户名称privateKey
: 钱包私钥(用于签名交易)address
: 钱包地址isActive
: 是否启用该账户system-config.json
- 系统配置{
"system": {
"name": "PacificaWashTradingSystem",
"version": "1.0.0",
"environment": "development",
"logLevel": "info",
"timezone": "Asia/Shanghai"
},
"defaults": {
"symbol": "BTC-PERP",
"maxSessions": 2
}
}
字段说明:
system.name
: 系统名称system.version
: 系统版本system.environment
: 运行环境system.logLevel
: 日志级别system.timezone
: 时区设置defaults.symbol
: 默认交易对defaults.maxSessions
: 最大并发会话数strategies.json
- 策略配置[
{
"id": "delta-neutral-strategy",
"name": "Delta中性敞口持仓策略",
"enabled": true,
"type": "DELTA_NEUTRAL",
"symbol": "BTC-PERP",
"accounts": ["account-1", "account-2"],
"parameters": {
"targetDeltaRatio": 0.6,
"hedgeRatio": 0.4,
"hedgeInterval": 3000
},
"triggers": [
{
"type": "frequency",
"interval": 30000,
"enabled": true
}
]
}
]
字段说明:
id
: 策略唯一标识name
: 策略名称enabled
: 是否启用type
: 策略类型symbol
: 交易对符号accounts
: 参与的账户ID列表parameters
: 策略参数triggers
: 触发器配置编辑 accounts.json
,填入您的钱包信息:
[
{
"id": "account-1",
"name": "主账户",
"privateKey": "0x你的私钥",
"address": "0x你的地址",
"isActive": true
}
]
编辑 system-config.json
,设置系统参数:
{
"system": {
"name": "PacificaWashTradingSystem",
"version": "1.0.0",
"environment": "development",
"logLevel": "info",
"timezone": "Asia/Shanghai"
},
"defaults": {
"symbol": "BTC-PERP",
"maxSessions": 2
}
}
编辑 strategies.json
,设置交易策略:
[
{
"id": "delta-neutral-strategy",
"name": "Delta中性敞口持仓策略",
"enabled": true,
"type": "DELTA_NEUTRAL",
"symbol": "BTC-PERP",
"accounts": ["account-1", "account-2"],
"parameters": {
"targetDeltaRatio": 0.6,
"hedgeRatio": 0.4,
"hedgeInterval": 3000
},
"triggers": [
{
"type": "frequency",
"interval": 30000,
"enabled": true
}
]
}
]
# 每天上午9点执行
0 9 * * *
# 每6小时执行一次
0 */6 * * *
# 每分钟执行一次
*/1 * * * *
# 每周一上午9点执行
0 9 * * 1
系统启动时会自动验证配置文件:
如有配置错误,系统会记录错误日志并停止启动。