update
This commit is contained in:
parent
247617e99a
commit
44f40477e1
Binary file not shown.
@ -239,8 +239,8 @@ class CryptoAgent:
|
|||||||
market_data = {
|
market_data = {
|
||||||
"symbol": symbol,
|
"symbol": symbol,
|
||||||
"current_price": float(processed_data['close'].iloc[-1]),
|
"current_price": float(processed_data['close'].iloc[-1]),
|
||||||
"price_change_24h": float(processed_data['close'].iloc[-1] - processed_data['close'].iloc[-24]),
|
# "price_change_24h": float(processed_data['close'].iloc[-1] - processed_data['close'].iloc[-24]),
|
||||||
"price_change_percentage_24h": float((processed_data['close'].iloc[-1] - processed_data['close'].iloc[-24]) / processed_data['close'].iloc[-24] * 100),
|
# "price_change_percentage_24h": float((processed_data['close'].iloc[-1] - processed_data['close'].iloc[-24]) / processed_data['close'].iloc[-24] * 100),
|
||||||
"historical_prices": processed_data['close'].tail(100).tolist(),
|
"historical_prices": processed_data['close'].tail(100).tolist(),
|
||||||
"volumes": processed_data['volume'].tail(100).tolist(),
|
"volumes": processed_data['volume'].tail(100).tolist(),
|
||||||
"technical_indicators": {
|
"technical_indicators": {
|
||||||
@ -255,7 +255,7 @@ class CryptoAgent:
|
|||||||
"ma50": float(processed_data['MA50'].iloc[-1]),
|
"ma50": float(processed_data['MA50'].iloc[-1]),
|
||||||
"atr": float(processed_data['ATR'].iloc[-1])
|
"atr": float(processed_data['ATR'].iloc[-1])
|
||||||
},
|
},
|
||||||
"klines": processed_data[['open', 'high', 'low', 'close', 'volume']].tail(30).to_dict('records')
|
"klines": processed_data[['open', 'high', 'low', 'close', 'volume']].tail(100).to_dict('records')
|
||||||
}
|
}
|
||||||
|
|
||||||
# 将市场数据格式化为适合大模型的格式
|
# 将市场数据格式化为适合大模型的格式
|
||||||
|
|||||||
Binary file not shown.
@ -28,13 +28,12 @@ crypto:
|
|||||||
base_currencies:
|
base_currencies:
|
||||||
- "BTC"
|
- "BTC"
|
||||||
- "ETH"
|
- "ETH"
|
||||||
- "BNB"
|
|
||||||
- "SOL"
|
- "SOL"
|
||||||
- "SUI"
|
- "SUI"
|
||||||
# - "WLD"
|
- "XRP"
|
||||||
quote_currency: "USDT"
|
quote_currency: "USDT"
|
||||||
time_interval: "4h" # 可选: 1m, 5m, 15m, 30m, 1h, 4h, 1d
|
time_interval: "1h" # 可选: 1m, 5m, 15m, 30m, 1h, 4h, 1d
|
||||||
historical_days: 180
|
historical_days: 30
|
||||||
|
|
||||||
# 黄金市场分析配置
|
# 黄金市场分析配置
|
||||||
gold:
|
gold:
|
||||||
|
|||||||
11
run.py
11
run.py
@ -4,17 +4,6 @@
|
|||||||
"""
|
"""
|
||||||
CryptoAI 启动脚本
|
CryptoAI 启动脚本
|
||||||
|
|
||||||
用法:
|
|
||||||
python run.py # 持续运行智能体
|
|
||||||
python run.py --symbol BTCUSDT # 只分析指定的交易对
|
|
||||||
python run.py --days 7 # 获取7天的历史数据
|
|
||||||
python run.py --risk-level low # 设置低风险等级
|
|
||||||
python run.py --agent gold # 使用黄金分析智能体
|
|
||||||
python run.py --agent crypto # 使用加密货币分析智能体
|
|
||||||
python run.py --alltick-key KEY # 设置AllTick API密钥
|
|
||||||
python run.py --okx-key KEY # 设置OKX API密钥
|
|
||||||
python run.py --okx-secret SECRET # 设置OKX API密钥
|
|
||||||
python run.py --okx-passphrase PASS # 设置OKX API密码
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user