Crypto Signals Automation
Use this skill to create a full pipeline: RapidAPI signals -> normalized signal objects -> dYdX v4 order execution.
Workflow
- 1. Collect setup inputs first:
- RapidAPI plan + key (
X-RapidAPI-Key)
- dYdX wallet address + mnemonic file path + subaccount
- risk settings (max leverage, margin per trade, max open positions, close-after-hours)
- TP/SL mode (reduce-only conditional orders)
- alert channels (Telegram chat IDs)
- 2. Validate RapidAPI connectivity with
scripts/rapidapi_fetch.py. - Generate env template with
scripts/bootstrap_env.py. - Wire runtime script/cron that:
- fetches symbols/signals,
- filters fresh active signals,
- opens positions with retries,
- places TP/SL reduce-only conditional orders,
- closes stale positions,
- cleans orphan reduce-only orders,
- sends Telegram notifications for open/close with PnL.
- 5. Test with one symbol in controlled mode before enabling full symbol set.
RapidAPI source
- - API: INLINECODE3
- Base host header: INLINECODE4
- Endpoints:
-
GET /getSymbols
- INLINECODE6
Use the most recent active=true signal per symbol. Deduplicate by signal id.
dYdX execution rules
- - Use dYdX v4.
- Open position with market semantics.
- Set TP/SL immediately after open as reduce-only conditional orders:
- TP type: take-profit-market
- SL type: stop-market / stop-limit equivalent in client
- - Retry failed order submissions up to total 3 attempts.
- Keep signal->order client_id mapping in state and only cancel matching reduce-only orders on cleanup.
Security
- - Never commit real API keys/secrets.
- Store secrets in
.env with strict file permissions (chmod 600). - Treat mnemonic/passphrase as secrets.
- If a token was exposed in chat/history, rotate it.
References
- - API details: INLINECODE11
- Setup checklist: INLINECODE12
加密货币信号自动化
使用此技能创建完整流程:RapidAPI信号 → 标准化信号对象 → dYdX v4订单执行。
工作流程
- 1. 首先收集设置输入:
- RapidAPI套餐+密钥(X-RapidAPI-Key)
- dYdX钱包地址+助记词文件路径+子账户
- 风险设置(最大杠杆、每笔交易保证金、最大持仓数、盘后平仓)
- 止盈/止损模式(仅减仓条件单)
- 警报渠道(Telegram聊天ID)
- 2. 使用scripts/rapidapifetch.py验证RapidAPI连接性。
- 使用scripts/bootstrapenv.py生成环境模板。
- 配置运行时脚本/定时任务:
- 获取交易对/信号,
- 过滤最新活跃信号,
- 带重试机制开仓,
- 下达止盈/止损仅减仓条件单,
- 平掉过期仓位,
- 清理孤立仅减仓订单,
- 发送开仓/平仓Telegram通知并附带盈亏。
- 5. 在启用全部交易对前,先以受控模式测试单个交易对。
RapidAPI来源
- - API:cryptexAI - 买入与卖出信号
- 基础主机头:cryptexai-buy-sell-signals.p.rapidapi.com
- 端点:
- GET /getSymbols
- GET /getSignalsForSymbol?symbol=...
每个交易对使用最新的active=true信号。按信号id去重。
dYdX执行规则
- - 使用dYdX v4。
- 以市价语义开仓。
- 开仓后立即设置止盈/止损作为仅减仓条件单:
- 止盈类型:take-profit-market
- 止损类型:客户端中等价的stop-market/stop-limit
- - 失败订单提交最多重试3次。
- 在状态中维护信号->订单client_id映射,清理时仅取消匹配的仅减仓订单。
安全
- - 切勿提交真实的API密钥/机密。
- 将机密存储在.env文件中,并设置严格文件权限(chmod 600)。
- 将助记词/密码短语视为机密。
- 如果令牌在聊天/历史记录中暴露,请立即轮换。
参考资料
- - API详情:references/rapidapi-cryptexai.md
- 设置清单:references/setup-checklist.md