API Reference
DBot OfficialDBot DashboardPricing

Create Limit Order (WS)

Used to create multi-chain limit buy and limit sell tasks

FreePlusProEnterpriseCredit Usage
0

URL

wss://api-bot-v1.dbotx.com/trade/ws/

Notes

To ensure the availability and stability of the WebSocket connection, a heartbeat subscription must be sent at least once every minute (recommended every 30–55 seconds), otherwise the system will automatically disconnect the timeout link

Request Example

{
    "id": 1761291309, // Call ID; the response returns the same ID as the request
    "method": "createLimitOrder", // Method to create limit order task
    "params": {
        "chain": "solana", // Blockchain (solana/ethereum/base/bsc/tron)
        "pair": "BAS6Cv5qG2FnEQ8W1wXKGfU2r6MFAiSdgGgkUM7NsStE", // Address of the token or pair to be bought/sold
        "walletId": "mglnkaeh0009pd", // The id of the wallet to be used, which can be obtained via the "Wallet Info API"
        "groupId": "m53gevri055ird", // Group id
        "settings": [
            {
                "enabled": true, // Task enable status, true/false
                "tradeType": "buy", // Trade type, with values of buy and sell
                "triggerPriceUsd": "0.022348210260", // Trigger buy/sell price (USD)
                "triggerDirection": "down", // “down” indicates execute buy/sell when below trigger price, “up” when above
                "currencyAmountUI": "0.1", // When trade type is buy, fill in the buy amount (ETH/SOL/BNB/TRX), when tradeType is sell, fill in the sell ratio (0-1)
                "customFeeAndTip": false, // "true"means both the priority fee (priorityFee) and the bribery tip (jitoTip) fields are valid, and the system will execute the transaction based on the provided values (null indicates automatic priority fee / bribery tip). "false" means that in turbo mode, only the priority fee (priorityFee) is valid, while in anti-MEV, only the bribery tip (jitoTip) is valid, and the system will allocate them automatically
                "priorityFee": "", // Priority Fee (SOL), valid for Solana, empty string means use auto priority fee
                "gasFeeDelta": 5, // Extra added gas (Gwei), valid for EVM
                "maxFeePerGas": 100, // When the base gas exceeds this value, no transaction will execute (Gwei), valid for EVM chains
                "jitoEnabled": true, // "true"means enable anti-MEV mode (Solana & Ethereum & Bsc)
                "jitoTip": 0.001, // Bribery tip used by Anti-MEV (Solana), required when “jitoEnabled” or “customFeeAndTip” is true (null indicates automatic priority fee / bribery tip)
                "expireDelta": 360000000, // Task validity duration, max 432000000 (ms)
                "expireExecute": false, // "true" means if not triggered within validity, execute at end
                "useMidPrice": false, // "true" enables anti-spike mode using the 1-second mid-price as trigger price (not 100% guaranteed)
                "maxSlippage": 0.1, // MAX slippage tolerance (0.00-1.00), when buying, it represents the difference between the actual price and the expected price. When selling, it represents the difference between the expected price and the actual price, the difference multiplier = 1/(1-slippage), 0.5 means a maximum of 2 times the accepted spread, 1 means unlimited spreads
                "concurrentNodes": 2, // Number of concurrent nodes (1-3)
                "retries": 1 // Number of retries after failure (0-10)
            },
            {
                "enabled": true, // Task enable status, true/false
                "tradeType": "sell", // Trade type, with values of buy and sell
                "triggerPriceUsd": "1.5", // Trigger buy/sell price (USD)
                "triggerDirection": "up", // “down” indicates execute buy/sell when below trigger price, “up” when above
                "customFeeAndTip": false, // "true"means both the priority fee (priorityFee) and the bribery tip (jitoTip) fields are valid, and the system will execute the transaction based on the provided values (null indicates automatic priority fee / bribery tip). "false" means that in turbo mode, only the priority fee (priorityFee) is valid, while in anti-MEV, only the bribery tip (jitoTip) is valid, and the system will allocate them automatically
                "priorityFee": "0.00005", // Priority Fee (SOL), valid for Solana, empty string means use auto priority fee
                "currencyAmountUI": 1, // When trade type is buy, fill in the buy amount (ETH/SOL/BNB/TRX), when tradeType is sell, fill in the sell ratio (0-1)
                "gasFeeDelta": 5, // Extra added gas (Gwei), valid for EVM
                "maxFeePerGas": 100, // When the base gas exceeds this value, no transaction will execute (Gwei), valid for EVM chains
                "jitoEnabled": true, // "true"means enable anti-MEV mode (Solana & Ethereum & Bsc)
                "jitoTip": 0.001, // Bribery tip used by Anti-MEV (Solana), required when “jitoEnabled” or “customFeeAndTip” is true (null indicates automatic priority fee / bribery tip)
                "expireDelta": 360000000, // Task validity duration, max 432000000 (ms)
                "expireExecute": false, // "true" means if not triggered within validity, execute at end
                "useMidPrice": false, // "true" enables anti-spike mode using the 1-second mid-price as trigger price (not 100% guaranteed)
                "maxSlippage": 0.1, // MAX slippage tolerance (0.00-1.00), when buying, it represents the difference between the actual price and the expected price. When selling, it represents the difference between the expected price and the actual price, the difference multiplier = 1/(1-slippage), 0.5 means a maximum of 2 times the accepted spread, 1 means unlimited spreads
                "concurrentNodes": 2, // Number of concurrent nodes (1-3)
                "retries": 1 // Number of retries after failure (0-10)
            }
        ]
    }
}

