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

# Bid on Auction

> Purchase collateral from an active Dutch auction

Places a bid on a Dutch auction to purchase liquidated collateral at the current declining price. The bidder pays USDC and receives stock tokens. The auction price decreases linearly from `startPrice` to `endPrice` over the configured duration.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Body Parameters

<ParamField body="auctionId" type="integer" required>Auction ID.</ParamField>
<ParamField body="collateralAmount" type="string" required>Amount of collateral to purchase (e.g. `"25"`).</ParamField>

<ParamField body="txHash" type="string">
  Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/lending-stocks/api/liquidations/{marketId}/bid-on-auction" \
    -H "X-API-Key: trusset_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{"auctionId": 1, "collateralAmount": "25"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "txHash": "0xabc...def",
      "auctionId": 1,
      "collateralPurchased": "25",
      "usdcPaid": "4310.000000"
    }
  }
  ```
</ResponseExample>
