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

# AutoDeposit

> AutoDeposit is called by the bidder node to add a recurring deposit in the bidder registry. The bidder
can specify the amount of ETH to be deposited in each window. The bidder can also specify the start window
number for the deposit. If the start window number is not specified, the current block number is used to
calculate the window number. If the block number is specified, the window number is calculated based on
the block number. Once it is enabled, the node will automatically deposit the specified amount in each window
as well as withdraw the deposit from the previous window.



## OpenAPI

````yaml /v1.1.0/api-reference/bidder-openapi-spec.json post /v1/bidder/auto_deposit/{amount}
openapi: 3.0.0
info:
  title: Bidder API
  version: 1.1.6-oas3
  license:
    name: Business Source License 1.1
    url: https://github.com/primev/mev-commit/blob/main/LICENSE
servers: []
security: []
paths:
  /v1/bidder/auto_deposit/{amount}:
    post:
      summary: AutoDeposit
      description: >-
        AutoDeposit is called by the bidder node to add a recurring deposit in
        the bidder registry. The bidder

        can specify the amount of ETH to be deposited in each window. The bidder
        can also specify the start window

        number for the deposit. If the start window number is not specified, the
        current block number is used to

        calculate the window number. If the block number is specified, the
        window number is calculated based on

        the block number. Once it is enabled, the node will automatically
        deposit the specified amount in each window

        as well as withdraw the deposit from the previous window.
      operationId: Bidder_AutoDeposit
      parameters:
        - name: amount
          description: Amount of ETH to be deposited in wei.
          in: path
          required: true
          schema:
            type: string
        - name: windowNumber
          description: >-
            Optional window number for querying deposit. If not specified, the
            current block number is used.
          in: query
          required: false
          schema:
            type: string
            format: uint64
        - name: blockNumber
          description: >-
            Optional block number for querying deposit. If specified, calculate
            window based on this block number.
          in: query
          required: false
          schema:
            type: string
            format: uint64
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1AutoDepositResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
components:
  schemas:
    v1AutoDepositResponse:
      type: object
      example:
        amount_per_window: '1000000000000000000'
        start_window_number: '1'
      properties:
        startWindowNumber:
          type: string
          format: uint64
        amountPerWindow:
          type: string
      description: Response on AutoDeposit request.
      title: AutoDeposit response
    googlerpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}

````