circle-1Get a quote

This step retrieves signed premium quotes for the specified cover request from the OpenCover API. These quotes are required for the subsequent onchain purchase transaction.

Endpoint

POST https://opencover.com/api/quote

Refer to the OpenCover API reference for the full specification, error handling, and further examples.

diagram-projectAPI referencechevron-right

Request

The example below requests a quote to cover 500 USDC on Aave v3 for 30 days.

{
  "productId": 97,        // ID of the protocol to cover
  "expiry": 30,           // Cover duration in days (e.g., 30, 90, max 180)
  "integratorId": 0,      // Your assigned OpenCover integrator ID
  "mintTo": "0x...",      // User's wallet address for the proof-of-cover NFT
  "coveredAddresses": [], // Only required for ecosystem products (see remark below)
  "amount": {         // Amount and currency to cover
    "currency": { "symbol": "USDC" }, // USDC, ETH, cbBTC
    "value": "500"                    // Amount
  }
}

The integrator ID is assigned by OpenCover to each integrator, please reach outarrow-up-right if you don't have one yet.

If requesting a quote to cover an Ecosystem product, the coveredAddresses array must include all user wallet addresses to be covered. For all Non-ecosystem products, provide an empty array [], as all wallets controlled by the user are automatically covered.

For the list of supported products and their IDs please see the page below.

cubesProductschevron-right

Response

A successful response confirms the cover details and provides payable quotes.

Key fields

  • validUntil: Unix timestamp for quote expiry (usually 10 mins).

  • quotes: Array of quotes.

    • Each object includes premium (cost in smallest unit), fee (usually 0), and signature (v, r, s components). The signature is required for the onchain submission.

  • displayQuote: Informational USD premium estimate.

Next steps

  1. Parse the quotes array from the successful response.

  2. Present the premium options to the user.

  3. Store the selected quote's details, including the full signature object.

  4. Proceed to submit the quote (described on the next page).

Last updated