> ## 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.

# GetBidInfo

> GetBidInfo is called by the bidder to get the bid information. If block number is not specified,
all known block numbers are returned in the ascending order.



## OpenAPI

````yaml /v1.2.x/api-reference/bidder-openapi-spec.json get /v1/bidder/get_bid_info
openapi: 3.0.0
info:
  title: Bidder API
  version: 1.2.0-oas3
  license:
    name: Business Source License 1.1
    url: https://github.com/primev/mev-commit/blob/main/LICENSE
servers: []
security: []
paths:
  /v1/bidder/get_bid_info:
    get:
      summary: GetBidInfo
      description: >-
        GetBidInfo is called by the bidder to get the bid information. If block
        number is not specified,

        all known block numbers are returned in the ascending order.
      operationId: Bidder_GetBidInfo
      parameters:
        - name: blockNumber
          description: >-
            Optional block number for querying bid info. If not specified, all
            known block numbers are returned in ascending order.
          in: query
          required: false
          schema:
            type: string
            format: int64
        - name: page
          description: Page number for pagination.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: limit
          description: Number of items per page for pagination. Default is 50
          in: query
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1GetBidInfoResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
components:
  schemas:
    v1GetBidInfoResponse:
      type: object
      properties:
        blockBidInfo:
          type: array
          items:
            $ref: '#/components/schemas/GetBidInfoResponseBlockBidInfo'
          description: List of block bid info containing bids and their commitments.
    googlerpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    GetBidInfoResponseBlockBidInfo:
      type: object
      properties:
        blockNumber:
          type: string
          format: int64
          description: Block number for which the bid info is requested.
        bids:
          type: array
          items:
            $ref: '#/components/schemas/GetBidInfoResponseBidInfo'
          description: List of bids for the specified block number.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    GetBidInfoResponseBidInfo:
      type: object
      properties:
        txnHashes:
          type: array
          items:
            type: string
            pattern: '[a-fA-F0-9]{64}'
          description: >-
            Hex string encoding of the hashes of the transactions that the
            bidder wants to include in the block.
        revertableTxnHashes:
          type: array
          items:
            type: string
            pattern: '[a-fA-F0-9]{64}'
          description: >-
            Optional array of tx hashes that are allowed to revert or be
            discarded.
        blockNumber:
          type: string
          format: int64
          description: Block number that the bidder wants to include the transaction in.
        bidAmount:
          type: string
          description: >-
            Amount of ETH that the bidder is willing to pay to the provider for
            including the transaction in the block.
          pattern: '[0-9]+'
        decayStartTimestamp:
          type: string
          format: int64
          description: Timestamp at which the bid starts decaying.
        decayEndTimestamp:
          type: string
          format: int64
          description: Timestamp at which the bid ends decaying.
        bidDigest:
          type: string
          description: >-
            Hex string encoding of digest of the bid message signed by the
            bidder.
        slashAmount:
          type: string
          description: >-
            Amount of ETH that will be slashed from the provider if they fail to
            include the transaction. If zero, the decayed bid amount is used for
            slashing.
          pattern: '[0-9]+'
        commitments:
          type: array
          items:
            $ref: '#/components/schemas/GetBidInfoResponseCommitmentWithStatus'
        bidOptions:
          $ref: '#/components/schemas/bidderapiv1BidOptions'
      description: Information about a bid including its commitments.
      title: Bid Info
    GetBidInfoResponseCommitmentWithStatus:
      type: object
      properties:
        providerAddress:
          type: string
          description: >-
            Hex string encoding of the address of the provider that signed the
            commitment.
        dispatchTimestamp:
          type: string
          format: int64
          description: Timestamp at which the commitment is published.
        status:
          type: string
          description: >-
            Status of the commitment. Possible values: 'pending', 'stored',
            'opened', 'settled', 'slashed', 'failed'.
        details:
          type: string
          description: Additional details about the commitment status.
        payment:
          type: string
          description: Payment amount in wei for the commitment.
        refund:
          type: string
          description: Refund amount in wei for the commitment, if applicable.
    bidderapiv1BidOptions:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/bidderapiv1BidOption'
          description: List of bid options for the transaction.
    bidderapiv1BidOption:
      type: object
      properties:
        positionConstraint:
          $ref: '#/components/schemas/bidderapiv1PositionConstraint'
    bidderapiv1PositionConstraint:
      type: object
      properties:
        anchor:
          $ref: '#/components/schemas/bidderapiv1PositionConstraintAnchor'
        basis:
          $ref: '#/components/schemas/bidderapiv1PositionConstraintBasis'
        value:
          type: integer
          format: int32
          description: >-
            Value of the position constraint. If anchor is TOP, this is the
            position from the top of the block. If anchor is BOTTOM, this is the
            position from the bottom of the block.
      description: Constraint on the position of the transaction in the block.
      title: Position Constraint
    bidderapiv1PositionConstraintAnchor:
      type: string
      enum:
        - ANCHOR_TOP
        - ANCHOR_BOTTOM
      title: |-
        - ANCHOR_TOP: Position is at the top of the block
         - ANCHOR_BOTTOM: Position is at the bottom of the block
    bidderapiv1PositionConstraintBasis:
      type: string
      enum:
        - BASIS_PERCENTILE
        - BASIS_ABSOLUTE
        - BASIS_GAS_PERCENTILE
      title: |-
        - BASIS_PERCENTILE: Position is a percentile of the block size
         - BASIS_ABSOLUTE: Position is an absolute position in the block
         - BASIS_GAS_PERCENTILE: Position is a percentile of the gas used in the block

````