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

# Sign Price (EIP-712)

> Generate an EIP-712 signed price update for client-side submission

Returns a signed price message that can be passed to `openLoan`, `withdrawCollateral`, or `borrowMore` on the smart contract. The borrower submits the signed price alongside their transaction, allowing atomic price updates without requiring the registered wallet to submit a separate transaction.

## Path Parameters

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

## Body Parameters

<ParamField body="price" type="number">
  Price in USD. If omitted, fetched from the configured feed.
</ParamField>

<ParamField body="validitySeconds" type="integer" default="300">
  How long the signature remains valid. Min 60, max 3600.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/sign-price" \
    -H "X-API-Key: trusset_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{"price": 186.25, "validitySeconds": 300}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "price": "186250000",
      "priceUsd": "186.25",
      "timestamp": 1718445600,
      "validUntil": 1718445900,
      "signature": "0xabc...def",
      "signer": "0x123...456"
    }
  }
  ```
</ResponseExample>
