Skip to main content

private/bot/get-trading-bots

POST 

/private/bot/get-trading-bots

Returns a list of Trading Bots filtered by type and state. Results are sorted by update time in descending order.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/bot/get-trading-bots"

    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 int64

    Find by Trading Bot ID. When provided, state is not required.

    bot_types BotType (string)[]required

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

    Filter by bot type

    state BotState (string)[]

    Possible values: [RUNNING, PAUSED, TERMINATED]

    Filter by bot state. Required when bot_id is not provided.

    page integer

    Default value: 0

    Page number

    page_size integer

    Default value: 20

    Page size. Max 500.

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

    result object
    bot_list object[]
    List of trading bots
  • Array [
  • bot_id string

    Trading Bot ID

    bot_type BotType (string)

    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
    display_name string

    Display name of the trading bot

    state BotState (string)

    Possible values: [RUNNING, PAUSED, TERMINATED]

    Trading bot state:

    • RUNNING: Bot is actively placing orders
    • PAUSED: Bot is paused and not placing orders
    • TERMINATED: Bot has been permanently stopped
    reason string

    Termination reason (only present for terminated bots)

    create_time int64

    Create time in milliseconds (UTC)

    update_time int64

    Last update time in milliseconds (UTC)

    end_time int64

    End time in milliseconds (UTC). 0 if still active.

    migrated boolean

    Whether the bot was migrated

    settings object
    Bot-type-specific settings
    oneOf
    is_basket booleanrequired

    Whether this is a basket DCA bot (multiple instruments)

    allocations object[]required
    Array of instrument allocations
  • Array [
  • instrument_name stringrequired

    Instrument name

    allocated_percentage decimalrequired

    Percentage allocated (must sum to 100 across all allocations)

  • ]
  • investment_currency stringrequired

    Currency used for investment

    side string

    Possible values: [BUY, SELL]

    BUY or SELL. Required when is_basket is false

    type string

    Possible values: [MARKET, LIMIT]

    MARKET or LIMIT. Required when is_basket is false

    auto_stake boolean

    Whether to automatically stake earned tokens. Required when is_basket is false

    price decimal

    Limit price. Required when type is LIMIT

    quantity decimal

    Quantity per order. Either quantity or total_investment is required

    total_investment decimal

    Total investment amount. Either quantity or total_investment is required

    investment_frequency_mode InvestmentFrequencyMode (string)required

    Possible values: [FIXED_DURATION, MONTHLY]

    Investment frequency mode for DCA bots:

    • FIXED_DURATION: Fixed interval in milliseconds
    • MONTHLY: Monthly investment
    investment_frequency int64

    Interval between orders in milliseconds. Required when investment_frequency_mode is FIXED_DURATION

    first_investment_time int64

    Unix timestamp in milliseconds for the first order

    investment_duration int64

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

    max_order string

    Maximum number of orders to place

    stop_price decimal

    Stop-loss price. Not supported for basket bots

    take_profit_price decimal

    Take-profit price. Not supported for basket bots

    simplified_mode boolean

    Whether to use simplified mode

    execution_summary object
    Bot execution summary (varies by bot type)
    property name* any

    Bot execution summary (varies by bot type)

  • ]