Response Data

{
    "method": "rpcResponse", // RPC response
    "id": 1761291309, // Call ID
    "result": {
        "err": false, // Request result status; false means succeeded, true means failed
        "res": [
            {
                "id": "mh378onq0009bf",
                "accountId": "lz99kwxp0006q0", // User ID
                "enabled": true, // Task enable status, true/false
                "chain": "solana", // Chain (solana/ethereum/base/bsc/tron)
                "pairType": "raydium_amm", // DEX source
                "pairFee": null,
                "pair": "BAS6Cv5qG2FnEQ8W1wXKGfU2r6MFAiSdgGgkUM7NsStE", // Trading pair contract address
                "token": "6iFUKWGDksVvmnSYJUGYnsu168xstni8xJkTF7QrpPAu", // Token address
                "tokenInfo": { // Token information
                    "contract": "6iFUKWGDksVvmnSYJUGYnsu168xstni8xJkTF7QrpPAu",
                    "createAt": null, // Creation time (milliseconds timestamp)
                    "name": "Candle Cat",
                    "symbol": "CANDLE",
                    "decimals": 6,
                    "totalSupply": "216477902092625",
                    "icon": "https://cf-ipfs.com/ipfs/QmbZRtksXcwZsRyt6hat5oiSQJLgme3YqeA6Q2o8xnQn1t",
                    "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
                    "mintAuthority": null,
                    "freezeAuthority": null
                },
                "currency": "So11111111111111111111111111111111111111112", // Base currency address
                "currencyInfo": { // Base currency information
                    "contract": "So11111111111111111111111111111111111111112",
                    "name": "Wrapped SOL",
                    "symbol": "SOL",
                    "decimals": 9,
                    "totalSupply": null,
                    "icon": "https://assets-cdn.trustwallet.com/blockchains/solana/assets/So11111111111111111111111111111111111111112/logo.png",
                    "createAt": null
                },
                "pairCurrency": null,
                "pairCurrencyInfo": null,
                "walletId": "mglnkaeh0006pd", // Wallet ID used, obtainable via "Wallet Info API"
                "groupId": null, // Group ID
                "groupName": null,
                "tradeType": "buy", // Trade type, values buy or sell
                "triggerDirection": "down", // "down" means execute buy/sell when below trigger price, "up" when above
                "triggerPriceUsd": 0.02234821026, // Trigger buy/sell price (USD)
                "currencyAmountUI": 0.1, // For buy type, enter buy amount (ETH/SOL/BNB/TRX); for sell type, enter sell ratio (0.00-1.00)
                "expireDelta": 360000000, // Task validity duration, max 432000000 (ms)
                "expireAt": 1761570470870, // Task expiration time (ms timestamp)
                "expireExecute": false, // "true" means if not triggered within validity period, execute automatically at end
                "useMidPrice": false, // "true" enables Anti-Spike mode using 1-second mid-price as trigger price (not 100% guaranteed)
                "gasFeeDelta": 5, // Extra added gas (Gwei), valid for EVM
                "maxFeePerGas": 100, // When base gas exceeds this value, no transaction (Gwei), valid for EVM chains
                "priorityFee": "", // Priority Fee (SOL), valid for Solana, empty string means auto priority fee
                "maxSlippage": 0.1, // Max slippage tolerance (0.00-1.00), for buy: difference between actual and expected price; for sell: expected and actual, multiplier = 1/(1-slippage)
                "retries": 1, // Number of retries after failure (0-10)
                "concurrentNodes": 2, // Number of concurrent nodes (1-3)
                "jitoEnabled": true, // "true" enables anti-MEV mode (Solana & Ethereum & Bsc)
                "jitoTip": 0.001, // Bribery tip for Anti-MEV (Solana), required when jitoEnabled or customFeeAndTip is true (null for auto)
                "customFeeAndTip": false, // "true" means both priorityFee and jitoTip valid; "false" means turbo: only priorityFee, anti-MEV: only jitoTip, auto allocation
                "state": "init", // Order status: init (initial), processing, done (completed), fail, expired
                "lastStateUpdateAt": 1761210470870,
                "createAt": 1761210470870, // Creation time (ms timestamp)
                "updateAt": 1761210470870
            }
        ]
    }
}

