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

# ReceiveBids

> ReceiveBids is called by the provider to receive bids from the mev-commit node.
The mev-commit node will stream bids to the provider as the response. The bid can optionally
have the raw transaction payload in it. The order of the transaction hashes will be the same
as the raw transaction payloads if included.



## OpenAPI

````yaml /v1.2.x/api-reference/provider-openapi-spec.json get /v1/provider/receive_bids
openapi: 3.0.0
info:
  title: Provider API
  version: 1.2.2-oas3
  license:
    name: Business Source License 1.1
    url: https://github.com/primev/mev-commit/blob/main/LICENSE
servers: []
security: []
paths:
  /v1/provider/receive_bids:
    get:
      summary: ReceiveBids
      description: >-
        ReceiveBids is called by the provider to receive bids from the
        mev-commit node.

        The mev-commit node will stream bids to the provider as the response.
        The bid can optionally

        have the raw transaction payload in it. The order of the transaction
        hashes will be the same

        as the raw transaction payloads if included.
      operationId: Provider_ReceiveBids
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/providerapiv1Bid'
                  error:
                    $ref: '#/components/schemas/googlerpcStatus'
                title: Stream result of providerapiv1Bid
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
components:
  schemas:
    providerapiv1Bid:
      type: object
      example:
        amount: '1000000000000000000'
        bidDigest: >-
          9dJinwL+FZ6B1xsIQQo8t8B0ZXJubJwY86l/Yu7yAH159QrPHU0qj2P+YFj+llbuI1ZygdxGsX8+P3byMEA5ig==
        blockNumber: 123456
        decayEndTimestamp: 1725365302000
        decayStartTimestamp: 1725365301000
        revertingTxHashes:
          - fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7
        txHashes:
          - fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7
          - 71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8
      properties:
        txHashes:
          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.
        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]+'
        blockNumber:
          type: string
          format: int64
          description: >-
            Max block number that the bidder wants to include the transaction
            in.
        bidDigest:
          type: string
          format: byte
          description: Digest of the bid message signed by the bidder.
        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.
        revertingTxHashes:
          type: array
          items:
            type: string
          description: >-
            Optional array of tx hashes that are allowed to revert or be
            discarded.
        rawTransactions:
          type: array
          items:
            type: string
          description: >-
            Optional array of RLP encoded raw signed transaction payloads that
            the bidder wants to include in the block.
        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]+'
        bidOptions:
          $ref: '#/components/schemas/providerapiv1BidOptions'
        bidderAddress:
          type: string
          description: >-
            Hex string encoding of the bidder's address recovered from the bid
            signature.
          pattern: ^[a-fA-F0-9]{40}$
      description: Signed bid message from bidders to the provider.
      title: Bid message
      required:
        - txHashes
        - bidAmount
        - blockNumber
        - bidDigest
    googlerpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    providerapiv1BidOptions:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/providerapiv1BidOption'
          description: List of bid options.
      description: Options for the bid.
      title: Bid Options
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    providerapiv1BidOption:
      type: object
      properties:
        positionConstraint:
          $ref: '#/components/schemas/providerapiv1PositionConstraint'
    providerapiv1PositionConstraint:
      type: object
      properties:
        anchor:
          $ref: '#/components/schemas/providerapiv1PositionConstraintAnchor'
        basis:
          $ref: '#/components/schemas/providerapiv1PositionConstraintBasis'
        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
    providerapiv1PositionConstraintAnchor:
      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
    providerapiv1PositionConstraintBasis:
      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

````