开放数据接口 · 支持激光助手接入 · 半自动交易
激光助手接入
通过接口密钥允许激光助手代表用户查询行情、生成待签名交易对象,最终由用户本人签名确认,保障资产安全。
1
创建接口密钥
在用户中心创建密钥,设置链白名单、代币白名单、单笔/单日限额等
2
调用 API
激光助手通过数据接口查询行情、生成交易参数,获得待签名对象
3
用户签名
待签名交易推送至用户钱包,用户确认后才实际上链执行
API 端点
GET
/api/v1/balance— 查询钱包余额参数
chainstring必填bsc / sol / base / eni
addressstring必填钱包地址
curl -H "X-Api-Key: pk_xxxxx" \
"https://your-domain.com/api/v1/balance?chain=bsc&address=0xabc..."GET
/api/v1/positions— 查询持仓代币参数
chainstring必填链
addressstring必填钱包地址
curl -H "X-Api-Key: pk_xxxxx" \
"https://your-domain.com/api/v1/positions?chain=bsc&address=0x..."GET
/api/v1/token/info— 查询代币信息参数
chainstring必填链
addressstring必填代币地址
curl -H "X-Api-Key: pk_xxxxx" \
"https://your-domain.com/api/v1/token/info?chain=bsc&address=0x..."GET
/api/v1/token/risk— 查询合约风险评估参数
chainstring必填链
addressstring必填代币地址
curl -H "X-Api-Key: pk_xxxxx" \
"https://your-domain.com/api/v1/token/risk?chain=bsc&address=0x..."POST
/api/v1/swap/quote— 获取兑换报价写操作参数
chainstring必填链
from_tokenstring必填支付代币地址
to_tokenstring必填目标代币地址
amountstring必填支付数量(字符串)
slippagenumber滑点 % (默认 0.5)
curl -X POST -H "X-Api-Key: pk_xxxxx" -H "Content-Type: application/json" \
-d '{"chain":"bsc","from_token":"0x...","to_token":"0x...","amount":"0.1","slippage":0.5}' \
https://your-domain.com/api/v1/swap/quotePOST
/api/v1/swap/prepare— 生成待签名交易对象 (半自动)需签名参数
chainstring必填链
from_tokenstring必填支付代币地址
to_tokenstring必填目标代币地址
amountstring必填支付数量(字符串)
slippagenumber滑点
walletstring必填用户钱包地址
mev_protectbooleanMEV 防护 (default: true)
# 生成待签名交易对象 (半自动)
curl -X POST -H "X-Api-Key: pk_xxxxx" -H "Content-Type: application/json" \
-d '{"chain":"bsc","from_token":"...","to_token":"...","amount":"1","wallet":"0x..."}' \
https://your-domain.com/api/v1/swap/preparePOST
/api/v1/swap/submit— 提交已签名的交易参数
order_nostring必填预生成订单号
signed_txstring必填已签名的交易 Hex
tx_hashstring广播后的交易哈希
curl -X POST -H "X-Api-Key: pk_xxxxx" -H "Content-Type: application/json" \
-d '{"order_no":"WD...","signed_tx":"0x...","tx_hash":"0x..."}' \
https://your-domain.com/api/v1/swap/submitMEV 防护 (防夹子机器人)MEV 已保护
MEV (Maximal Extractable Value) 是套利机器人通过重排交易顺序获取的利润。开启后使用 Flashbots / bloxRoute / MEV Blocker 等私有节点,交易不会进入公开 mempool。
本链支持 MEV 防护:BSC · Ethereum · Base · Solana·本链无需 MEV 防护 (L2 / 非 EVM):Arbitrum · Polygon · Avalanche·多链持续扩展
权限控制 & 安全机制
🔒 API 密钥控制
- 接口密钥 + Secret 双认证
- 密钥可随时吊销或重置
- 支持过期时间设置
- IP 白名单限制(可选)
⚡ 交易限额
- 单笔交易 USD 上限
- 单日累计 USD 上限
- 最大滑点容忍度
- 交易冷却时间
🌐 白名单策略
- 仅允许指定链交易
- 代币白名单(默认仅 排名前 100 的代币)
- 自动阻止高风险合约(激光信任分)
- 黑名单地址自动拦截
🚨 风控熔断
- 异常频次自动熔断
- 价格异动预警
- 完整审计日志
- 风控告警
统一响应格式
{
"code": 0,
"message": "ok",
"data": { ... },
"ts": 1745062800000
}