用于编辑某个跟随DEV卖出任务
| Free | Plus | Pro | Enterprise | 积分消耗 |
|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | 0 |
URL
wss://api-bot-v1.dbotx.com/trade/ws
说明
为保证WebSocket连接的可用性和稳定性,需要至少每1分钟(建议每30-55秒)进行一次心跳订阅,否则系统会自动断开超时链接
请求示例
{
"id": 1761291309, // 调用id,响应结果返回相同ID
"method": "updateDevOrder", // 调用编辑跟随DEV卖出任务方法
"params": {
"id": "mh47j198043m8q", // 跟随Dev卖出任务的id
"enabled": false, // 是否启用跟随Dev卖出任务,true表示启用,false表示关闭
"tradeType": "sell", // 支持Pump / Launchlab / MeteoraDBC及对应外盘,若为内盘,参数为"pump / meteora_bc / raydium_launchpad",若为外盘,参数为"pump_swap / raydium_cpmm / meteora_dyn / meteora_dyn2"
"minDevSellPercent": 0.5, // 触发比例 (0-1),当Dev卖出超过这个比例时卖出你的代币
"amountOrPercent": 1, // 卖出比例 (0-1),0.5表示卖出50%
"customFeeAndTip": false, // "true"表示优先费 (priorityFee) 和贿赂费 (jitoTip) 两个字段均有效,系统将按填写的值执行交易 (null表示自动优先费/自动贿赂费),"false"表示高速模式下只有优先费 (priorityFee) 有效,防夹模式下只有贿赂费 (jitoTip) 有效,系统将自动进行分配
"priorityFee": "", // 优先费 (SOL),对Solana有效,空字符串表示使用自动优先费
"jitoEnabled": true, // "true"表示启用防夹模式 (Solana & Ethereum & Bsc)
"jitoTip": 0.0012, // 防夹模式使用的贿赂费 (Solana),"jitoEnabled"或"customFeeAndTip"为true时必填 (null表示自动优先费/自动贿赂费)
"expireDelta": 360000000, // 任务有效时长,最大值为432000000 (毫秒)
"maxSlippage": 0.1, // 最大滑点(0.00-1.00),买入时表示实际成交价格和期望价格之间的差距,卖出时表示期望价格和实际成交价格之间的差距,相差倍数=1/(1-滑点),0.5即最多接受2倍价差,1 即不限制价差
"concurrentNodes": 2, // 并发节点数(1-3)
"retries": 1 // 失败后的重试次数(0-10)
}
}响应数据
{
"method": "rpcResponse", // rpc响应
"id": 1761291309, // 调用id
"result": {
"err": false // 是否发生错误
}
}以NodeJS为例
const WebSocket = require('ws')
function main() {
const ws = new WebSocket('wss://api-data-v1.dbotx.com/trade/ws/', {
headers: {
'x-api-key': 'YOUR_API_KEY',
},
})
ws.on('open', () => {
ws.send(
JSON.stringify({
"id": 1761291309,
"method": "updateDevOrder",
"params": {
"id": "mh47j198043m8q",
"enabled": false,
"tradeType": "sell",
"minDevSellPercent": 0.5,
"amountOrPercent": 1,
"customFeeAndTip": false,
"priorityFee": "",
"jitoEnabled": true,
"jitoTip": 0.0012,
"expireDelta": 360000000,
"maxSlippage": 0.1,
"concurrentNodes": 2,
"retries": 1
}
})
)
setInterval(() => {
ws.ping()
}, 30000)
})
ws.on('message', res => {
console.log('res:', res.toString('utf-8'))
})
}
main()以Python为例
import asyncio
import websockets
import json
async def main():
uri = "wss://api-data-v1.dbotx.com/trade/ws/"
headers = {"x-api-key": "YOUR_API_KEY"}
msg = {
"id": 1761291309,
"method": "updateDevOrder",
"params": {
"id": "mh47j198043m8q",
"enabled": false,
"tradeType": "sell",
"minDevSellPercent": 0.5,
"amountOrPercent": 1,
"customFeeAndTip": false,
"priorityFee": "",
"jitoEnabled": true,
"jitoTip": 0.0012,
"expireDelta": 360000000,
"maxSlippage": 0.1,
"concurrentNodes": 2,
"retries": 1
}
}
async with websockets.connect(uri, additional_headers=headers) as ws:
await ws.send(json.dumps(msg))
async def keep_alive():
while True:
await ws.ping()
await asyncio.sleep(30)
async def listen_for_messages():
async for message in ws:
print(message)
await asyncio.gather(keep_alive(), listen_for_messages())
if __name__ == "__main__":
asyncio.run(main())请求参数可视化参考

