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

# SendBid

> Send a bid to the bidder mev-commit node. The bid is a message from the bidder to the provider 
with the transaction hashes and the amount of ETH that the bidder is willing to pay to the provider
for including the transaction in the block. The bid also includes the block number that the bidder
wants to include the transaction in, the start and end timestamps for the bid decay. The bidder can
optionally include the raw transaction payloads (hex encoded RLP) instead of transaction hashes.



## OpenAPI

````yaml /v1.2.x/api-reference/bidder-openapi-spec.json post /v1/bidder/bid
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/bid:
    post:
      summary: SendBid
      description: >-
        Send a bid to the bidder mev-commit node. The bid is a message from the
        bidder to the provider 

        with the transaction hashes and the amount of ETH that the bidder is
        willing to pay to the provider

        for including the transaction in the block. The bid also includes the
        block number that the bidder

        wants to include the transaction in, the start and end timestamps for
        the bid decay. The bidder can

        optionally include the raw transaction payloads (hex encoded RLP)
        instead of transaction hashes.
      operationId: Bidder_SendBid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bidderapiv1Bid'
        description: Unsigned bid message from bidders to the bidder mev-commit node.
        required: true
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/bidderapiv1Commitment'
                  error:
                    $ref: '#/components/schemas/googlerpcStatus'
                title: Stream result of bidderapiv1Commitment
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
components:
  schemas:
    bidderapiv1Bid:
      type: object
      example:
        amount: '1000000000000000000'
        block_number: 123456
        decay_end_timestamp: 1630000000
        decay_start_timestamp: 1630000000
        reverting_tx_hashes:
          - fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7
        slash_amount: '500000000000000000'
        tx_hashes:
          - 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.
        amount:
          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.
        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/bidderapiv1BidOptions'
      description: Unsigned bid message from bidders to the bidder mev-commit node.
      title: Bid message
      required:
        - amount
        - blockNumber
        - decayStartTimestamp
        - decayEndTimestamp
    bidderapiv1Commitment:
      type: object
      properties:
        txHashes:
          type: array
          items:
            type: string
            pattern: '[a-fA-F0-9]{64}'
          description: >-
            Hex string encoding of the hash of the transaction that the bidder
            wants to include in the block.
        bidAmount:
          type: string
          description: >-
            Amount of ETH that the bidder has agreed to pay to the provider for
            including the transaction in the block.
        blockNumber:
          type: string
          format: int64
          description: >-
            Max block number that the bidder wants to include the transaction
            in.
        receivedBidDigest:
          type: string
          description: >-
            Hex string encoding of digest of the bid message signed by the
            bidder.
        receivedBidSignature:
          type: string
          description: Hex string encoding of signature of the bidder that sent this bid.
        commitmentDigest:
          type: string
          description: Hex string encoding of digest of the commitment.
        commitmentSignature:
          type: string
          description: >-
            Hex string encoding of signature of the commitment signed by the
            provider confirming this transaction.
        providerAddress:
          type: string
          description: >-
            Hex string encoding of the address of the provider that signed the
            commitment signature.
        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.
        dispatchTimestamp:
          type: string
          format: int64
          description: Timestamp at which the commitment is published.
        revertingTxHashes:
          type: array
          items:
            type: string
          description: >-
            Optional array of tx hashes that are allowed to revert or be
            discarded.
        slashAmount:
          type: string
          description: >-
            Amount of ETH that will be slashed from the provider if they fail to
            include the transaction.
        bidOptions:
          $ref: '#/components/schemas/bidderapiv1BidOptions'
      description: Commitment message from the provider to the bidder mev-commit node.
      title: Commitment message
    googlerpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    bidderapiv1BidOptions:
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/bidderapiv1BidOption'
          description: List of bid options for the transaction.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    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

````