> ## Documentation Index
> Fetch the complete documentation index at: https://perps-api.vooi.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit a bot

> Replaces the whole configuration of a stopped or halted bot; the runner applies it on its next poll. Refused while the bot runs, is closing its pair, or has an entry order working, since that order was sized under the configuration it was sent with. The history stays.



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json put /bots/{id}
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /bots/{id}:
    put:
      tags:
        - Bots
      summary: Edit a bot
      description: >-
        Replaces the whole configuration of a stopped or halted bot; the runner
        applies it on its next poll. Refused while the bot runs, is closing its
        pair, or has an entry order working, since that order was sized under
        the configuration it was sent with. The history stays.
      operationId: BotController_updateBot
      parameters:
        - name: id
          required: true
          in: path
          description: Bot identifier
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: Bot identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBotBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotDto'
        '400':
          description: A selected venue is not connected to your account
        '404':
          description: Bot not found
        '409':
          description: The bot is running, closing its pair, or has an entry order working
      security:
        - bearer: []
components:
  schemas:
    UpdateBotBodyDto:
      type: object
      properties:
        categories:
          description: Asset classes to trade; omit to trade every category
          minItems: 1
          type: array
          items:
            type: string
            enum:
              - commodities
              - crypto
              - etf-index
              - forex
              - pre-ipo
              - stocks-asia
              - stocks-us
            description: Asset class of the market
        exchanges:
          minItems: 2
          type: array
          items:
            anyOf:
              - type: string
                enum:
                  - aster
                  - binance
                  - bybit
                  - extended
                  - gate
                  - hyperliquid
                  - lighter
                  - mexc
                  - ondo
                  - robinhood
                description: Supported perpetual exchange
              - type: string
                pattern: ^hyperliquid:(xyz|mkts|io|hyperliquid)$
          description: >-
            Venues the pair legs may be opened on: an exchange name for all of
            its markets, or `hyperliquid:<dex>` for one Hyperliquid dex
            (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise a
            HIP-3 dex: `xyz`, `mkts` or `io`); each leg of a pair is on a
            different one of these, and a bare `hyperliquid` counts as one
          example:
            - hyperliquid:io
            - lighter
        leverage:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
          description: Leverage per leg, capped by each market limit
          example: 2
        maxHoldHours:
          default: 24
          description: >-
            Longest time to hold a pair before closing it even while the spread
            still pays; low for frequent rolls, high for carry
          type: number
          exclusiveMinimum: 0
        maxRoundTripCostBps:
          type: number
          exclusiveMinimum: 0
          description: >-
            Most a round trip (entry plus exit: fees, the hedge's book crossing
            and the resting leg's bid-ask spread) may cost, in basis points of
            the notional; pairs are ranked by expected funding over the hold
            minus this cost
          example: 25
        minExpectedNetBps:
          description: >-
            Least a pair must be expected to earn over the hold after its round
            trip, in basis points of the notional; omit to enter on the cost cap
            alone, as points farming does
          example: 20
          type: number
        notionalUsd:
          type: number
          exclusiveMinimum: 0
          description: >-
            Notional per leg in USD at the full leverage; a pair trades about 5%
            under it, further under where a venue reserves fee and slippage
            beyond notionalUsd / leverage (a market leg on Extended, Lighter or
            Robinhood) or a market caps leverage lower
          example: 500
        requiredExchange:
          description: >-
            Venue one leg of every pair must be on, an exchange or one
            Hyperliquid dex as in `exchanges`; omit to let any two venues pair
            up
          anyOf:
            - type: string
              enum:
                - aster
                - binance
                - bybit
                - extended
                - gate
                - hyperliquid
                - lighter
                - mexc
                - ondo
                - robinhood
              description: Supported perpetual exchange
            - type: string
              pattern: ^hyperliquid:(xyz|mkts|io|hyperliquid)$
        risk:
          default: low
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            How much history the bot wants of a pair: low — a spread positive
            for the last 12 hours that also paid over the last day, held until
            the day stops paying or the spread flips hard; medium — the same
            with 6 hours; high — a spread paying now is enough, held until it
            turns clearly negative
      required:
        - exchanges
        - leverage
        - maxRoundTripCostBps
        - notionalUsd
      additionalProperties: false
      title: BotConfig
    BotDto:
      type: object
      properties:
        config:
          description: >-
            Bot configuration, applied by the runner on its next poll; null when
            the stored configuration no longer matches the current schema and
            the bot must be recreated.
          anyOf:
            - type: object
              properties:
                categories:
                  description: Asset classes to trade; omit to trade every category
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                      - commodities
                      - crypto
                      - etf-index
                      - forex
                      - pre-ipo
                      - stocks-asia
                      - stocks-us
                    description: Asset class of the market
                exchanges:
                  minItems: 2
                  type: array
                  items:
                    anyOf:
                      - type: string
                        enum:
                          - aster
                          - binance
                          - bybit
                          - extended
                          - gate
                          - hyperliquid
                          - lighter
                          - mexc
                          - ondo
                          - robinhood
                        description: Supported perpetual exchange
                      - type: string
                        pattern: ^hyperliquid:(xyz|mkts|io|hyperliquid)$
                  description: >-
                    Venues the pair legs may be opened on: an exchange name for
                    all of its markets, or `hyperliquid:<dex>` for one
                    Hyperliquid dex (`hyperliquid:hyperliquid` for Hyperliquid's
                    own perps, otherwise a HIP-3 dex: `xyz`, `mkts` or `io`);
                    each leg of a pair is on a different one of these, and a
                    bare `hyperliquid` counts as one
                  example:
                    - hyperliquid:io
                    - lighter
                leverage:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                  description: Leverage per leg, capped by each market limit
                  example: 2
                maxHoldHours:
                  default: 24
                  description: >-
                    Longest time to hold a pair before closing it even while the
                    spread still pays; low for frequent rolls, high for carry
                  type: number
                  exclusiveMinimum: 0
                maxRoundTripCostBps:
                  type: number
                  exclusiveMinimum: 0
                  description: >-
                    Most a round trip (entry plus exit: fees, the hedge's book
                    crossing and the resting leg's bid-ask spread) may cost, in
                    basis points of the notional; pairs are ranked by expected
                    funding over the hold minus this cost
                  example: 25
                minExpectedNetBps:
                  description: >-
                    Least a pair must be expected to earn over the hold after
                    its round trip, in basis points of the notional; omit to
                    enter on the cost cap alone, as points farming does
                  example: 20
                  type: number
                notionalUsd:
                  type: number
                  exclusiveMinimum: 0
                  description: >-
                    Notional per leg in USD at the full leverage; a pair trades
                    about 5% under it, further under where a venue reserves fee
                    and slippage beyond notionalUsd / leverage (a market leg on
                    Extended, Lighter or Robinhood) or a market caps leverage
                    lower
                  example: 500
                requiredExchange:
                  description: >-
                    Venue one leg of every pair must be on, an exchange or one
                    Hyperliquid dex as in `exchanges`; omit to let any two
                    venues pair up
                  anyOf:
                    - type: string
                      enum:
                        - aster
                        - binance
                        - bybit
                        - extended
                        - gate
                        - hyperliquid
                        - lighter
                        - mexc
                        - ondo
                        - robinhood
                      description: Supported perpetual exchange
                    - type: string
                      pattern: ^hyperliquid:(xyz|mkts|io|hyperliquid)$
                risk:
                  default: low
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  description: >-
                    How much history the bot wants of a pair: low — a spread
                    positive for the last 12 hours that also paid over the last
                    day, held until the day stops paying or the spread flips
                    hard; medium — the same with 6 hours; high — a spread paying
                    now is enough, held until it turns clearly negative
              required:
                - exchanges
                - leverage
                - maxRoundTripCostBps
                - notionalUsd
              additionalProperties: false
              title: BotConfig
            - type: 'null'
        createdAt:
          description: When the bot was created.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Bot identifier.
        lastError:
          description: >-
            What needs your attention, or null when nothing does: while the bot
            runs, a problem it keeps retrying or waits out, such as a venue key
            to reconnect, and once it halts, why it halted.
          type:
            - string
            - 'null'
        lastScan:
          description: >-
            The last scan that opened nothing, with the pairs it ranked and why
            each was passed over; null while the bot has never scanned, entered
            on every scan, or its stored scan no longer matches the current
            schema.
          anyOf:
            - type: object
              properties:
                candidates:
                  type: array
                  items:
                    type: object
                    properties:
                      asset:
                        type: string
                        description: Coin the pair trades, as the scanner names it
                      long:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be bought on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      short:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be sold on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      averageSpreadBpsPerHour:
                        description: >-
                          Average funding spread over the last day, in bps per
                          hour; null when unknown
                        type:
                          - number
                          - 'null'
                      entryBasisBps:
                        type: number
                        description: >-
                          Price gap between the two venues' mids at entry,
                          positive when the short leg is dearer
                      expectedNetBps:
                        type: number
                        description: >-
                          Funding expected over the configured hold at the lower
                          of the current and the day-average spread, less the
                          round trip cost
                      feesBps:
                        description: >-
                          Fees for opening and closing the pair at the account's
                          rates, the VOOI fee included, in bps of the notional;
                          part of roundTripCostBps
                        type: number
                      limitLeg:
                        type: string
                        enum:
                          - long
                          - short
                        description: Which leg would rest as a post-only limit
                      longMarketId:
                        description: Market the long leg would trade on its venue
                        type: string
                      longSlippageBps:
                        description: >-
                          Cost of buying the bot's notional across the long
                          venue's book, in bps of mid; null when the scanner has
                          no depth for it
                        type:
                          - number
                          - 'null'
                      roundTripCostBps:
                        type: number
                        description: >-
                          Fees, the hedge's book crossing, the resting leg's
                          bid-ask spread and the entry gap, for opening and
                          closing the pair
                      shortMarketId:
                        description: Market the short leg would trade on its venue
                        type: string
                      shortSlippageBps:
                        description: >-
                          Cost of selling the bot's notional across the short
                          venue's book, in bps of mid; null when the scanner has
                          no depth for it
                        type:
                          - number
                          - 'null'
                      spreadBpsPerHour:
                        type: number
                        description: Funding spread between the two venues, in bps per hour
                    required:
                      - asset
                      - long
                      - short
                      - entryBasisBps
                      - expectedNetBps
                      - limitLeg
                      - roundTripCostBps
                      - spreadBpsPerHour
                    title: BotScanCandidate
                  description: >-
                    The most promising pairs that passed ranking, best first;
                    only the few the bot would try are kept, and `pairs` less
                    the `rejected` counts is how many passed
                nearMisses:
                  default: []
                  description: >-
                    The pairs only the cost cap or only the expected-profit
                    floor refused, the two closest to each limit, the closest
                    first: the cheapest over the cap, the highest expected net
                    under the floor; scans stored before the field have none
                  type: array
                  items:
                    type: object
                    properties:
                      asset:
                        type: string
                        description: Coin the pair trades, as the scanner names it
                      long:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be bought on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      short:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be sold on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      averageSpreadBpsPerHour:
                        description: >-
                          Average funding spread over the last day, in bps per
                          hour; null when unknown
                        type:
                          - number
                          - 'null'
                      entryBasisBps:
                        type: number
                        description: >-
                          Price gap between the two venues' mids at entry,
                          positive when the short leg is dearer
                      expectedNetBps:
                        type: number
                        description: >-
                          Funding expected over the configured hold at the lower
                          of the current and the day-average spread, less the
                          round trip cost
                      feesBps:
                        description: >-
                          Fees for opening and closing the pair at the account's
                          rates, the VOOI fee included, in bps of the notional;
                          part of roundTripCostBps
                        type: number
                      limitLeg:
                        type: string
                        enum:
                          - long
                          - short
                        description: Which leg would rest as a post-only limit
                      longMarketId:
                        description: Market the long leg would trade on its venue
                        type: string
                      longSlippageBps:
                        description: >-
                          Cost of buying the bot's notional across the long
                          venue's book, in bps of mid; null when the scanner has
                          no depth for it
                        type:
                          - number
                          - 'null'
                      roundTripCostBps:
                        type: number
                        description: >-
                          Fees, the hedge's book crossing, the resting leg's
                          bid-ask spread and the entry gap, for opening and
                          closing the pair
                      shortMarketId:
                        description: Market the short leg would trade on its venue
                        type: string
                      shortSlippageBps:
                        description: >-
                          Cost of selling the bot's notional across the short
                          venue's book, in bps of mid; null when the scanner has
                          no depth for it
                        type:
                          - number
                          - 'null'
                      spreadBpsPerHour:
                        type: number
                        description: Funding spread between the two venues, in bps per hour
                      reason:
                        type: string
                        enum:
                          - cost_above_cap
                          - expected_net_below_min
                        description: >-
                          cost_above_cap — the round trip costs more than the
                          configured cap; expected_net_below_min — the funding
                          expected over the hold does not clear the round trip
                          by the configured margin
                    required:
                      - asset
                      - long
                      - short
                      - entryBasisBps
                      - expectedNetBps
                      - limitLeg
                      - roundTripCostBps
                      - spreadBpsPerHour
                      - reason
                    title: BotScanNearMiss
                pairs:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                  description: How many pairs the scanner returned
                rejected:
                  type: array
                  items:
                    type: object
                    properties:
                      pairs:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                        description: How many pairs this rule dropped
                      reason:
                        type: string
                        enum:
                          - average_not_paying
                          - cost_above_cap
                          - expected_net_below_min
                          - no_entry_basis
                          - no_reverse_pair
                          - no_slippage
                          - not_on_required_venue
                          - spread_not_held
                          - spread_not_held_24h
                          - spread_not_paying
                        description: >-
                          spread_not_paying — funding does not pay in this
                          direction; spread_not_held — the spread has not been
                          positive for as long as the risk level asks, or its
                          history is unknown; average_not_paying — it pays now
                          but paid nothing net over the last day (low and
                          medium); spread_not_held_24h — the spread turned
                          against the pair in the last day (older scans);
                          not_on_required_venue — neither leg is on the pinned
                          venue; no_entry_basis — a venue is not quoting both
                          sides, or its bid is not below its ask; no_slippage —
                          the scanner has no slippage for the hedging leg;
                          cost_above_cap — the round trip costs more than the
                          configured cap; expected_net_below_min — the funding
                          expected over the hold does not clear the round trip
                          by the configured margin; no_reverse_pair — the venues
                          did not quote the pair the other way (older scans)
                    required:
                      - pairs
                      - reason
                    title: BotScanRejection
                  description: What ranking dropped, counted per rule
                scannedAt:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  description: When the scan ran
                skipped:
                  type: array
                  items:
                    type: object
                    properties:
                      asset:
                        type: string
                        description: Coin the pair trades, as the scanner names it
                      long:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be bought on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      short:
                        anyOf:
                          - type: string
                            enum:
                              - aster
                              - binance
                              - bybit
                              - extended
                              - gate
                              - hyperliquid
                              - lighter
                              - mexc
                              - ondo
                              - robinhood
                            description: Supported perpetual exchange
                          - type: string
                            pattern: ^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$
                        description: >-
                          Venue the pair would be sold on: the exchange, or
                          `hyperliquid:<dex>` on Hyperliquid
                      reason:
                        type: string
                        description: What stopped the bot from opening this pair
                    required:
                      - asset
                      - long
                      - short
                      - reason
                    title: BotScanSkip
                  description: >-
                    Ranked pairs the bot could not open, with what stopped each
                    one
              required:
                - candidates
                - pairs
                - rejected
                - scannedAt
                - skipped
              title: BotScan
            - type: 'null'
        openCycle:
          anyOf:
            - type: object
              properties:
                closeAttempts:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                  description: >-
                    Exit orders the bot has sent for this pair so far, or rounds
                    of closing an unhedged entry at market.
                id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: Cycle identifier.
                pair:
                  anyOf:
                    - type: object
                      properties:
                        asset:
                          type: string
                          description: Coin the pair trades.
                        baseQuantity:
                          type: string
                          description: Size of each leg in base units.
                        heldFrom:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                            - type: 'null'
                          description: >-
                            When the entry filled and the hold started; null
                            until the hedge fills, and while the pair is
                            unavailable.
                        limitLeg:
                          type: string
                          enum:
                            - long
                            - short
                          description: >-
                            Which leg rests as a post-only limit: long (bought)
                            or short (sold).
                        long:
                          type: object
                          properties:
                            baseSymbol:
                              type: string
                              description: Base symbol on this venue
                            exchange:
                              type: string
                              enum:
                                - aster
                                - binance
                                - bybit
                                - extended
                                - gate
                                - hyperliquid
                                - lighter
                                - mexc
                                - ondo
                                - robinhood
                              description: Venue the leg trades on
                            marketId:
                              type: string
                              description: Venue-specific market identifier
                            quoteSymbol:
                              type: string
                              description: Quote symbol on this venue
                            userExchangeId:
                              type: string
                              pattern: ^[1-9]\d*$
                              description: >-
                                Venue account the leg was opened on; it stays
                                the same even if you reconnect the venue.
                          required:
                            - baseSymbol
                            - exchange
                            - marketId
                            - quoteSymbol
                            - userExchangeId
                          title: BotOpenCycleLeg
                          description: Leg the bot bought.
                        openedAt:
                          description: When the bot sent the entry order.
                          type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                        short:
                          type: object
                          properties:
                            baseSymbol:
                              type: string
                              description: Base symbol on this venue
                            exchange:
                              type: string
                              enum:
                                - aster
                                - binance
                                - bybit
                                - extended
                                - gate
                                - hyperliquid
                                - lighter
                                - mexc
                                - ondo
                                - robinhood
                              description: Venue the leg trades on
                            marketId:
                              type: string
                              description: Venue-specific market identifier
                            quoteSymbol:
                              type: string
                              description: Quote symbol on this venue
                            userExchangeId:
                              type: string
                              pattern: ^[1-9]\d*$
                              description: >-
                                Venue account the leg was opened on; it stays
                                the same even if you reconnect the venue.
                          required:
                            - baseSymbol
                            - exchange
                            - marketId
                            - quoteSymbol
                            - userExchangeId
                          title: BotOpenCycleLeg
                          description: Leg the bot sold.
                      required:
                        - asset
                        - baseQuantity
                        - heldFrom
                        - limitLeg
                        - long
                        - openedAt
                        - short
                      title: BotOpenCyclePair
                    - type: 'null'
                  description: >-
                    The pair itself, read back from the order that opened it;
                    null when that order is no longer in the database, which
                    leaves the bot holding a pair it cannot describe.
                phase:
                  type: string
                  enum:
                    - closing
                    - holding
                    - opening
                  description: >-
                    opening — the entry order is working; holding — both legs
                    are open; closing — an exit order is working, or the bot is
                    closing what an unhedged entry filled.
              required:
                - closeAttempts
                - id
                - pair
                - phase
              title: BotOpenCycle
            - type: 'null'
          description: The pair the bot is working on, or null while it holds none.
        status:
          type: string
          enum:
            - halted
            - running
            - stopped
            - stopping
          description: >-
            running — the bot executes scheduled ticks. stopping — the runner
            closes the pair it holds, if any, then stops. stopped — it has never
            been started, or you stopped it. halted — it hit a state it will not
            act on and stopped itself; `lastError` says which.
        updatedAt:
          description: When the bot last changed.
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      required:
        - config
        - createdAt
        - id
        - lastError
        - lastScan
        - openCycle
        - status
        - updatedAt
      title: Bot
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.