Skip to main content

private/bot/update-trading-bot (DCA)

POST 

/private/bot/update-trading-bot

Updates settings for a running or paused DCA (Dollar-Cost Averaging) Trading Bot.

Updatable settings for DCA bots include allocations, order type, price, max_order, stop/take-profit prices, auto_stake, investment parameters, and quantity.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/bot/update-trading-bot"

    api_key stringrequired

    Your API key (only required for private REST)

    sig stringrequired

    HMAC-SHA256 signature in hex (only required for private REST)

    nonce int64required

    Current timestamp in milliseconds, e.g. "1610905028000".

    params objectrequired
    bot_id int64required

    Trading Bot ID

    bot_type BotType (string)required

    Possible values: [DCA, TWAP, GRID, FUNDING_ARBITRAGE]

    Trading bot type:

    • DCA: Dollar Cost Averaging
    • TWAP: Time-Weighted Average Price
    • GRID: Grid trading
    • FUNDING_ARBITRAGE: Funding arbitrage
    notify_on_bot_change booleanrequired

    Whether to receive push notifications on bot state changes

    display_name string

    Updated display name for the bot. 4-15 characters; letters, numbers,

    settings object
    Bot-type-specific settings to update. TWAP and FUNDING_ARBITRAGE bots do not support updating settings.
    oneOf
    allocations object[]
    Array of instrument allocations
  • Array [
  • instrument_name stringrequired

    Instrument name

    allocated_percentage decimalrequired

    Percentage allocated (must sum to 100 across all allocations)

  • ]
  • type string

    Possible values: [MARKET, LIMIT]

    MARKET or LIMIT

    price decimal

    Limit price

    max_order string

    Maximum number of orders to place

    stop_price decimal

    Stop-loss price

    take_profit_price decimal

    Take-profit price

    auto_stake boolean

    Whether to automatically stake earned tokens

    investment_duration int64

    Total duration. In number of months when investment_frequency_mode is MONTHLY; in milliseconds when FIXED_DURATION.

    investment_frequency int64

    Interval between orders in milliseconds

    quantity decimal

    Quantity per order

Success.
Schema
    id int64

    Original request identifier

    method string

    Method name

    code int32

    0 for success; error code otherwise

    message string

    Error message for non-zero codes