Example in 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": "createLimitOrder",
        "params": {
          "chain": "solana",
          "pair": "BAS6Cv5qG2FnEQ8W1wXKGfU2r6MFAiSdgGgkUM7NsStE",
          "walletId": "mglnkaeh0009pd",
          "groupId": "m53gevri055ird",
          "settings": [
            {
              "enabled": true,
              "tradeType": "buy",
              "triggerPriceUsd": "0.022348210260",
              "triggerDirection": "down",
              "currencyAmountUI": "0.1",
              "customFeeAndTip": false,
              "priorityFee": "",
              "gasFeeDelta": 5,
              "maxFeePerGas": 100,
              "jitoEnabled": true,
              "jitoTip": 0.001,
              "expireDelta": 360000000,
              "expireExecute": false,
              "useMidPrice": false,
              "maxSlippage": 0.1,
              "concurrentNodes": 2,
              "retries": 1
            },
            {
              "enabled": true,
              "tradeType": "sell",
              "triggerPriceUsd": "1.5",
              "triggerDirection": "up",
              "customFeeAndTip": false,
              "priorityFee": "0.00005",
              "currencyAmountUI": 1,
              "gasFeeDelta": 5,
              "maxFeePerGas": 100,
              "jitoEnabled": true,
              "jitoTip": 0.001,
              "expireDelta": 360000000,
              "expireExecute": false,
              "useMidPrice": false,
              "maxSlippage": 0.1,
              "concurrentNodes": 2,
              "retries": 1
            }
          ]
        }
      })
    )

    setInterval(() => {
      ws.ping()
    }, 30000)
  })

  ws.on('message', res => {
    console.log('res:', res.toString('utf-8'))
  })
}

main()

Example in 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": "createLimitOrder",
        "params": {
            "chain": "solana",
            "pair": "BAS6Cv5qG2FnEQ8W1wXKGfU2r6MFAiSdgGgkUM7NsStE",
            "walletId": "mglnkaeh0009pd",
            "groupId": "m53gevri055ird",
            "settings": [
                {
                    "enabled": True,
                    "tradeType": "buy",
                    "triggerPriceUsd": "0.022348210260",
                    "triggerDirection": "down",
                    "currencyAmountUI": "0.1",
                    "customFeeAndTip": False,
                    "priorityFee": "",
                    "gasFeeDelta": 5,
                    "maxFeePerGas": 100,
                    "jitoEnabled": True,
                    "jitoTip": 0.001,
                    "expireDelta": 360000000,
                    "expireExecute": False,
                    "useMidPrice": False,
                    "maxSlippage": 0.1,
                    "concurrentNodes": 2,
                    "retries": 1
                },
                {
                    "enabled": True,
                    "tradeType": "sell",
                    "triggerPriceUsd": "1.5",
                    "triggerDirection": "up",
                    "customFeeAndTip": False,
                    "priorityFee": "0.00005",
                    "currencyAmountUI": 1,
                    "gasFeeDelta": 5,
                    "maxFeePerGas": 100,
                    "jitoEnabled": True,
                    "jitoTip": 0.001,
                    "expireDelta": 360000000,
                    "expireExecute": False,
                    "useMidPrice": False,
                    "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())

Request Parameters visualization reference