Crypto Swap Skill (LightningEX)
A versatile cryptocurrency swap service powered by LightningEX API with three interaction modes:
- - Chat Mode: Natural language conversation for swaps and queries
- CLI Mode: Command-line interface for scripting and automation
- UI Mode: Web-based DeFi interface for visual trading
Quick Start
Chat Mode (Default)
Simply talk to perform exchanges:
Exchange & Rates:
- - "Swap 100 USDT to ETH"
- "What's the exchange rate for BTC to USDT?"
- "Exchange rate for 100 USDT (TRC20) to USDT (BEP20)"
Explore:
- - "Show me supported tokens"
- "List all currencies"
- "What networks does USDT support?"
Order Management:
- - "Check order status I1Y0××××"
- "Monitor order I1Y0××××"
- "Where is my order?"
Cross-chain Swaps:
- - "Swap USDT from Tron to BSC"
- "Bridge ETH from Ethereum to Arbitrum"
- "Convert BTC to SOL"
CLI Mode
Prerequisite: Install the CLI tool globally:
CODEBLOCK0
Run the CLI:
CODEBLOCK1
UI Mode
CODEBLOCK2
Files
This skill contains the following files:
- -
swap.js - Main CLI script (~1000 lines, open source) - INLINECODE1 - Package metadata
- INLINECODE2 - This documentation
- INLINECODE3 - MIT License
- INLINECODE4 - Package readme
- INLINECODE5 - Web UI assets (HTML/CSS/JS)
Author: @yoyoemily
Repository: https://github.com/yoyoemily/crypto-swap
License: MIT
加密货币兑换技能 (LightningEX)
由LightningEX API驱动的多功能加密货币兑换服务,提供三种交互模式:
- - 聊天模式:通过自然语言对话进行兑换和查询
- 命令行模式:适用于脚本编写和自动化的命令行界面
- UI模式:基于Web的DeFi可视化交易界面
快速开始
聊天模式(默认)
直接对话即可执行兑换:
兑换与汇率:
- - 将100 USDT兑换为ETH
- BTC兑USDT的汇率是多少?
- 100 USDT(TRC20)兑USDT(BEP20)的汇率
探索:
- - 显示支持的代币
- 列出所有币种
- USDT支持哪些网络?
订单管理:
- - 查询订单状态 I1Y0××××
- 监控订单 I1Y0××××
- 我的订单在哪里?
跨链兑换:
- - 将USDT从Tron兑换到BSC
- 将ETH从以太坊桥接到Arbitrum
- 将BTC兑换为SOL
命令行模式
前置条件: 全局安装CLI工具:
bash
npm install -g crypto-swap
运行CLI:
bash
启动交互式向导(默认)
crypto-swap
显示所有可用命令
crypto-swap --help
列出支持的币种
crypto-swap currencies
列出支持的币种-网络对
crypto-swap pair-list --send USDT --receive USDT
crypto-swap pair-list --send USDT --receive USDT --send-network TRX
获取配对信息
crypto-swap pair --send USDT --receive USDT --send-network TRX --receive-network BSC
检查汇率
crypto-swap rate --send USDT --receive USDT --send-network TRX --receive-network BSC --amount 100
检查订单状态
crypto-swap status --id I1Y0...
监控订单直至完成
crypto-swap monitor --id I1Y0...
UI模式
bash
启动Web UI(默认端口8080,若被占用则自动分配)
crypto-swap ui
文件
本技能包含以下文件:
- - swap.js - 主CLI脚本(约1000行,开源)
- package.json - 包元数据
- SKILL.md - 本文档
- LICENSE - MIT许可证
- README.md - 包说明文档
- assets/ - Web UI资源文件(HTML/CSS/JS)
作者: @yoyoemily
仓库地址: https://github.com/yoyoemily/crypto-swap
许可证: MIT